# core-js
[](#raising-funds) [](#raising-funds) [](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://www.npmjs.com/package/core-js) [](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [](https://travis-ci.org/zloirock/core-js) [](https://david-dm.org/zloirock/core-js?type=dev)
## As advertising: the author is looking for a good job :)
## [core-js@3, babel and a look into the future](https://github.com/zloirock/core-js/tree/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md)
## Raising funds
`core-js` isn't backed by a company, so the future of this project depends on you. Become a sponsor or a backer [**on Open Collective**](https://opencollective.com/core-js) or [**on Patreon**](https://www.patreon.com/zloirock) if you are interested in `core-js`.
---
<a href="https://opencollective.com/core-js/sponsor/0/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/0/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/1/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/1/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/2/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/2/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/3/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/3/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/4/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/4/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/5/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/5/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/6/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/6/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/7/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/7/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/8/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/8/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/9/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/9/avatar.svg"></a>
---
<a href="https://opencollective.com/core-js#backers" target="_blank"><img src="https://opencollective.com/core-js/backers.svg?width=890"></a>
---
**It's documentation for obsolete `core-js@2`. If you looking documentation for actual `core-js` version, please, check [this branch](https://github.com/zloirock/core-js/tree/master).**
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.10/client/core.min.js): Includes all features, standard and non-standard.
* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.10/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.10/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 `Arra
project-xczx2-portal-vue-ts.zip
需积分: 0 80 浏览量
更新于2023-06-04
收藏 57.08MB ZIP 举报
标题 "project-xczx2-portal-vue-ts.zip" 暗示这是一个使用 Vue.js 框架,并结合 TypeScript 开发的项目。Vue.js 是一个轻量级的前端JavaScript框架,以其灵活性、易用性和高性能著称。TypeScript是JavaScript的一个超集,增加了静态类型检查和现代化的开发功能,提升了代码的可维护性和开发效率。
描述中提到的 "project-xczx2-portal-vue-ts.zip" 与标题一致,表明这个压缩包包含了一个名为 "project-xczx2-portal" 的项目,该项目使用 Vue.js 和 TypeScript 技术栈构建。"portal" 通常指的是一个入口或聚合点,可能是企业或组织的信息门户,用于展示各种信息和服务。
在没有具体文件列表的情况下,我们可以推测压缩包可能包含以下关键组成部分:
1. **package.json**:项目的核心配置文件,定义了项目的依赖和脚本。
2. **src** 目录:源代码存放的地方,通常包含组件(components)、路由(router)、服务(services)、样式(styles)等子目录。
3. **tsconfig.json**:TypeScript 的配置文件,定义了编译选项和规则。
4. **vue.config.js**:Vue CLI 的配置文件,允许自定义构建设置。
5. **public** 目录:存放静态资源,如HTML索引文件、图标等。
6. **main.ts**:应用的主入口文件,初始化Vue实例。
7. **App.vue**:应用的根组件。
8. **index.html**:Web应用的起点,Vue会挂载到此文件的`<div id="app">`元素上。
9. **router** 目录:包含应用的路由配置,管理页面间的导航。
10. **components** 目录:包含可复用的Vue组件。
11. **store**(如果使用Vuex):状态管理仓库,处理应用的状态。
Vue.js 知识点:
- **单文件组件(Single File Components, SFCs)**:Vue的组件定义在一个`.vue`文件中,包含模板、脚本和样式,提高了代码的模块化。
- **响应式系统**:Vue通过数据绑定实现数据的实时更新,当数据变化时,视图自动更新。
- **指令(Directives)**:如`v-if`、`v-for`、`v-bind`等,用于增强HTML元素的行为。
- **组件化**:Vue的核心特性之一,允许开发者将UI拆分成可重用的组件。
- **生命周期钩子函数**:如`created`、`mounted`、`updated`等,用于在组件的不同阶段执行逻辑。
- **插槽(Slots)**:用于组件内容分发,允许父组件向子组件传递动态内容。
TypeScript 知识点:
- **静态类型**:每个变量在声明时都需要指定类型,有助于防止运行时错误。
- **接口(Interfaces)**:定义对象的结构,用于类型检查。
- **泛型**:允许创建可重用的组件和函数,适用于不同类型的参数。
- **枚举(Enums)**:为常量提供更好的类型支持。
- **类型断言**:允许开发者明确指定一个值的类型,有时用于与第三方库交互。
- **装饰器(Decorators)**:元编程工具,可以用于类、属性、方法等,增加附加信息或改变行为。
这个项目可能涉及了Vue.js的路由、状态管理(如Vuex)、以及可能的API交互。在实际开发中,开发者可能还使用了Webpack或Vue CLI进行构建,以及Axios等库来处理HTTP请求。对于初学者,理解并掌握这些技术对于深入学习Vue.js和TypeScript的应用开发至关重要。


西门吹雪分身
- 粉丝: 377
最新资源
- 网络安全(PPT36页)(1).ppt
- 论借助sniffer诊断Linux网络故障.docx
- 商务英语教学中网络的地位.doc
- 在市打击治理电信网络新型违法犯罪联席会议上表态发言三篇.doc
- 2023年大学计算机基础期末考试知识点.doc
- 系统安全预测技术.pptx
- 企业信息化建设的重要性和状况.docx
- 遥感数字图像处理考题整理.doc
- 高校师生同上一堂网络安全课观后感心得感悟5篇.docx
- 企业集团财务结算中心与计算机系统设计与会计操作.doc
- 电话网络系统方案.doc
- 九上下册物理第三节:广播-电视和移动通信公开课教案教学设计课件测试卷练习卷课时同步训练练习公开课教案.ppt
- 图像处理:十一表示描述.ppt
- 什么网站工作总结写的比较好.docx
- 项目管理与招标采购培训重点课程.doc
- 有关信息化银行对账问题的探讨【会计实务操作教程】.pptx