🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

machinepack-arrays

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-arrays - npm Package Compare versions

Comparing version

to
5.0.1

19

machines/sample.js

@@ -7,3 +7,3 @@ module.exports = {

description: 'Randomly select one item from an array',
description: 'Randomly select one item from an array.',

@@ -18,3 +18,3 @@

example: ['*'],
description: 'The array of items to pick from',
description: 'The array of items to pick from.',
required: true

@@ -36,16 +36,3 @@ }

variableName: 'randomItem',
getExample: function(inputs, env) {
var _ = env._;
// If the array is not available yet, or none of its items are, then
// the best we can do is guarantee that this result will be some sort
// of JSON-compatible value.
if (_.isUndefined(inputs.array) || inputs.array.length < 1) {
return '*';
}
// If the array is available and has one item, we can just borrow the
// first item to build our example.
return inputs.array[0];
},
itemOf: 'array'
}

@@ -52,0 +39,0 @@

2

package.json
{
"name": "machinepack-arrays",
"version": "5.0.0",
"version": "5.0.1",
"description": "Work with arrays.",

@@ -5,0 +5,0 @@ "scripts": {