@acai/collections 中文文档教程
Açaí's Framework collections
一组满足您日常需求的有用集合,作为一个模块开发阿萨伊框架。
Installation
npm
npm i --save @acai/collections
yarn
yarn add @acai/collections
Collection types
Default
这用作增强数组,以显示集合的功能。
Group
这是一种特殊类型,每个方法调用都将是一个组调用,请参见下面的示例:
let normalarray = [/* items */];
let groupcollection = new Group([/* items */]);
groupcollection.methodCall();
//is the same as
for (let i = 0; i < normalarray.length;i++) {
normalarray[i].methodCall();
}
Paginatable
Açaí's Framework collections
A group of useful collections to your everyday needs, developed as a module for the Açaí framework.
Installation
npm
npm i --save @acai/collections
yarn
yarn add @acai/collections
Collection types
Default
This works as a enhanced array, to show the capabilities of the collection.
Group
This is a special type, every method call is going to be a group call, see the example below:
let normalarray = [/* items */];
let groupcollection = new Group([/* items */]);
groupcollection.methodCall();
//is the same as
for (let i = 0; i < normalarray.length;i++) {
normalarray[i].methodCall();
}
Paginatable
更多