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

contractual

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contractual - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

9

lib/processor.js

@@ -0,1 +1,2 @@

'use strict';
var OBLIGATIONS = require('obligations');

@@ -45,5 +46,9 @@ var estraverse = require('estraverse');

if (total && !options.global) {
ast.body.unshift(createRequireStatement(options));
if (ast.body[0].type === 'ExpressionStatement' && ast.body[0].expression.value === 'use strict') {
ast.body.splice(1, 0, createRequireStatement(options));
} else {
ast.body.unshift(createRequireStatement(options));
}
}
// regular expression haves are being hammered in some cases, this fixes that.
// regular expression are being hammered in some cases, this fixes that.
// but it's a bandage. The root cause is not clear, it seems to be an issue with esprima.

@@ -50,0 +55,0 @@ estraverse.traverse(ast, {

{
"name": "contractual",
"version": "0.1.1",
"version": "0.1.2",
"description": "Syntactic sugar for Design by contract in JavaScript.",

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

@@ -0,1 +1,2 @@

'use strict';
var estraverse = require('estraverse');

@@ -48,5 +49,10 @@

if (total && !options.global) {
ast.body.unshift(createRequireStatement(options));
if (ast.body[0].type === 'ExpressionStatement' && ast.body[0].expression.value === 'use strict') {
ast.body.splice(1, 0, createRequireStatement(options));
}
else {
ast.body.unshift(createRequireStatement(options));
}
}
// regular expression haves are being hammered in some cases, this fixes that.
// regular expression are being hammered in some cases, this fixes that.
// but it's a bandage. The root cause is not clear, it seems to be an issue with esprima.

@@ -53,0 +59,0 @@ estraverse.traverse(ast, {

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