涵盖 dom、dom、esnext 的一些垫片
文件大小
47KB
安装
npm install @lljj/polyfill
dom
修复了如下API
- children
- dateset
- matches
- classlist
- closest
bom
修复了如下API
- location.origin
- requestAnimationFrame
esnext
async await regeneratorRuntime 方法定义
- regenerator-runtime/runtime
沿用 babel 的 core-js 垫片,导出了如下API:
- es6.object.keys
- object.assign
- function.name
- parse-int
- parse-float
- number.is-finite
- number.is-integer
- number.is-nan
- number.max-safe-integer
- number.min-safe-integer
- number.parse-float
- number.parse-int
- string.trim
- string.code-point-at
- string.ends-with
- string.includes
- string.repeat
- string.starts-with
- date.now
- date.to-iso-string
- date.to-string
- array.is-array
- array.from
- array.index-of
- array.last-index-of
- array.fill
- array.find
- array.find-index
- promise
- set
- weak-set
- typed.array-buffer
- typed.int8-array
- typed.uint8-array
- es7.array.includes
- es7.string.trim-left
- es7.string.trim-right
- es7.object.values
- es7.object.entries
- es7.global
- es7.promise.finally
- es7.promise.try