New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-reflect

Package Overview
Dependencies
Maintainers
10
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-reflect - npm Package Compare versions

Comparing version 1.14.4 to 1.15.0

2

package.json
{
"name": "can-reflect",
"version": "1.14.4",
"version": "1.15.0",
"description": "reflection on unknown data types",

@@ -5,0 +5,0 @@ "homepage": "http://canjs.com",

@@ -24,5 +24,6 @@ var canSymbol = require("can-symbol");

var type = typeof list;
var length = list && type !== 'boolean' &&
typeof list !== 'number' &&
"length" in list && list.length;
if(type === "string" || Array.isArray(list)) {
return;
}
var length = list && (type !== 'boolean' && type !== 'number' && "length" in list) && list.length;

@@ -29,0 +30,0 @@ // var length = "length" in obj && obj.length;

@@ -564,2 +564,13 @@ var QUnit = require('steal-qunit');

QUnit.test(".size", function(){
QUnit.equal( shapeReflections.size([1]), 1, "array");
QUnit.equal( shapeReflections.size([]), 0, "array");
QUnit.equal( shapeReflections.size("a"), 1, "string");
QUnit.equal( shapeReflections.size(""), 0, "array");
QUnit.equal( shapeReflections.size({}), 0, "empty object")
QUnit.equal( shapeReflections.size({foo:"bar"}), 1, "object")
});
/*QUnit.test("getAllEnumerableKeys", function(){

@@ -566,0 +577,0 @@

@@ -1084,9 +1084,3 @@ var canSymbol = require("can-symbol");

else if( obj ) {
for(var prop in obj) {
if(obj.hasOwnProperty(prop)) {
count++;
}
}
return count;
return shapeReflections.getOwnEnumerableKeys(obj).length;
}

@@ -1093,0 +1087,0 @@ else {

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