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

can-connect-cloneable

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-connect-cloneable - npm Package Compare versions

Comparing version 0.2.0-pre.1 to 0.2.0

17

docs/can-connect-cloneable.md

@@ -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

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