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

scmp

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

scmp - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

benchmark/benchmark.js

2

index.js

@@ -10,2 +10,4 @@ /**

module.exports = function scmp(a, b) {
a = String(a);
b = String(b);
if (a.length !== b.length) {

@@ -12,0 +14,0 @@ return false;

8

package.json
{
"name": "scmp",
"version": "0.0.2",
"version": "0.0.3",
"description": "safe, constant-time string-comparison",
"main": "index.js",
"scripts": {
"test": "mocha"
"test": "mocha",
"posttest": "matcha"
},

@@ -25,4 +26,5 @@ "repository": {

"devDependencies": {
"mocha": "~1.8.1"
"mocha": "~1.13.0",
"matcha": "~0.4.0"
}
}

@@ -16,2 +16,10 @@ var scmp = require('../');

});
it('should not throw errors for non-strings', function() {
assert.ifError(scmp('a', {}));
assert.ifError(scmp({}, 'b'));
assert.ifError(scmp(1, 2));
assert.ifError(scmp(undefined, 2));
assert.ifError(scmp(null, 2));
});
});

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