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

deep-equal

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-equal - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

19

index.js

@@ -40,4 +40,19 @@ var pSlice = Array.prototype.slice;

function isArguments(object) {
return Object.prototype.toString.call(object) == '[object Arguments]';
var supportsArgumentsClass = (function(){
return Object.prototype.toString.call(arguments)
}) == '[object Arguments]';
if(supportsArgumentsClass) {
var isArguments = function(object) {
return Object.prototype.toString.call(object) == '[object Arguments]';
}
} else {
var isArguments = function(object){
return object &&
typeof object == 'object' &&
typeof object.length == 'number' &&
Object.prototype.hasOwnProperty.call(object, 'callee') &&
!Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
false;
}
}

@@ -44,0 +59,0 @@

2

package.json
{
"name" : "deep-equal",
"version" : "0.1.0",
"version" : "0.1.1",
"description" : "node's assert.deepEqual algorithm",

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

@@ -33,1 +33,15 @@ var test = require('tape');

});
test('arguments class', function (t) {
t.deepEqual(
(function(){return arguments})(1,2,3),
(function(){return arguments})(1,2,3),
"compares arguments"
)
t.notDeepEqual(
(function(){return arguments})(1,2,3),
[1,2,3],
"differenciates array and arguments"
)
t.end();
});
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