5.1.0 • Published 9 months ago

@florajs/ql-compiler v5.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@florajs/ql-compiler

npm.io NPM version NPM downloads

Compiles a Flora Query Language statement into a function.

Examples

const compile = require('@florajs/ql-compiler');

// Use a Flora filter as function
const filterFn = compile.filter('id=321 AND userId=109369');
filterFn({ id: 321, userId: 109369 }) // => true
filterFn({ id: 321, userId: 109368 }) // => false

// Use a Flora select statment as function
const selectFn = compile.select('foo,bar[baz]');
selectFn({ foo: 42, bar: { baz: 23, id: 1337 }, bla: 'blubb' })
// => { foo: 42, bar: { baz: 23 } }

License

MIT

5.1.0

9 months ago

5.0.0

10 months ago

4.0.0

2 years ago