can-connect-cloneable
Advanced tools
Comparing version 0.2.0-pre.1 to 0.2.0
@@ -5,3 +5,3 @@ @module {function} can-connect-cloneable | ||
@description Makes mutable clones of [can-connect]ed maps. Changes to the clone save back to the original, and changes to the original propogate to the clone. | ||
@description Makes mutable clones of [can-connect]’d maps. Changes to the clone save back to the original; likewise, changes to the original propagate to the clone. | ||
@@ -24,3 +24,3 @@ @signature `makeCloneable(Type)` | ||
@param {can-map|can-define/map/map} Type the DefineMap or CanMap you want to make clonable | ||
@param {can-map|can-define/map/map} Type The DefineMap or CanMap you want to make clonable | ||
@@ -32,8 +32,8 @@ | ||
`can-connect-cloneable` can be used with `[can-define/map/map DefineMap]`s or legacy `[can-map CanMap]`s. To make `Map` instances clonable, include `can-connect-cloneable` and call it with the `Map` constructor as the parameter. This adds a `clone` method to future instances of `Map`. | ||
`can-connect-cloneable` can be used with `[can-define/map/map DefineMaps]` or legacy `[can-map CanMaps]`. To make `Map` instances clonable, include `can-connect-cloneable` and call it with the `Map` constructor as the parameter. This adds a `clone` method to future instances of `Map`. | ||
An instance and it's clone have a special relationship: | ||
An instance and its clone have a special relationship: | ||
1. Changes to the original instance propogate automatically to the clone. | ||
2. Changes to the cloned instance do *not* propogate to the original until you call the clone's `save` method. | ||
2. Changes to the cloned instance do *not* propogate to the original until you call the clone’s `save` method. | ||
@@ -73,3 +73,3 @@ ### Using DefineMap (`[can-define/map/map]`) | ||
Make changes to the clone, and save, updating the original: | ||
Make changes to the clone and save, updating the original: | ||
@@ -92,2 +92,3 @@ ```javascript | ||
Make changes to the original, updating the clone: | ||
```javascript | ||
@@ -146,3 +147,3 @@ original.name; // -> "Justin" | ||
Make changes to the clone, and save, updating the original: | ||
Make changes to the clone and save, updating the original: | ||
@@ -165,2 +166,3 @@ ```javascript | ||
Make changes to the original, updating the clone: | ||
```javascript | ||
@@ -176,3 +178,2 @@ original.attr("name"); // -> "Justin" | ||
clone.attr("name"); // -> "Kyle" | ||
``` |
{ | ||
"name": "can-connect-cloneable", | ||
"version": "0.2.0-pre.1", | ||
"version": "0.2.0", | ||
"description": "Allows you to make mutable clones of can-connected maps and save changes back to the original", | ||
@@ -9,3 +9,3 @@ "main": "can-connect-cloneable", | ||
"version": "git commit -am \"Update dist for release\" && git checkout -b release && git add -f dist/", | ||
"postversion": "git push --tags && git checkout can-reflect && git branch -D release && git push", | ||
"postversion": "git push --tags && git checkout master && git branch -D release && git push", | ||
"testee": "testee test/test.html --browsers firefox", | ||
@@ -12,0 +12,0 @@ "test": "npm run jshint && npm run testee", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19973