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

can-stache-bindings

Package Overview
Dependencies
Maintainers
10
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-stache-bindings - npm Package Compare versions

Comparing version 3.4.4 to 3.4.5

27

docs/bindings.md

@@ -58,2 +58,4 @@ @module can-stache-bindings

> __Note:__ If value being passed to the component is an object, changes to the objects properties will still be visible to the component. Objects are passed by reference. See [can-stache-bindings#OneWayBindingWithObjects One Way Binding With Objects].
#### [can-stache-bindings.toParent one-way to parent]

@@ -75,2 +77,4 @@

> __Note:__ If value being passed to the component is an object, changes to the objects properties will still be visible to the component. Objects are passed by reference. See [can-stache-bindings#OneWayBindingWithObjects One Way Binding With Objects].
#### [can-stache-bindings.twoWay two-way]

@@ -90,1 +94,24 @@

```
## One Way Binding With Objects
`{child-prop}="key"` ([can-stache-bindings.toChild one-way to child]) or `{^child-prop}="key"` ([can-stache-bindings.toParent one-way to parent]) is used to pass values from the current scope to a component or vice versa, respectively.
Generally, this binding only observes changes in one direction, but when [can-stache.key] is an object (POJO, DefineMap, etc), it is passed as a reference, behaving in much the same way as the following snippet.
```javascript
function component(bar) {
// changes to bar's properties are preserved
bar.quux = 'barfoo';
// but replacing bar is not
bar = {
quux: 'hello world'
};
}
var foo = {
quux: 'foobar'
};
component(foo);
```

2

docs/to-child.md

@@ -14,2 +14,4 @@ @function can-stache-bindings.toChild {to-child}

> __Note:__ If [can-stache.key] is an object, changes to the objects properties will still be visible to the component. Objects are passed by reference. See [can-stache-bindings#OneWayBindingWithObjects One Way Binding With Objects].
@param {String} child-prop The name of the property to set in the

@@ -16,0 +18,0 @@ component’s viewmodel.

@@ -15,2 +15,4 @@ @function can-stache-bindings.toParent {^to-parent}

> __Note:__ If [can-stache.key] is an object, changes to the objects properties will still be visible to the component. Objects are passed by reference. See [can-stache-bindings#OneWayBindingWithObjects One Way Binding With Objects].
@param {String} child-prop The name of the property to export from the

@@ -17,0 +19,0 @@ child components viewmodel. Use `{^this}` or `{^.}` to export the entire viewModel.

6

package.json
{
"name": "can-stache-bindings",
"version": "3.4.4",
"version": "3.4.5",
"description": "Default binding syntaxes for can-stache",

@@ -39,3 +39,3 @@ "homepage": "http://canjs.com",

"can-event-dom-radiochange": "^1.0.0",
"can-observation": "^3.3.0-pre.1",
"can-observation": "^3.3.1",
"can-reflect": "^1.2.1",

@@ -64,4 +64,4 @@ "can-simple-map": "^3.3.0-pre.2",

"steal-tools": "^1.1.2",
"testee": "^0.6.1"
"testee": "^0.7.0"
}
}
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