Ponyfill's for some native ES2017+ built-in methods
npm install @futagoza/core-jsThis module contains ponyfill's for some native ES2017+ built-in methods, and are meant to be used with packages on Node.js v6 or higher, but can also be used in the browser via Babel and a package (or if you prefer, _web application_) bundler.
- ES2017
* @futagoza/core-js/object.entries
* @futagoza/core-js/object.values
- Stage 3
* @futagoza/core-js/array.flat
* @futagoza/core-js/array.flatMap
* @futagoza/core-js/object.fromEntries
- Stage 1
* @futagoza/core-js/array.lastIndex
* @futagoza/core-js/array.lastItem
* @futagoza/core-js/math.clamp
* @futagoza/core-js/math.DEG_PER_RAD
* @futagoza/core-js/math.degrees
* @futagoza/core-js/math.fscale
* @futagoza/core-js/math.RAD_PER_DEG
* @futagoza/core-js/math.radians
* @futagoza/core-js/math.scale
Some of the code and/or documentation in these files is based on the following resources:
- https://github.com/es-shims/Array.prototype.flat/
- https://github.com/es-shims/Array.prototype.flatMap/
- https://github.com/rwaldron/proposal-math-extensions/tree/master/reference-implementation
- https://github.com/tc39/proposal-object-values-entries
- https://github.com/es-shims/Object.entries
- https://github.com/tc39/proposal-object-from-entries
- https://github.com/ljharb/es-abstract/
- https://github.com/zloirock/core-js/tree/master/packages/core-js/modules
- https://developer.mozilla.org/
- TypeScript's lib.es6.d.ts file
Copyright © 2018+ Futago-za Ryuu
Released under the MIT License