unique-random-array:从数组中获取连续的唯一元素

时间:2021-04-30 20:37:53
【文件属性】:
文件名称:unique-random-array:从数组中获取连续的唯一元素
文件大小:5KB
文件格式:ZIP
更新时间:2021-04-30 20:37:53
JavaScript 唯一随机数组 从数组中获取连续的唯一元素 对于不需要连续两次显示同一张幻灯片的幻灯片显示很有用。 安装 $ npm install unique-random-array 用法 import uniqueRandomArray from 'unique-random-array' ; const random = uniqueRandomArray ( [ 1 , 2 , 3 , 4 ] ) ; console . log ( random ( ) , random ( ) , random ( ) , random ( ) ) ; //=> 4 2 1 4 原料药 uniqueRandomArray(array) 返回一个函数,该函数在被调用时将返回一个与前一个元素永不相同的随机元素。 大批 类型: unknown[] 有关的 生成连续唯一的随机数 生成一个随机整数 产生一个随机的浮点
【文件预览】:
unique-random-array-main
----.gitignore(23B)
----.github()
--------workflows()
----.gitattributes(19B)
----package.json(806B)
----index.test-d.ts(206B)
----readme.md(1KB)
----index.js(178B)
----index.d.ts(428B)
----test.js(284B)
----.editorconfig(175B)
----license(1KB)
----.npmrc(19B)

网友评论