bare-bundle-id
v1.0.2
Published
Construct a unique ID for a bundle
Readme
bare-bundle-id
Construct a unique ID for a bundle.
npm i bare-bundle-idUsage
const Bundle = require('bare-bundle')
const id = require('bare-bundle-id')
const bundle = new Bundle()
.write('/foo.js', "module.exports = require('./bar')", {
main: true,
imports: {
'./bar': '/bar.js'
}
})
.write('/bar.js', 'module.exports = 42')
bundle.id = id(bundle).toString('hex')
// 33824862...API
const buffer = id(bundle)
License
Apache-2.0
