pkgeval
v0.9.0
Published
pkgcfg tag to evaluate Javascript expressions in package.json
Downloads
7
Maintainers
Readme
pkgeval 0.9.0
One configuration to rule them all
.
pkgcfg tag to evaluate Javascript expressions.
.
Installation
npm install --save pkgeval
Registration
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.
Usage
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
eval{expr}
Evaluate Javascript expressions.
expr
Required String. The expression to evaluate.
Issues
Add an issue in this project's issue tracker to let me know of any problems you find, or questions you may have.
Copyright
Copyright 2016 by Stijn de Witt. Some rights reserved.