mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
missing declarations for previous
This commit is contained in:
parent
214173095c
commit
daaf2f5883
1 changed files with 6 additions and 2 deletions
8
assets/js/vendor/values-entries.polyfill.js
vendored
8
assets/js/vendor/values-entries.polyfill.js
vendored
|
@ -1,13 +1,17 @@
|
||||||
// object-values | MIT | github.com/tc39/proposal-object-values-entries
|
// 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) {
|
if (!Object.values) {
|
||||||
Object.values = function values(O) {
|
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) {
|
if (!Object.entries) {
|
||||||
Object.entries = function entries(O) {
|
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]]] : []), []);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue