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

can-list

Package Overview
Dependencies
Maintainers
8
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-list - npm Package Compare versions

Comparing version 3.0.5 to 3.1.0-pre.1

51

can-list_test.js

@@ -5,3 +5,2 @@ var List = require('can-list');

var Map = require('can-map');
require("can-map-define");

@@ -201,3 +200,3 @@ QUnit.module('can-list');

var Animal = Map.extend();
var me = new Person({ name: "John" });

@@ -207,3 +206,3 @@ var animal = new Animal({ name: "Tak" });

var hero = { name: "Ghandi" };
var people = new People([]);

@@ -214,5 +213,5 @@ var specialPeople = new People([

]);
people = people.concat([me, animal, specialPeople], specialPeople, [1, 2], 3);
ok(people.attr('length') === 8, "List length is right");

@@ -411,17 +410,2 @@ ok(people[0] === me, "Map in list === vars created before concat");

test("works with can-map-define", function() {
var MyList = List.extend({}, {
define: {
foo: {
get: function(){
return "bar";
}
}
}
});
var list = new MyList();
equal(list.attr("foo"), "bar");
});
test('forEach callback', function () {

@@ -448,28 +432,1 @@ var list = new List([]),

});
test('filter with context', function(){
var l = new List([{id: 1}]);
var context = {};
var contextWasCorrect = false;
l.filter(function(){
contextWasCorrect = (this === context);
return true;
}, context);
equal(contextWasCorrect, true, "context was correctly passed");
});
test('map with context', function(){
var l = new List([{id: 1}]);
var context = {};
var contextWasCorrect = false;
l.map(function(){
contextWasCorrect = (this === context);
return true;
}, context);
equal(contextWasCorrect, true, "context was correctly passed");
});

4

can-list.js

@@ -930,3 +930,3 @@ /* jshint -W079 */

this.each(function(item, index, list){
filtered = callback.call( thisArg || self, item, index, self);
filtered = callback.call( thisArg | self, item, index, self);
if(filtered){

@@ -942,3 +942,3 @@ filteredList.push(item);

this.each(function(item, index, list){
var mapped = callback.call( thisArg || self, item, index, self);
var mapped = callback.call( thisArg | self, item, index, self);
filteredList.push(mapped);

@@ -945,0 +945,0 @@

{
"name": "can-list",
"version": "3.0.5",
"version": "3.1.0-pre.1",
"description": "Observable lists",

@@ -14,6 +14,7 @@ "homepage": "http://canjs.com",

"version": "git commit -am \"Update dist for release\" && git checkout -b release && git add -f dist/",
"postversion": "git push --tags && git checkout master && git branch -D release && git push",
"postversion": "git push --tags && git checkout can-reflect && git branch -D release && git push origin can-reflect",
"testee": "testee test/test.html --browsers firefox",
"test": "npm run jshint && npm run testee",
"jshint": "jshint ./*.js --config",
"release:pre": "npm version prerelease && npm publish --tag pre",
"release:patch": "npm version patch && npm publish",

@@ -24,4 +25,3 @@ "release:minor": "npm version minor && npm publish",

"document": "bit-docs",
"develop": "done-serve --static --develop --port 8080",
"release:pre": "npm version prerelease && npm publish"
"develop": "done-serve --static --develop --port 8080"
},

@@ -43,12 +43,11 @@ "main": "can-list",

"can-construct": "^3.0.0",
"can-event": "^3.3.0",
"can-map": "^3.0.7",
"can-event": "^3.0.1",
"can-map": "^3.1.0-pre.2",
"can-namespace": "1.0.0",
"can-observation": "^3.0.1",
"can-observation": "^3.2.0-pre.5",
"can-types": "^1.0.1",
"can-util": "^3.2.2"
"can-util": "^3.1.1"
},
"devDependencies": {
"bit-docs": "0.0.7",
"can-map-define": "^3.0.2",
"done-serve": "^0.2.0",

@@ -55,0 +54,0 @@ "donejs-cli": "^0.9.5",

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