partition-into:将数组划分为所需的n个数字集和其余值

时间:2021-05-13 06:33:05
【文件属性】:
文件名称:partition-into:将数组划分为所需的n个数字集和其余值
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-13 06:33:05
JavaScript 分割成 将数组划分为所需的n个数字集和其余值 安装 $ npm install --save partition-into 用法 var partitionInto = require ( 'partition-into' ) ; partitionInto ( [ 1 , 2 , 3 , 4 , 5 ] , 3 ) ; //=> [[1, 2, 3], [4, 5]] partitionInto ( [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] , 5 ) ; //=> [[1, 2, 3, 4, 5], [6, 7]] partitionInto ( [ 1 , 2 , 3 , 4 , 5 ] ) ; //=> [ [ ] ] 原料药 partitionInto(input_obj,num) input_obj 必需的类型: Array 输入一维数组 数 必需的类型:
【文件预览】:
partition-into-master
----.gitignore(13B)
----.gitattributes(12B)
----.jshintrc(170B)
----package.json(665B)
----readme.md(948B)
----index.js(601B)
----test.js(579B)
----.travis.yml(72B)
----.editorconfig(231B)
----license(1KB)

网友评论