www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

polyfill.js (455B)


      1 if (!Object.values) {
      2 	const reduce = Function.bind.call(Function.call, Array.prototype.reduce);
      3 	const isEnumerable = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable);
      4 	const concat = Function.bind.call(Function.call, Array.prototype.concat);
      5 	const keys = Reflect.ownKeys;
      6 	
      7 	Object.values = function values(O) {
      8 		return reduce(keys(O), (v, k) => concat(v, typeof k === 'string' && isEnumerable(O, k) ? [O[k]] : []), []);
      9 	};
     10 }