【文件属性】:
文件名称:shuffle-promise:随机排列数组
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-03 04:08:20
JavaScript
随机承诺
简单的数组随机化有希望。
安装
$ npm install --save shuffle-promise
用法
var shufflePromise = require ( 'shuffle-promise' ) ;
var srcArray = [ 1 , 2 , 'Foo' , { bar : 1 } ] ;
shufflePromise ( srcArray )
. then ( function ( shuffledArray ) {
// ['Foo', 2, {bar: 1}, 1] Yay!
} )
. catch ( function ( error ) {
// Catch errors
} ) ;
执照
麻省理工学院:copyright:
【文件预览】:
shuffle-promise-master
----.eslintrc(186B)
----.travis.yml(68B)
----LICENSE(1KB)
----test()
--------test.js(2KB)
----README.md(570B)
----.editorconfig(100B)
----.gitignore(536B)
----index.js(240B)
----package.json(708B)