0.9.0 • Published 6 years ago

pkgeval v0.9.0

Weekly downloads
6
License
CC-BY-4.0
Repository
github
Last release
6 years ago

pkgeval 0.9.0

One configuration to rule them all

npm license travis greenkeeper mind BLOWN

.

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.

License

Creative Commons Attribution 4.0 (CC-BY-4.0)

0.9.0

6 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.1.0

8 years ago