
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
assert-valid-glob-opts
Advanced tools
Assert a given object is a valid node-glob option
assertValidGlobOpts({
sync: true,
ignore: /node_modules/
});
TypeError: 2 errors found in the glob options:
1. `sync` option is deprecated and there’s no need to pass any values to that option, but true was provided.
2. node-glob expected `ignore` option to be an array or string, but got /node_modules/.
at assertValidGlobOpts (/Users/shinnn/example/index.js:29:9)
at Object.<anonymous> (/Users/shinnn/example/app.js:2:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
npm install assert-valid-glob-opts
const assertValidGlobOpts = require('assert-valid-glob-opts');
obj: Object
(glob
options)
customValidations: Array<Function>
(passed to validate-glob-opts
)
It validates a given object with validate-glob-opts and throws an error if the value is not valid.
const assertValidGlobOpts = require('assert-valid-glob-opts');
const ok = {
mark: true,
matchBase: false
};
assertValidGlobOpts(ok); // doesn't throw
const notOk = {
mark: 'true',
matchbase: false
};
assertValidGlobOpts(notOk); // throws an error
FAQs
Assert a given object is a valid glob option
The npm package assert-valid-glob-opts receives a total of 20,948 weekly downloads. As such, assert-valid-glob-opts popularity was classified as popular.
We found that assert-valid-glob-opts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.