Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "ck-array", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A simple observable array for JavaScript Frameworks", | ||
@@ -5,0 +5,0 @@ "main": "src/ckArray.js", |
@@ -20,2 +20,8 @@ // Generated by CoffeeScript 1.9.1 | ||
}); | ||
it('should be able to initialize from array', function() { | ||
var CkArray, testArray; | ||
CkArray = require('./../src/CkArray'); | ||
testArray = new CkArray([1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
return expect(testArray.length).toEqual(9); | ||
}); | ||
it('should have a length property', function() { | ||
@@ -22,0 +28,0 @@ expect(a.length).toBeDefined(); |
@@ -11,2 +11,9 @@ // Generated by CoffeeScript 1.9.1 | ||
function CkArray(items) { | ||
var self; | ||
self = this; | ||
if (items && items instanceof Array) { | ||
items.forEach(function(i) { | ||
return self.push(i); | ||
}); | ||
} | ||
this.observers = []; | ||
@@ -13,0 +20,0 @@ this.push = function() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22217
188