UNPKG

paypal-custom-sdk

Version:

a minimalistic paypal sdk for custom integrations

14 lines (13 loc) 340 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const withSingleton = (fn) => { const memo = {}; return (...args) => { const key = JSON.stringify(args); if (!memo[key]) { memo[key] = fn(...args); } return memo[key]; }; }; exports.default = withSingleton;