【文件属性】:
文件名称:permutation:验证一个值是否是一个排列
文件大小:9KB
文件格式:ZIP
更新时间:2021-06-23 12:36:31
JavaScript
排列
验证值是否为排列。
安装
$ npm install validate.io-permutation
要在浏览器中使用,请使用 。
用法
var isPermutation = require ( 'validate.io-permutation' ) ;
isPermutation( arr, value )
验证value是否为array排列。 第一个参数定义可以排列的值列表。 该列表array不必是唯一的,可能包含相同的反复引用object 。
var arr = [ 1 , 2 , 3 ] ,
value = [ 2 , 3 , 1 ] ;
var bool = isPermutation ( arr , value ) ;
// returns true
例子
var isPermutation = require ( 'validate.io-permut
【文件预览】:
permutation-master
----.jshintrc(1KB)
----.gitignore(711B)
----package.json(1KB)
----Makefile(2KB)
----.travis.yml(73B)
----LICENSE(1KB)
----examples()
--------index.js(269B)
----.jshintignore(118B)
----README.md(3KB)
----lib()
--------index.js(1KB)
----TODO.md(12B)
----.npmignore(498B)
----.gitattributes(12B)
----test()
--------test.js(2KB)
----.editorconfig(169B)