is-browserify-bundle
v1.0.1
Published
a naive test to see if JS source is a browserify bundle
Downloads
10
Maintainers
Readme
is-browserify-bundle
A very naive test to see if JS source is a browserify bundle. If you have suggestions for more robustness please PR or open an issue.
var isBundle = require('is-browserify-bundle')
var fs = require('fs')
var file = fs.readFileSync(__dirname + '/bundle.js')
console.log(isBundle(file))
Usage
bool = isBundle(src)
Returns true if the src
Buffer or string is assumed to be a browserify bundle. This does a naive check for a throws clause that exists in many versions of the browserify bundle wrapper.
License
MIT, see LICENSE.md for details.