【文件属性】:
文件名称:random-array:用随机数创建数组
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-24 21:56:44
JavaScript
随机数组
生成随机数数组
安装
npm install random-array
用法
var random = require ( 'random-array' ) ;
//Generate array of size 10 between 1 and 10
random ( 1 , 10 ) . oned ( 10 ) ;
//Generate array of width 3 and height 2 between 1 and 10
random ( 1 , 10 ) . twod ( 3 , 2 ) ;
//Generate array of size 10 and round numbers between 1 and 10
random ( 1 , 10 ) . oned ( 10 , { round : true } ) ;
生成随机数数组,而函数为false。
【文件预览】:
random-array-master
----.travis.yml(61B)
----index.js(1KB)
----test.js(1KB)
----package.json(607B)
----LICENSE(1KB)
----.gitignore(13B)
----README.md(1KB)