@zohodesk/client_build_tool
Version:
A CLI tool to build web applications and client libraries
24 lines (19 loc) • 437 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createHash = createHash;
var _webpack = require("webpack");
function createHash({
outputOptions,
content
}) {
const {
hashFunction,
hashDigest,
hashDigestLength
} = outputOptions;
const hash = _webpack.util.createHash(hashFunction);
hash.update(content);
return hash.digest(hashDigest).substring(0, hashDigestLength);
}