JavaScript 的模块化标准库 core-js

码农软件 · 软件分类 · 常用JavaScript包 · 2019-04-04 22:59:52

软件介绍

core-js 是babel-polyfill 的底层依赖,通过各种奇技淫巧,用 ES3 实现了大部分的 ES2017 原生标准库,同时还要严格遵循规范。

示例:

Array.from(new Set([1, 2, 3, 2, 1]));          // => [1, 2, 3]
'*'.repeat(10);                                // => '**********'
Promise.resolve(32).then(x => console.log(x)); // => 32
setImmediate(x => console.log(x), 42);         // => 42

没有全域命名空间污染:

var core = require('core-js/library'); // With a modular system, otherwise use global `core`
core.Array.from(new core.Set([1, 2, 3, 2, 1]));     // => [1, 2, 3]
core.String.repeat('*', 10);                        // => '**********'
core.Promise.resolve(32).then(x => console.log(x)); // => 32
core.setImmediate(x => console.log(x), 42);         // => 42

经过测试并支持的平台

  • Chrome 26+

  • Firefox 4+

  • Safari 5+

  • Opera 12+

  • Internet Explorer 6+ (sure, IE8- with ES3 limitations)

  • Edge

  • Android Browser 2.3+

  • iOS Safari 5.1+

  • PhantomJS 1.9 / 2.1

  • NodeJS 0.8+

本文地址:https://www.codercto.com/soft/d/2879.html

Introduction to Programming in Java

Introduction to Programming in Java

Robert Sedgewick、Kevin Wayne / Addison-Wesley / 2007-7-27 / USD 89.00

By emphasizing the application of computer programming not only in success stories in the software industry but also in familiar scenarios in physical and biological science, engineering, and appli......一起来看看 《Introduction to Programming in Java》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具