Remove references of removed random.some in favour of random.subset
This commit is contained in:
parent
891fb2bb60
commit
cecc7b0f5e
2 changed files with 2 additions and 2 deletions
|
@ -140,7 +140,7 @@ var random = { // eslint-disable-line no-unused-vars
|
|||
subset: function (list, limit) {
|
||||
if (!(list instanceof Array)) {
|
||||
logger.traceback()
|
||||
throw new TypeError('random.some() received a non-array type: \'' + list + '\'')
|
||||
throw new TypeError('random.subset() received a non-array type: \'' + list + '\'')
|
||||
}
|
||||
if (typeof limit !== 'number') {
|
||||
limit = this.number(list.length + 1)
|
||||
|
|
|
@ -52,7 +52,7 @@ utils.script = {
|
|||
},
|
||||
makeRandomOptions: function (baseObject) {
|
||||
let o = {}
|
||||
let unique = random.some(Object.keys(baseObject))
|
||||
let unique = random.subset(Object.keys(baseObject))
|
||||
for (let i = 0; i < unique.length; i++) {
|
||||
o[unique[i]] = random.pick(baseObject[unique[i]])
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue