UNPKG

static-fs

Version:

A static filesystem to bundle files and read them using NodeJS

12 lines (9 loc) 282 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateHash = calculateHash; var _crypto = require("crypto"); function calculateHash(content) { return (0, _crypto.createHash)('sha256').update(JSON.stringify(content)).digest('base64'); }