UNPKG

dd-trace

Version:

Datadog APM tracing client for JavaScript

17 lines (12 loc) 249 B
'use strict' const memoize = func => { const cache = {} const memoized = function (key) { if (!cache[key]) { cache[key] = func.apply(this, arguments) } return cache[key] } return memoized } module.exports = { memoize }