dejavu-call
Version:
Intercepts a function call and stores the result with the given context. In calls that have the same parameters, it will return the stored result. The proposal is to reduce the response time for processing heavy functions, but it always has the same resul
17 lines (11 loc) • 402 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _crypto = require('crypto');
var _crypto2 = _interopRequireDefault(_crypto);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var sha256 = function sha256(data) {
return _crypto2.default.createHash('sha256').update(data).digest('hex');
};
exports.default = sha256;