{ | ||
"name": "copykitten", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Tiny immutable JSON data structures", | ||
@@ -14,3 +14,4 @@ "scripts": { | ||
"url": "https://github.com/caolan/copykitten.git" | ||
} | ||
}, | ||
"main": "copykitten.js" | ||
} |
@@ -25,17 +25,10 @@ # copykitten.js | ||
### JSON value -> immutable | ||
```javascript | ||
copykitten.toImmutable({example: 'value'}) | ||
``` | ||
// JSON value -> immutable | ||
var immutable = copykitten.toImmutable({example: 'value'}) | ||
### Immutable value -> JSON string | ||
```javascript | ||
// Immutable value -> JSON string | ||
JSON.stringify(immutable) | ||
``` | ||
### Immutable object -> JSON object | ||
```javascript | ||
// Immutable value -> JSON object | ||
immutable.toJSON(); | ||
@@ -333,3 +326,3 @@ ``` | ||
var small = toys.every(function (toy) { | ||
return toys.length < 10; | ||
return toy.length < 10; | ||
}); | ||
@@ -350,3 +343,3 @@ | ||
var tiny = toys.filter(function (toy) { | ||
return toys.length < 4; | ||
return toy.length < 4; | ||
}); | ||
@@ -367,3 +360,3 @@ | ||
toys.forEach(function (toy) { | ||
console.log(yoy); | ||
console.log(toy); | ||
}); | ||
@@ -370,0 +363,0 @@ ``` |
397615
-2.85%9
-25%468
-1.47%