@thi.ng/atom
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="0.5.3"></a> | ||
## [0.5.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@0.5.2...@thi.ng/atom@0.5.3) (2018-02-08) | ||
**Note:** Version bump only for package @thi.ng/atom | ||
<a name="0.5.2"></a> | ||
@@ -8,0 +16,0 @@ ## [0.5.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/atom@0.5.1...@thi.ng/atom@0.5.2) (2018-02-03) |
@@ -82,3 +82,4 @@ "use strict"; | ||
swap(fn, ...args) { | ||
const prev = this.state.deref(), curr = this.state.swap.apply(this.state, [fn, ...args]); | ||
const prev = this.state.deref(); | ||
const curr = this.state.swap.apply(this.state, [fn, ...args]); | ||
this.changed(prev, curr) && this.record(prev); | ||
@@ -85,0 +86,0 @@ return curr; |
{ | ||
"name": "@thi.ng/atom", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Mutable wrapper for a immutable values", | ||
@@ -29,3 +29,3 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@thi.ng/api": "^2.0.1" | ||
"@thi.ng/api": "^2.0.2" | ||
}, | ||
@@ -32,0 +32,0 @@ "keywords": [ |
@@ -33,3 +33,4 @@ "use strict"; | ||
function getter(path) { | ||
const ks = is_array_1.isArray(path) ? path : is_string_1.isString(path) ? path.split(".") : [path], kl = ks.pop(); | ||
const ks = is_array_1.isArray(path) ? path : is_string_1.isString(path) ? path.split(".") : [path]; | ||
const kl = ks.pop(); | ||
let f = (s) => s ? s[kl] : undefined; | ||
@@ -85,3 +86,4 @@ for (let i = ks.length - 1; i >= 0; i--) { | ||
function setter(path) { | ||
const ks = is_array_1.isArray(path) ? path : is_string_1.isString(path) ? path.split(".") : [path], kl = ks.pop(); | ||
const ks = is_array_1.isArray(path) ? path : is_string_1.isString(path) ? path.split(".") : [path]; | ||
const kl = ks.pop(); | ||
let f = (s, v) => (Object.assign({}, (s || {}), { [kl]: v })); | ||
@@ -88,0 +90,0 @@ for (let i = ks.length - 1; i >= 0; i--) { |
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
39439
583
Updated@thi.ng/api@^2.0.2