Simpleness ES5,6 shim for client javascript.
You can use some ES5 or ES6 features in old browsers,like Promise
JSON
Array.prototype.forEach
String.prototyp.repeat
etc.
ES5-shim,ES6-shim are can't decomposed and complicated.
ES-shim is decomposed and simpler and more applied to actual projects.
<script src="es.js"></script>
<script src="array.js"></script> <!-- The Array's ES5,6 features are availabled -->
Array.from
Array.of
Array.prototype.copyWithin
Array.prototype.fill
Array.prototype.find
Array.prototype.findIndex
Array.prototype.keys
Array.prototype.entries
Array.prototype.values
Array.isArray
Array.prototype.every
Array.prototype.filter
Array.prototype.forEach
Array.prototype.indexOf
Array.prototype.lastIndexOf
Array.prototype.map
Array.prototype.some
Array.prototype.reduce
Array.prototype.reduceRight
Array.prototype.unshift
fix bug
Boolean.prototype.toJSON
Date.now
Date.toISOString
Date.toJSON
Function.prototype.bind
Math.acosh
Math.asinh
Math.atanh
Math.cbrt
Math.clz32
Math.cosh
Math.expm1
Math.hypot
Math.log2
Math.log10
Math.log1p
Math.sign
Math.sinh
Math.tanh
Math.trunc
Math.imul
Math.fround
Math.round
fix bug
Number.prototype.toJSON
Number.prototype.toFixed
fix bugNumber.MAX_SAFE_INTEGER
Number.MIN_SAFE_INTEGER
Number.EPSILON
Number.parseInt
Number.parseFloat
Number.isFinite
Number.isNaN
Number.isInteger
Number.isSafeInteger
Regexp.prototype.flags
function shim,not attributes
Object.keys
Object.create
Object.defineProperty
defineProperty
and create
is not a standard implementation,just a basic function imitation.
Object.is
Object.assign
String.prototype.trim
String.prototype.toJSON
String.fromCodePoint
String.raw
String.prototype.codePointAt
String.prototype.repeat
String.prototype.startsWith
String.prototype.endsWith
String.prototype.includes
Promise.prototype.catch
Promise.prototype.then
Promise.reject
Promise.resolve
Promise.race
Promise.all
JSON.parse
JSON.stringify
MIT License