From daaf2f5883486749887083eff9be57f521abb0ff Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 10 Dec 2020 01:38:12 -0500 Subject: [PATCH] missing declarations for previous --- assets/js/vendor/values-entries.polyfill.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/js/vendor/values-entries.polyfill.js b/assets/js/vendor/values-entries.polyfill.js index 6ff2a000..c8896e2f 100644 --- a/assets/js/vendor/values-entries.polyfill.js +++ b/assets/js/vendor/values-entries.polyfill.js @@ -1,13 +1,17 @@ // object-values | MIT | github.com/tc39/proposal-object-values-entries +const reduce = Function.bind.call(Function.call, Array.prototype.reduce); +const isEnumerable = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable); +const concat = Function.bind.call(Function.call, Array.prototype.concat); + if (!Object.values) { Object.values = function values(O) { - return reduce(keys(O), (v, k) => concat(v, typeof k === 'string' && isEnumerable(O, k) ? [O[k]] : []), []); + return reduce(Object.keys(O), (v, k) => concat(v, typeof k === 'string' && isEnumerable(O, k) ? [O[k]] : []), []); }; } if (!Object.entries) { Object.entries = function entries(O) { - return reduce(keys(O), (e, k) => concat(e, typeof k === 'string' && isEnumerable(O, k) ? [[k, O[k]]] : []), []); + return reduce(Object.keys(O), (e, k) => concat(e, typeof k === 'string' && isEnumerable(O, k) ? [[k, O[k]]] : []), []); }; }