You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

constantinople

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

12

index.js

@@ -16,3 +16,3 @@ 'use strict'

try {
Function('return (' + src + ')');
isExpression(src);
return lastRes = (detect(src).filter(function (key) {

@@ -34,1 +34,11 @@ return !constants || !(key.name in constants);

}
function isExpression(src) {
try {
eval('throw "STOP"; (function () { return (' + src + '); })()');
return false;
}
catch (err) {
return err === 'STOP';
}
}

2

package.json
{
"name": "constantinople",
"version": "3.0.0",
"version": "3.0.1",
"description": "Determine whether a JavaScript expression evaluates to a constant (using UglifyJS)",

@@ -5,0 +5,0 @@ "keywords": [],

# constantinople
Determine whether a JavaScript expression evaluates to a constant (using UglifyJS). Here it is assumed to be safe to underestimate how constant something is.
Determine whether a JavaScript expression evaluates to a constant (using acorn). Here it is assumed to be safe to underestimate how constant something is.

@@ -5,0 +5,0 @@ [![Build Status](https://img.shields.io/travis/ForbesLindesay/constantinople/master.svg)](https://travis-ci.org/ForbesLindesay/constantinople)

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc