🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

evalify

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
e

evalify

browserify transform to eval modules before exporting

2.1.0
latest
65

Supply Chain Security

100

Vulnerability

83

Quality

76

Maintenance

100

License

Version published
Weekly downloads
11
37.5%
Maintainers
1
Weekly downloads
 
Created
Issues
2

evalify

browserify transform to eval modules before exporting.

npm i --save evalify

stolen from mmckegg/web-audio-school.

example

given a module:

// cats.js
var catNames = require('cat-names')

var cats = []
for (var i = 0; i < 10; i++) {
  cats.push(catNames.random())
}

module.exports = cats

compile using browserify using -t [ evalify -f '**/cats.js' ]

browserify ./cats.js -t [ evalify -f '**/cats.js' ]

cats.js file is transformed to

module.exports = ["Cali","Rascal","Jack","Jasmine","Kitty","Nala","Jack","Cookie","Jack","Buster"]

usage

evalify is a browserify transform with the following options:

  • files (f): a list of minimatch paths to determine whether to evaluate a given file.

using the browserify cli:

browserify entry.js -t [ evalify -f '**/to-eval.js' ]

using your package.json:

"browserify": {
  "transform": [
    ["evalify", { files: [ "**/to-eval.js" ] } ]
  ]
}

license

ISC

FAQs

Package last updated on 10 Feb 2017

Did you know?

Socket

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.

Install

Related posts