🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More

copykitten

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copykitten - npm Package Compare versions

Comparing version

to
0.0.4

{
"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 @@ ```