.
pkgcfg tag to evaluate Javascript expressions.
.
npm install --save pkgeval
The eval{} tag from pkgeval will be auto-discovered by pkgcfg because it follows
the package naming convention. You can also register it explicitly by adding 'eval'
to the array of pkgcfg tags in package.json. See the pkgcfg docs on
using external tags
for more information.
package.json:
{
"eval": "eval{3 > 5}",
"evalIndirect": "eval{${data} > 5}",
"data": "8",
}
Then, read your package.json with pkgcfg:
var cfg = require('pkgcfg')();
console.info(cfg.test.eval) // false
console.info(cfg.test.evalIndirect); // true
Evaluate Javascript expressions.
Required String. The expression to evaluate.
Add an issue in this project’s issue tracker
to let me know of any problems you find, or questions you may have.
Copyright 2016 by Stijn de Witt. Some rights reserved.