Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 5.0.0 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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc