# 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-devtools-dev下载
共24870个文件
js:13430个
ts:3584个
map:2600个
需积分: 28 90 下载量 169 浏览量
2019-04-08
17:10:56
上传
评论
收藏 38.22MB ZIP 举报
温馨提示
vue-devtools是一款基于chrome游览器的插件,用于调试vue应用,这可以极大地提高我们的调试效率。接下来我们就介绍一下vue-devtools的安装。
资源推荐
资源详情
资源评论
收起资源包目录
vue-devtools-dev下载 (24870个子文件)
069f296fbc0e24622b0f9efb7811311dadb6c6c7275a19d5b2e4a9693580761b6b51e53287687f44b6cbe78e6a7bdaeedd68ab4e1e72dac1679664de569d 2KB
0de391917d271fc3178a344a5d82fa3b7bc0151255bafa86c337a02e4941 1KB
0f717cca13c80fad9b9d22ec94f6ff8c81358f9facfaf087a32a16ed605e77cc461bcca658a11f9a327d10895de31a84aed819ad27aab4c813c26a534b53 29KB
sshpk-conv.1 4KB
he.1 3KB
jsesc.1 3KB
sshpk-sign.1 2KB
sshpk-verify.1 2KB
cssesc.1 2KB
cssesc.1 2KB
2bddbb7b73f2a44426df757d860a672273c59e99859e616edf44aad9a83e 1KB
30fec63f1666553c20488b8c35097052ff7465b1fb9a9419fbbe73cf0bdb2b3186eaaf91882e95ea83284dc6c3230e2fb33bc7a327114aa03225b6624ef9 4KB
374b02cbd2e6b710f4864f7896bd98b000fed0542eca0661fcefe9c83ed47e926e2b10d104dce90ac67dce8f6c9c1ed114e44249ca8d18402e7c3bc183b9 1KB
402552e7ee1263a643e66944830e5a3c9607698e09337d749fd413f9de10 1KB
5d66e1187eb4e9ef851d720b3f88a019c3104a745257a94fa35bca212eb6 1KB
6a115c5a9e3cf5ca4583845ab82a438433d6cf36dd301f0e2947aaff0cb7 1KB
7aa3a55562fa38df013ccd1a803be4708d186a1e04c42cd070d719d42429cd12e858ee1e800605f17ffd991b6c5e683be3466380abf94df49348f8679b90 3KB
94b443a4cc0af495f574e36d4d65e1aedf522897db1d3dffebf43488ceb9 1KB
acorn 301B
acorn 62B
address 692B
ansi-html 2KB
ansi-html 317B
LICENSE.APACHE2 586B
LICENSE.APACHE2 586B
atob 303B
AUTHORS 366B
AUTHORS 217B
AUTHORS 203B
AUTHORS 169B
AUTHORS 152B
autoprefixer 540B
autoprefixer 329B
b3df753ee06bd651461936cb622020d498afaf64bb788cf60d4adbd2c2c681e0d1a331bca512ae0d47c21a04f0779633d3a3941832b051053b6d5592b451 1.1MB
.babelrc 72B
.babelrc 57B
.babelrc 55B
.babelrc 30B
.babelrc 29B
README.md.bak 7KB
BUILD.bazel 1KB
BUILD.bazel 650B
BUILD.bazel 392B
BUILD.bazel 392B
BUILD.bazel 388B
BUILD.bazel 382B
benchmark 692B
range.bnf 619B
browserslist 309B
.browserslistrc 27B
LICENSE.BSD 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
buble 498B
buble 301B
calendar 998B
card 2KB
cat-async 244B
cat-sync 132B
node.cert 1KB
haproxy.cfg 1KB
ChangeLog 10KB
Changelog 7KB
CHANGELOG 2KB
CHANGELOG 1KB
CHANGELOG 465B
LICENSE.closure-compiler 11KB
LICENSE.closure-compiler 11KB
webpack-dev-server.cmd 236B
cross-env-shell.cmd 222B
server-test.cmd 216B
start-test.cmd 216B
start-server-and-test.cmd 216B
cross-env.cmd 210B
autoprefixer.cmd 206B
miller-rabin.cmd 206B
import-local-fixture.cmd 204B
esvalidate.cmd 198B
prettier.cmd 196B
ansi-html.cmd 194B
regjsparser.cmd 192B
uglifyjs.cmd 192B
esparse.cmd 192B
regjsparser.cmd 192B
ps-tree.cmd 192B
webpack-cli.cmd 192B
js-yaml.cmd 192B
sshpk-verify.cmd 192B
webpack.cmd 192B
eslint.cmd 188B
multicast-dns.cmd 188B
sshpk-sign.cmd 188B
sshpk-conv.cmd 188B
terser.cmd 186B
json2dsv.cmd 186B
wait-on.cmd 186B
json2tsv.cmd 186B
共 24870 条
- 1
- 2
- 3
- 4
- 5
- 6
- 249
资源评论
前端菜鸟划水
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功