poly-js-utils
Advanced tools
Comparing version 1.3.5 to 1.3.6
{ | ||
"name": "poly-js-utils", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "Common client-side tools used in HSS Sites themes and locators.", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -15,15 +15,18 @@ var utils = require('../src/utils'); | ||
var tag = ["true"]; | ||
expect(utils.selectBoxIsTrue(tag)).toBeTruthy(); | ||
expect(utils.selectBoxIsTrue(tag)).toBe(true); | ||
}); | ||
it("should return true if the tag has a value of TRUE", function() { | ||
var tag = ["TRUE"]; | ||
expect(utils.selectBoxIsTrue(tag)).toBeTruthy(); | ||
expect(utils.selectBoxIsTrue(tag)).toBe(true); | ||
}); | ||
it("should return false if the tag does not exist", function() { | ||
expect(utils.selectBoxIsTrue(undefined)).toBeFalsy(); | ||
expect(utils.selectBoxIsTrue(undefined)).toBe(false); | ||
}); | ||
it("should return false if the tag has any value other than true", function() { | ||
var tag = ["some other value"]; | ||
expect(utils.selectBoxIsTrue(tag)).toBeFalsy(); | ||
expect(utils.selectBoxIsTrue(tag)).toBe(false); | ||
}); | ||
it("should return false if passed in an empty array", function() { | ||
expect(utils.selectBoxIsTrue([])).toBe(false); | ||
}); | ||
}); | ||
@@ -30,0 +33,0 @@ |
@@ -184,3 +184,3 @@ var _ = require('underscore'); | ||
var selectBoxIsTrue = function(value) { | ||
return (value && value[0].toLowerCase() === "true"); | ||
return !!(value && value.length && value[0].toLowerCase() === "true"); | ||
}; | ||
@@ -187,0 +187,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2
2
121307
34
2481