react-period-of-stay-input
Version:
React.js component for entering a period of stay in a hotel: check-in + check-out date
1 lines • 2.7 kB
JSON
{"id":"../node_modules/intl-format-cache/lib/memoizer.js","dependencies":[{"name":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-format-cache/package.json","includedInParent":true,"mtime":1533713806935},{"name":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/package.json","includedInParent":true,"mtime":1534141269544},{"name":"./es5","loc":{"line":10,"column":24},"parent":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-format-cache/lib/memoizer.js","resolved":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-format-cache/lib/es5.js"}],"generated":{"js":"/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jshint esnext: true */\n\n\"use strict\";\nvar src$es5$$ = require(\"./es5\");\nexports[\"default\"] = createFormatCache;\n\n// -----------------------------------------------------------------------------\n\nfunction createFormatCache(FormatConstructor) {\n var cache = src$es5$$.objCreate(null);\n\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var cacheId = getCacheId(args);\n var format = cacheId && cache[cacheId];\n\n if (!format) {\n format = new (src$es5$$.bind.apply(FormatConstructor, [null].concat(args)))();\n\n if (cacheId) {\n cache[cacheId] = format;\n }\n }\n\n return format;\n };\n}\n\n// -- Utilities ----------------------------------------------------------------\n\nfunction getCacheId(inputs) {\n // When JSON is not available in the runtime, we will not create a cache id.\n if (typeof JSON === 'undefined') { return; }\n\n var cacheId = [];\n\n var i, len, input;\n\n for (i = 0, len = inputs.length; i < len; i += 1) {\n input = inputs[i];\n\n if (input && typeof input === 'object') {\n cacheId.push(orderedProps(input));\n } else {\n cacheId.push(input);\n }\n }\n\n return JSON.stringify(cacheId);\n}\n\nfunction orderedProps(obj) {\n var props = [],\n keys = [];\n\n var key, i, len, prop;\n\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n\n var orderedKeys = keys.sort();\n\n for (i = 0, len = orderedKeys.length; i < len; i += 1) {\n key = orderedKeys[i];\n prop = {};\n\n prop[key] = obj[key];\n props[i] = prop;\n }\n\n return props;\n}\n\n//# sourceMappingURL=memoizer.js.map","map":null},"hash":"07a2457176de5a1c7ba7f524d42775dc","cacheData":{"env":{}}}