Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arnie

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arnie - npm Package Compare versions

Comparing version 0.2.16 to 0.2.17

6

lib/operators/forEach.js

@@ -7,5 +7,5 @@ 'use strict';

var _assign = require('babel-runtime/core-js/object/assign');
var _stringify = require('babel-runtime/core-js/json/stringify');
var _assign2 = _interopRequireDefault(_assign);
var _stringify2 = _interopRequireDefault(_stringify);

@@ -23,3 +23,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var promises = items.map(function (item) {
var payload = (0, _assign2.default)({}, ctx.input);
var payload = JSON.parse((0, _stringify2.default)(ctx.input));
set(payload, inputPath, item);

@@ -26,0 +26,0 @@ return execute(providers, payload, task);

{
"name": "arnie",
"version": "0.2.16",
"version": "0.2.17",
"description": "Action hero for backends",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,3 +11,3 @@ const A = require('../')

(item) => {
const payload = Object.assign({}, ctx.input)
const payload = JSON.parse(JSON.stringify(ctx.input))
set(payload, inputPath, item)

@@ -14,0 +14,0 @@ return execute(providers, payload, task)

@@ -13,6 +13,11 @@ const test = require('tape')

({input}) => {
num += 1
t.pass(`should execute a new function-tree for each item ${num}/2`)
t.assert(!input.localOutput, `should isolate payload of each function-tree ${num}/2`)
return {localOutput: true}
return new Promise((resolve, reject) => {
setTimeout(() => {
num += 1
t.pass(`should execute a new function-tree for iteration ${num}/2`)
t.assert(input.deep.param.value === 1, `should use isolated payload for iteration ${num}/2`)
input.deep.param.value += 1
resolve(input)
}, Math.random() * 300 + 50)
})
}

@@ -22,3 +27,3 @@ ]),

t.assert(num === 2, 'finish iteration before next action')
t.assert(!input.localOutput, 'should use isolated payload')
t.assert(input.deep.param.value === 1, 'should use isolated payload')
}

@@ -28,5 +33,6 @@ ]

const payload = {
list: [1, 2]
list: [1, 2],
deep: {param: {value: 1}}
}
arnie(task, payload).catch(console.error)
})
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