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

analyses

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analyses

basic data flow analyses framework based on esprima

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

analyses

Basic data flow analyses framework based on esprima

Build Status Coverage Status Dependency Status

Installation

$ npm install analyses

Usage

var cfg = esgraph(esprima.parse('…'));
var output = analyses(cfg, function (input, list) {
	this; // the cfg node
	input; // the input set
	list; // the worklist `.push()` nodes to it.
	return new analyses.Set(); // either return a new output Set
	// or return an output Set and `enqueue: false` so the worklist algorithm does
	// not check and enqueue successors itself.
	return {output: new analyses.Set(), enqueue: false}
}, {
	// direction:
	// forward or backward; defaults to forward
	direction: 'forward',
	// custom merge function:
	// typically union or intersect; defaults to union
	// merge function takes an array of inputs
	// `analyses.merge()` wraps a function which takes a pair `a, b` of inputs
	merge: analyses.merge(analyses.Set.union),
	// custom equals function:
	// this is used to determine if the output of a node still changes and to
	// not enqueue any more successors and stop the iteration; defaults to
	// Set.equals
	equals: analyses.Set.equals
});

License

LGPLv3

Keywords

FAQs

Package last updated on 07 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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