UNPKG

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

9 lines (6 loc) 139 B
import crypto from 'crypto' const sha256 = data => crypto .createHash('sha256') .update(data) .digest('hex') export default sha256