
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@kupibilet/boolean-json-eval
Advanced tools
var evaluate = require('boolean-json-eval')
The package exports a function of two arguments:
a boolean-json expression
an object map from string variable name to true
, false
or a predicate (a function returning a boolean value) to be computed lazily.
It returns true
or false
.
var assert = require('assert')
assert(evaluate('x', {x: true}))
assert(
evaluate(
{or: ['a', {not: 'b'}, 'c']},
{a: false, b: true, c: () => 2 * 2 === 4}
)
)
assert(
evaluate(
{
and:
[
{not: 'a'},
{not: {not: {not: 'a'}}},
{or: ['a', {not: 'a'}]}
]
},
{a: false}
)
)
The function throws an exception if its expression argument references an undefined variable.
assert.throws(function() {
evaluate('x', {})
})
FAQs
evaluate boolean-json expressions
The npm package @kupibilet/boolean-json-eval receives a total of 0 weekly downloads. As such, @kupibilet/boolean-json-eval popularity was classified as not popular.
We found that @kupibilet/boolean-json-eval demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.