随机道具
随机调整对象中属性的顺序
npm install shuffle-props
用法
var shuffleProps = require ( 'shuffle-props' ) ;
var obj = { a : 1 , b : 2 : c : 3 } ;
var shuffledObj = shuffleProps ( obj ) ;
console . log ( shuffledObj ) ; // { b: 2, a: 1, c: 3} or something like that
评论0
最新资源