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

nflow

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nflow - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

3

dist/nflow.js

@@ -940,3 +940,4 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(this, /******/ (function(modules) { // webpackBootstrap

visitedNodesMap[f.flow.guid()] = true;
route.push({ flow: f.flow, route: f.route.reverse() });
var r = [f.flow].concat(f.route.reverse());
route.push({ flow: f.flow, route: r });
}

@@ -943,0 +944,0 @@ });

{
"name": "nflow",
"version": "0.1.3",
"version": "0.1.4",
"description": "event/data/control flow",

@@ -5,0 +5,0 @@ "main": "dist/nflow.js",

@@ -18,3 +18,4 @@ import {isDetached} from '../utils'

visitedNodesMap[f.flow.guid()] = true
route.push({ flow:f.flow, route:f.route.reverse()})
var r = [f.flow].concat(f.route.reverse())
route.push({ flow:f.flow, route:r})
}

@@ -21,0 +22,0 @@ })

@@ -194,3 +194,39 @@ import flow from 'nflow'

})
describe('foo', ()=>{
it('should traverse events', function(){
sut.on('test', ()=>{})
var a = sut.create('a')
.on('test', ()=>{ })
var test = a
.emit('b')
.emit('c')
.emit('test')
var route = test.emit.route.DEFAULT(test)
var map = route.map(f=>f.flow.name())
console.log(map)
expect(map.join()).to.eql('test,c,b,a,sut')
})
it('should record route to upstream recipients', function(){
var a = sut.create('a')
.on('test', ()=>{})
var test = a
.emit('b')
.emit('c')
.emit('test')
console.log(test.emit.recipients)
var recipient = test.emit.recipients[0]
var recipientMap = recipient.route.map(f=>f.name())
expect(recipient.flow).to.eql(a)
expect(recipientMap.join()).to.eql('a,b,c,test')
})
})
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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