@produck/charon-options
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@produck/charon-options", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Reactive options accessor provider.", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "281fe20e7dc0c3f6b1da4c3bb17270379828fae4" | ||
"gitHead": "f0d1dcb07889386e99dde086c09b691d734807ee" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Object, Lang, Console } from '@produck/charon'; | ||
import { Object, Lang, Console, NOOP } from '@produck/charon'; | ||
import * as Property from './Property.js'; | ||
@@ -16,3 +16,3 @@ | ||
export const define = (descriptor = {}, childAccessorMap = {}) => { | ||
export const define = (descriptor = {}, childAccessorMap = {}, eachSet = NOOP) => { | ||
const finalDescriptor = Property.normalize(descriptor); | ||
@@ -77,2 +77,3 @@ | ||
Object.defineProperty(CustomAccessor.prototype, propertyName, { | ||
enumerable: true, | ||
get() { | ||
@@ -91,2 +92,3 @@ return _(this).raw[propertyName]; | ||
set.call(context, newValue, oldValue); | ||
eachSet.call(context); | ||
} | ||
@@ -93,0 +95,0 @@ } |
7427
158