# core-js
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.svg)](https://travis-ci.org/zloirock/core-js) [![devDependency status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js?type=dev)
#### As advertising: the author is looking for a good job :)
Modular standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [promises](#ecmascript-6-promise), [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), iterators, [typed arrays](#ecmascript-6-typed-arrays), [ECMAScript 7+ proposals](#ecmascript-7-proposals), [setImmediate](#setimmediate), etc. Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only needed features or use it without global namespace pollution.
[*Example*](http://goo.gl/a2xexl):
```js
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
```
[*Without global namespace pollution*](http://goo.gl/paOHb0):
```js
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
```
### Index
- [Usage](#usage)
- [Basic](#basic)
- [CommonJS](#commonjs)
- [Custom build](#custom-build-from-the-command-line)
- [Supported engines](#supported-engines)
- [Features](#features)
- [ECMAScript 5](#ecmascript-5)
- [ECMAScript 6](#ecmascript-6)
- [ECMAScript 6: Object](#ecmascript-6-object)
- [ECMAScript 6: Function](#ecmascript-6-function)
- [ECMAScript 6: Array](#ecmascript-6-array)
- [ECMAScript 6: String](#ecmascript-6-string)
- [ECMAScript 6: RegExp](#ecmascript-6-regexp)
- [ECMAScript 6: Number](#ecmascript-6-number)
- [ECMAScript 6: Math](#ecmascript-6-math)
- [ECMAScript 6: Date](#ecmascript-6-date)
- [ECMAScript 6: Promise](#ecmascript-6-promise)
- [ECMAScript 6: Symbol](#ecmascript-6-symbol)
- [ECMAScript 6: Collections](#ecmascript-6-collections)
- [ECMAScript 6: Typed Arrays](#ecmascript-6-typed-arrays)
- [ECMAScript 6: Reflect](#ecmascript-6-reflect)
- [ECMAScript 7+ proposals](#ecmascript-7-proposals)
- [stage 4 proposals](#stage-4-proposals)
- [stage 3 proposals](#stage-3-proposals)
- [stage 2 proposals](#stage-2-proposals)
- [stage 1 proposals](#stage-1-proposals)
- [stage 0 proposals](#stage-0-proposals)
- [pre-stage 0 proposals](#pre-stage-0-proposals)
- [Web standards](#web-standards)
- [setTimeout / setInterval](#settimeout--setinterval)
- [setImmediate](#setimmediate)
- [iterable DOM collections](#iterable-dom-collections)
- [Non-standard](#non-standard)
- [Object](#object)
- [Dict](#dict)
- [partial application](#partial-application)
- [Number Iterator](#number-iterator)
- [escaping strings](#escaping-strings)
- [delay](#delay)
- [helpers for iterators](#helpers-for-iterators)
- [Missing polyfills](#missing-polyfills)
- [Changelog](./CHANGELOG.md)
## Usage
### Basic
```
npm i core-js
bower install core.js
```
```js
// Default
require('core-js');
// Without global namespace pollution
var core = require('core-js/library');
// Shim only
require('core-js/shim');
```
If you need complete build for browser, use builds from `core-js/client` path:
* [default](https://raw.githack.com/zloirock/core-js/v2.6.5/client/core.min.js): Includes all features, standard and non-standard.
* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.5/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)).
* [shim only](https://raw.githack.com/zloirock/core-js/v2.6.5/client/shim.min.js): Only includes the standard methods.
Warning: if you use `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise, conflicts may occur.
### CommonJS
You can require only needed modules.
```js
require('core-js/fn/set');
require('core-js/fn/array/from');
require('core-js/fn/array/find-index');
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2
// or, w/o global namespace pollution:
var Set = require('core-js/library/fn/set');
var from = require('core-js/library/fn/array/from');
var findIndex = require('core-js/library/fn/array/find-index');
from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
findIndex([1, 2, NaN, 3, 4], isNaN); // => 2
```
Available entry points for methods / constructors, as above examples, and namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features.
##### Caveats when using CommonJS API:
* `modules` path is internal API, does not inject all required dependencies and can be changed in minor or patch releases. Use it only for a custom build and / or if you know what are you doing.
* `core-js` is extremely modular and uses a lot of very tiny modules, because of that for usage in browsers bundle up `core-js` instead of usage loader for each file, otherwise, you will have hundreds of requests.
#### CommonJS and prototype methods without global namespace pollution
In the `library` version, we can't pollute prototypes of native constructors. Because of that, prototype methods transformed to static methods like in examples above. `babel` `runtime` transformer also can't transform them. But with transpilers we can use one more trick - [bind operator and virtual methods](https://github.com/zenparsing/es-function-bind). Special for that, available `/virtual/` entry points. Example:
```js
import fill from 'core-js/library/fn/array/virtual/fill';
import findIndex from 'core-js/library/fn/array/virtual/find-index';
Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4
// or
import {fill, findIndex} from 'core-js/library/fn/array/virtual';
Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4
```
### Custom build (from the command-line)
```
npm i core-js && cd node_modules/core-js && npm i
npm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify
```
Where `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name.
Available namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`.
### Custom build (from external scripts)
[`core-js-builder`](https://www.npmjs.com/package/core-js-builder) package exports a function that takes the same parameters as the `build` target from the previous section. This will conditionally include or exclude certain parts of `core-js`:
```js
require('core-js-builder')({
modules: ['es6', 'core.dict'], // modules / namespaces
blacklist: ['es6.reflect'], /
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于vue的家具商城的设计与实现;在本项目中运用了vue,原生js,axios,div+css的相关知识实现用户注册登录,通过调取接口文档来实现数据的展示;实现列表页的展示;通过vue路由传参来传递参数;实现详情页的数据调取和展示;通过props以及emit来实现父子组件之间的传值;通过this.$eventBus.$emit和this.$eventBus.$on来实现非父子组件之间的传值;实现事件派发和事件监听;
资源推荐
资源详情
资源评论
收起资源包目录
基于vue的家具商城的设计与实现 (26676个子文件)
01c0f8a6b50c47e345271dab9a4e35a0ae9acd 479B
025f7241105dc58c379787998a843a46d05078 38KB
03ea5b3aff553442df7f1bae6144c6c7090a37 38KB
0458264fbfba2ccc67b89bbea6d1c2a6e0b3b5 1KB
059c6a8a449975375a767d5abfcc28c42a3135 106B
05eeffbc267c086767863f0c1a337e036d0808 270B
07d6a5652179ab517aa938b2a452a30196c67b 154B
0a44f4509f814ce764815f788bd7cec60e1fbf9dafca0e5b71297e092cd1073a63ff0b4b08823bd4c608974d581cf2e885045254313e46ab613e30bffa86 253KB
0d8362be7c32b0dda31980b4e33f039c09d6c5 55B
0da5c972813431ec0932f11f0827e72a4a83c3 11KB
0ef04c4503e68bf3099decee5a7bcbde2cdffe 152B
0f570ce3ef298e347c607605faafdd90d1d033 414B
sshpk-conv.1 4KB
he.1 3KB
jsesc.1 3KB
jsesc.1 3KB
jsesc.1 3KB
sshpk-sign.1 2KB
sshpk-verify.1 2KB
cssesc.1 2KB
cssesc.1 2KB
107fa065e7bd43d037607cc02af6479597c338 527B
10c6a45035b6573151ff6196e4bdea78deb75d 53B
133c4e4e61e9504c348d56cbf45120ad71e7db 480B
1359862941325a32e22392a4011f3414376511 3KB
13b6c1a395ceb2af056c790776e4f382c30f68 3KB
13fc79abd65c16f4780196165d0478dc40eca8 6KB
14b718834931b7152a619d056a0dfbf260ba93 123B
1b2f4a9c1786a589e2308751e209b89dfdf81b 78B
1c03d7e44ae545030536b94b39b4a910a5888b 396B
22eaf1edadb4920a46831a3d184fd6d91f3af4 348B
236c271bd3e62491aa8e88d49cafd9c6c032ea 2KB
236e38402f93e2c2386c7ec473afc734493b56 1KB
2572c1e34c4c3b9002273e6d910668d1cdcb1b 3KB
25a3bebf80c06fe47e66ed7778be72c84b45dd 107KB
287f629c894459b5e567b2b9f6998d0a0a1510 116B
29f187cf4d223ccadbba94c822e942925a5b45 108B
2edae2768f4d38ea5ba48e9ac9f582bb6dc524 270B
30bc53199c37a42fe7046dce8ea0fe379d57a373d45ef9bc8268369dd2967d7b1fbeb86475f9a5f339fefb5c48fbd9ad99a45cedc58ec98d66d315942487 253KB
32b900b0d9cded9061054d4cb073eacd843b00 272B
347b2d64cf3a33d2081627523f1ee6f4d0ad68 479B
358701507009842a5a121cb795cb2beb2b0ef0 414B
371eaf4eeb1b751068adaf0719b8df8e5e1e76 480B
375879e6ccb6f4dde04368ad0e1b8d9206651c 2KB
3a1ad63a699cf7a86d740d3359be9014a56fc3 274B
3be51a7472c6d5fb762cc2433c0f8a3e912413 1KB
3c6b3a923eef69815fb412c923cfa6b04bdcda 11KB
419ee84f7bb5a97e9c95670b412af6fba9087d 201B
4276cc771e55df62f1f51c86418e4be1c2febf 377B
42ee884fd9eb65836cafa18c8f4e10b905c846 270B
431d0def467f4a2febe87750776978fad63bf6 6KB
46d02f1bb7c27dd71d86fef9e3a4d49ad79a11 229B
477ff63538e2470c07c8d9276d3dc1c4f4a996 84B
49a394c6136d340df65ec6928fae9c91419e8f 38KB
4dd69111a42d3cc6cdab955f3c5182d82c04a4 7.98MB
4e3742404074f10f9c33d5e2058ffb0f4461b2 1KB
507cb0b31afbd986f58f76a12db323382949c339024a57b0f072e46ba74749ef18551bb7f84282dec91b57a20a50ab21ecbf161d9af1505f9642657b6c71 253KB
5156e18f8c4c2ae6b81d098d7ad07004bdff46 1KB
543f9cf2283e8a6f12163e0c0c2be9c31164d1 162B
550eb4bdedd496a2e637489d93abafa260e3ba 11KB
5510e1375c42d510df29d27e7792ae84b6e044 271B
55db77cea3a30094678d0c1f475d0daf6256c2 3KB
56d21cdc75e855ba24e9a5c0eb2b7f9e374c1fc8aafbcab05c7b4438887da7f9f56aec89b9e2f6086949da161abb0c4af4d5785ed09e7e5b6dee6deb8dc3 253KB
57d25dd5e6fc47cfeb9674f5c54d064195cdbec66f2422e46b7b0137feae 1KB
57fa7ed10ba3c0f6a49c75da32f5f0b4858188 193B
58c126d0590e93f23bdcc0242a7a873b60e9dc 895B
59fa55b6cc5575dd0f32ffa4c14e8fb6e13577 108B
5aabc50c2dd0413f410f06d11e2f0798e05c69 38KB
5e6631928dca2f51224e61a3861cc88fa2b74e 157B
5f9788b941b2cb0c8ba083e1f3d679f9855c7a 163B
60bce931dee721a2f192867bd1dd3b57d8397b 207B
618594baee7a299d8d67bbb90b486b52917bc6 2KB
6215096667b3594d0e3b48ee770a67d3f3f778 207B
63ea959a8d1f5a4585f9ebb3fcee3cdc979c0956d73c6c3004da74f87e4e 1KB
6563d3830e62358b90e365abcada684277cdfa 222B
657fa162ffe8c28a30d5c0ac13b7120a4a4264 415B
674a846e779974462e3a063d3dcad94154896c 151B
68e8c7b7d495013383da4b2b3e7f4e8a8717d9 1KB
6c90f00ac197035a912538c544b09534b52f7d 1KB
6cbeff15339f93af6475be48eebfc9567d2745 376B
6d2645b3b59d462b58b12a3fc47bc895820751 159B
6f52f9854fa0da10ae55312445fb12f93d6d34 3KB
6f8676387dcc90b668284c0ea9e8f85722f024 201B
711bc3dda230558b3a74f95afebb8d38d7e297 271B
7374ec0d8087ed4f106384569d2b99f9c16e01 806B
75a38937dfd730d18327531aec7557affaf058 168B
76c91cdf413a830d513097cabb3ac9a16b6be8 11KB
78d51a98f2da1a84feadd8e1f49342998f8f44 271B
79347ba469ef6f718995a7e9372bbd7df20b78 184B
799d6b0c349bc48c2faacc79b1b351d2991284 376B
7ac80274652956cd3c933cd2af9230ce06edfa 161B
7c6204859de609856d09ee10f5b78fa1069422 681B
7c6bd3a1b5bbb14bef7c0edd0e9be4ba28e7c8 376B
7d444b9b5cb532b52fe526362d8fdd4406677a 162B
7d6504f93de7d49fcd39966d0cb402a5720a2b 38KB
7f29d1d8a7b7dddc44bc0fbc947d419e7b6d6cf4c20b047db9fcb9bea81f 1KB
7f976b40418f6f57bbae63d38b0ffe7e212cf4 513B
80efcc178bcd304488bfa0ee20a45cae72e92e 761B
83f897c7c65b3551ab2b6faf98a18e4f996aa0 108B
84e64f7458ff04ef85811e46d0d365d97026a8 376B
共 26676 条
- 1
- 2
- 3
- 4
- 5
- 6
- 267
资源评论
风~蒲公英
- 粉丝: 20
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 程序编程心得体会PPT
- 基于springboot的信息化在线教学平台的设计与实现源码(java毕业设计完整源码+LW).zip
- WordPressp安装插件无法连接到FTP服务器
- 大学编程实训心得体会PPT.pptx
- 整车性能目标书,汽车性能目标书,十六个性能模块目标定义模板,包含燃油车、混动车型及纯电动车型 对于整车性能的集成开发具有较高的参考价值
- 2-金山打字通V2016-经典打字手势练习启蒙软件
- 基于springboot的厨艺交流平台的设计与实现代码源码(java毕业设计完整源码+LW).zip
- PMSG并网直流微网 原理:外环采用电压环,稳定直流母线电压,电流采用电流环
- 基于springboot的大型商场应急预案管理系统源码(java毕业设计完整源码+LW).zip
- 2-强力卸载工具Uninstall Tool 3.5.6
- 工业物联网监控平台可视化java项目springboot开发iot二次开发源 SpringBoot物联网风电监测系统源码 统源码 iot物联网风电能源电场监控系 基于SpringBoot的物联网系统
- “创意图库”:图片素材网站系统的用户体验设计
- 基于springboot的校园社团信息管理源码(java毕业设计完整源码+LW).zip
- 网件R8000刷梅林X7.9.1后软件中心版本00 不能下载插件的解决方法
- OpencvSharp资料,采用C#加Winform编写,包含接近50个Demo,直接运行即可 例程包含:模板匹配、边缘识别、人脸识别,灰度变化、标定等
- 2024跨年烟花代码html/烟花代码大全html/跨年烟花源代码html(带音效)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功