-
-
Save lahmatiy/39377c027ac141cfb4e4ccd2807d3ae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group() | |
semver:satisfy() | |
semver\satisfy() | |
semver@satisfy() | |
method() -- build-in method | |
namespace:method() -- NO (conflict with slice notation & object literal definition) | |
namespace:prop -- NO (conflict with slice notation & object literal definition) | |
===== | |
# -- a context data object | |
#.path -- take a path from a context data object | |
#.method() -- apply a method to a context data object itself | |
#.path.method() -- apply a method to a path | |
===== | |
#method() -- context method added with no namespace, to current value | |
#:method() | |
path.#method() -- context method applied to path | |
path.#:method() | |
#namespace -- context namespace (use case? values?) | |
#namespace.prop | |
path.#namespace.prop -- Error! (use case?) | |
#namespace:method() | |
path.#namespace:method() | |
#namespace~method() | |
#namespace%method() | |
jora(.., { | |
methods: { // TODO: check method is ident | |
foo: () => {} | |
}, | |
namespaces: { // TODO: check namespace is ident | |
semver: require(...), | |
math: require(...) | |
} | |
}) | |
version#semver:satisfy('^1.0.0') | |
version.#semver:satisfy('^1.0.0') | |
version#:color() | |
==== | |
const queryFactory = jora.setup({ methods, namespaces }) | |
queryFactory === queryFactory.compile | |
queryFactory.setup -> { methods, namespaces } | |
const query = queryFactory(query, { ??? }); | |
query === query.perform() | |
const result = query(data, context) | |
#method() -> queryFactory.setup | |
#namespace -> queryFactory.setup | |
#namespace:method() -> queryFactory.setup | |
==== | |
const queryFactory = jora.create({ data, context, methods }) | |
queryFactory === queryFactory.compile | |
queryFactory.setup -> { data, methods } | |
const query = queryFactory(query, { ??? }); | |
query === query.perform() | |
const query = jora.create({ data, context, methods }) | |
query('foo', ...) -> result | |
query.stat('foo', ...) -> stat | |
query.suggest('foo', ..., pos) -> suggestions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment