@politie/sherlock-proxy
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0
{ | ||
"name": "@politie/sherlock-proxy", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0", | ||
"description": "A proxy extension to Sherlock.", | ||
@@ -41,4 +41,4 @@ "main": "sherlock-proxy.cjs.js", | ||
"peerDependencies": { | ||
"@politie/sherlock": "3.0.0-beta.1" | ||
"@politie/sherlock": "3.0.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var tslib_1 = require('tslib'); | ||
var tslib = require('tslib'); | ||
var sherlock = require('@politie/sherlock'); | ||
@@ -190,3 +190,3 @@ | ||
var pd, length, expression, i; | ||
return tslib_1.__generator(this, function (_a) { | ||
return tslib.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -193,0 +193,0 @@ case 0: |
@@ -1,2 +0,2 @@ | ||
Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("@politie/sherlock"),e=Symbol("isDerivableProxy");function n(r){return!0===r[e]}var i=function(){function e(){this.$$derivable=void 0}return Object.defineProperty(e.prototype,"$derivable",{get:function(){var r=this.$proxyDescriptor;return r.$$derivable||(r.$$derivable=function(r,e){if(!e)return r;var n=e.get,i=e.set;return i&&t.isSettableDerivable(r)?t.lens({get:n,set:function(t,e){r.set(i.call(this,t,e))}},r).autoCache():r.derive(n).autoCache()}(r.$target,r.$lens&&r.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$value",{get:function(){var r=this.$proxyDescriptor;try{return r.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$derivable,i=e.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$targetValue",{get:function(){var r=this.$proxyDescriptor;try{return r.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$target,i=e.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.$create=function(r,e,n){var i=t.utils.clone(this.$proxyDescriptor);return i.$target=r,Object.getOwnPropertyNames(i).filter(function(r){return r.startsWith("$$")}).forEach(function(r){return i[r]=void 0}),i.$expression=e,i.$path=n,new Proxy(i,o)},e.prototype.$pluck=function(r){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(r),s(t.$expression,r),a(t.$path,r))},e.prototype.$pluckableKeys=function(){var r=this.$proxyDescriptor.$value;return"object"==typeof r?Reflect.ownKeys(r):[]},e.prototype.$length=function(){var r=this.$proxyDescriptor.$targetValue;return Array.isArray(r)?r.length:void 0},e.prototype.$and=function(r){return this.$proxyDescriptor.$derivable.and(u(r))},e.prototype.$or=function(r){return this.$proxyDescriptor.$derivable.or(u(r))},e.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},e.prototype.$is=function(r){return this.$proxyDescriptor.$derivable.is(u(r))},e.prototype.$derive=function(){var r=this.$proxyDescriptor.$derivable;return r.derive.apply(r,arguments)},e.prototype.$react=function(r,t){return this.$proxyDescriptor.$derivable.react(r,t)},e.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){var t,e,n,i;return r.__generator(this,function(r){switch(r.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw n=t.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:t.$value,expression:n});i=0,r.label=1;case 1:return i<e?[4,t.$pluck(i)]:[3,4];case 2:r.sent(),r.label=3;case 3:return i++,[3,1];case 4:return[2]}})},Object.defineProperty(e.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),e}();function u(r){return n(r)?r.$derivable:r}i.prototype[e]=!0;var o={get:function(r,t,e){return"$proxyDescriptor"===t?r:c(r,t)?r.$pluck.call(e,t):Reflect.get(r,t,e)},set:function(r,e,i,u){if(c(r,e)){var o=r.$pluck.call(u,e);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&t.isDerivable(i)?i.get():i,!0}return Reflect.set(r,e,i,u)},has:function(r,t){return t===Symbol.iterator?void 0!==r.$length():c(r,t)},getOwnPropertyDescriptor:function(r,t){if(c(r,t))return{get:function(){return this[t]},set:function(r){this[t]=r},configurable:!0,enumerable:!0}},ownKeys:function(r){return r.$pluckableKeys()}};function c(r,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(r,t)}function s(r,t){return void 0===r&&(r=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?r+"."+t:"string"==typeof t?r+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':r+"["+t+"]"}function a(r,t){return void 0===r&&(r=[]),r.concat(t)}exports.ProxyDescriptor=i,exports.extendExpression=s,exports.extendPath=a,exports.isDerivableProxy=n,exports.unwrapProxy=u; | ||
Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("@politie/sherlock"),e=Symbol("isDerivableProxy");function n(r){return!0===r[e]}var i=function(){function e(){this.$$derivable=void 0}return Object.defineProperty(e.prototype,"$derivable",{get:function(){var r=this.$proxyDescriptor;return r.$$derivable||(r.$$derivable=function(r,e){if(!e)return r;var n=e.get,i=e.set;return i&&t.isSettableDerivable(r)?t.lens({get:n,set:function(t,e){r.set(i.call(this,t,e))}},r).autoCache():r.derive(n).autoCache()}(r.$target,r.$lens&&r.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$value",{get:function(){var r=this.$proxyDescriptor;try{return r.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$derivable,i=e.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$targetValue",{get:function(){var r=this.$proxyDescriptor;try{return r.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$target,i=e.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.$create=function(r,e,n){var i=t.utils.clone(this.$proxyDescriptor);return i.$target=r,Object.getOwnPropertyNames(i).filter((function(r){return r.startsWith("$$")})).forEach((function(r){return i[r]=void 0})),i.$expression=e,i.$path=n,new Proxy(i,o)},e.prototype.$pluck=function(r){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(r),s(t.$expression,r),a(t.$path,r))},e.prototype.$pluckableKeys=function(){var r=this.$proxyDescriptor.$value;return"object"==typeof r?Reflect.ownKeys(r):[]},e.prototype.$length=function(){var r=this.$proxyDescriptor.$targetValue;return Array.isArray(r)?r.length:void 0},e.prototype.$and=function(r){return this.$proxyDescriptor.$derivable.and(u(r))},e.prototype.$or=function(r){return this.$proxyDescriptor.$derivable.or(u(r))},e.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},e.prototype.$is=function(r){return this.$proxyDescriptor.$derivable.is(u(r))},e.prototype.$derive=function(){var r=this.$proxyDescriptor.$derivable;return r.derive.apply(r,arguments)},e.prototype.$react=function(r,t){return this.$proxyDescriptor.$derivable.react(r,t)},e.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){var t,e,n,i;return r.__generator(this,(function(r){switch(r.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw n=t.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:t.$value,expression:n});i=0,r.label=1;case 1:return i<e?[4,t.$pluck(i)]:[3,4];case 2:r.sent(),r.label=3;case 3:return i++,[3,1];case 4:return[2]}}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),e}();function u(r){return n(r)?r.$derivable:r}i.prototype[e]=!0;var o={get:function(r,t,e){return"$proxyDescriptor"===t?r:c(r,t)?r.$pluck.call(e,t):Reflect.get(r,t,e)},set:function(r,e,i,u){if(c(r,e)){var o=r.$pluck.call(u,e);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&t.isDerivable(i)?i.get():i,!0}return Reflect.set(r,e,i,u)},has:function(r,t){return t===Symbol.iterator?void 0!==r.$length():c(r,t)},getOwnPropertyDescriptor:function(r,t){if(c(r,t))return{get:function(){return this[t]},set:function(r){this[t]=r},configurable:!0,enumerable:!0}},ownKeys:function(r){return r.$pluckableKeys()}};function c(r,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(r,t)}function s(r,t){return void 0===r&&(r=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?r+"."+t:"string"==typeof t?r+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':r+"["+t+"]"}function a(r,t){return void 0===r&&(r=[]),r.concat(t)}exports.ProxyDescriptor=i,exports.extendExpression=s,exports.extendPath=a,exports.isDerivableProxy=n,exports.unwrapProxy=u; | ||
//# sourceMappingURL=sherlock-proxy.cjs.min.js.map |
@@ -1,2 +0,2 @@ | ||
import{__generator as r}from"tslib";import{isSettableDerivable as t,utils as e,lens as n,isDerivable as i}from"@politie/sherlock";var u=Symbol("isDerivableProxy");function o(r){return!0===r[u]}var c=function(){function i(){this.$$derivable=void 0}return Object.defineProperty(i.prototype,"$derivable",{get:function(){var r=this.$proxyDescriptor;return r.$$derivable||(r.$$derivable=function(r,e){if(!e)return r;var i=e.get,u=e.set;return u&&t(r)?n({get:i,set:function(t,e){r.set(u.call(this,t,e))}},r).autoCache():r.derive(i).autoCache()}(r.$target,r.$lens&&r.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"$value",{get:function(){var r=this.$proxyDescriptor;try{return r.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$derivable,i=e.$expression;if(!t(n))throw Error((i||"$value")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"$targetValue",{get:function(){var r=this.$proxyDescriptor;try{return r.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$target,i=e.$expression;if(!t(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),i.prototype.$create=function(r,t,n){var i=e.clone(this.$proxyDescriptor);return i.$target=r,Object.getOwnPropertyNames(i).filter(function(r){return r.startsWith("$$")}).forEach(function(r){return i[r]=void 0}),i.$expression=t,i.$path=n,new Proxy(i,f)},i.prototype.$pluck=function(r){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(r),l(t.$expression,r),h(t.$path,r))},i.prototype.$pluckableKeys=function(){var r=this.$proxyDescriptor.$value;return"object"==typeof r?Reflect.ownKeys(r):[]},i.prototype.$length=function(){var r=this.$proxyDescriptor.$targetValue;return Array.isArray(r)?r.length:void 0},i.prototype.$and=function(r){return this.$proxyDescriptor.$derivable.and(a(r))},i.prototype.$or=function(r){return this.$proxyDescriptor.$derivable.or(a(r))},i.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},i.prototype.$is=function(r){return this.$proxyDescriptor.$derivable.is(a(r))},i.prototype.$derive=function(){var r=this.$proxyDescriptor.$derivable;return r.derive.apply(r,arguments)},i.prototype.$react=function(r,t){return this.$proxyDescriptor.$derivable.react(r,t)},i.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),i.prototype[Symbol.iterator]=function(){var t,e,n,i;return r(this,function(r){switch(r.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw n=t.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:t.$value,expression:n});i=0,r.label=1;case 1:return i<e?[4,t.$pluck(i)]:[3,4];case 2:r.sent(),r.label=3;case 3:return i++,[3,1];case 4:return[2]}})},Object.defineProperty(i.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),i}();function a(r){return o(r)?r.$derivable:r}c.prototype[u]=!0;var f={get:function(r,t,e){return"$proxyDescriptor"===t?r:s(r,t)?r.$pluck.call(e,t):Reflect.get(r,t,e)},set:function(r,t,e,n){if(s(r,t)){var u=r.$pluck.call(n,t);return e&&o(e)?u.$targetValue=e.$targetValue:u.$value=e&&i(e)?e.get():e,!0}return Reflect.set(r,t,e,n)},has:function(r,t){return t===Symbol.iterator?void 0!==r.$length():s(r,t)},getOwnPropertyDescriptor:function(r,t){if(s(r,t))return{get:function(){return this[t]},set:function(r){this[t]=r},configurable:!0,enumerable:!0}},ownKeys:function(r){return r.$pluckableKeys()}};function s(r,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(r,t)}function l(r,t){return void 0===r&&(r=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?r+"."+t:"string"==typeof t?r+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':r+"["+t+"]"}function h(r,t){return void 0===r&&(r=[]),r.concat(t)}export{c as ProxyDescriptor,l as extendExpression,h as extendPath,o as isDerivableProxy,a as unwrapProxy}; | ||
import{__generator as r}from"tslib";import{isSettableDerivable as t,utils as e,lens as n,isDerivable as i}from"@politie/sherlock";var u=Symbol("isDerivableProxy");function o(r){return!0===r[u]}var c=function(){function i(){this.$$derivable=void 0}return Object.defineProperty(i.prototype,"$derivable",{get:function(){var r=this.$proxyDescriptor;return r.$$derivable||(r.$$derivable=function(r,e){if(!e)return r;var i=e.get,u=e.set;return u&&t(r)?n({get:i,set:function(t,e){r.set(u.call(this,t,e))}},r).autoCache():r.derive(i).autoCache()}(r.$target,r.$lens&&r.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"$value",{get:function(){var r=this.$proxyDescriptor;try{return r.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$derivable,i=e.$expression;if(!t(n))throw Error((i||"$value")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"$targetValue",{get:function(){var r=this.$proxyDescriptor;try{return r.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$target,i=e.$expression;if(!t(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),i.prototype.$create=function(r,t,n){var i=e.clone(this.$proxyDescriptor);return i.$target=r,Object.getOwnPropertyNames(i).filter((function(r){return r.startsWith("$$")})).forEach((function(r){return i[r]=void 0})),i.$expression=t,i.$path=n,new Proxy(i,f)},i.prototype.$pluck=function(r){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(r),l(t.$expression,r),h(t.$path,r))},i.prototype.$pluckableKeys=function(){var r=this.$proxyDescriptor.$value;return"object"==typeof r?Reflect.ownKeys(r):[]},i.prototype.$length=function(){var r=this.$proxyDescriptor.$targetValue;return Array.isArray(r)?r.length:void 0},i.prototype.$and=function(r){return this.$proxyDescriptor.$derivable.and(a(r))},i.prototype.$or=function(r){return this.$proxyDescriptor.$derivable.or(a(r))},i.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},i.prototype.$is=function(r){return this.$proxyDescriptor.$derivable.is(a(r))},i.prototype.$derive=function(){var r=this.$proxyDescriptor.$derivable;return r.derive.apply(r,arguments)},i.prototype.$react=function(r,t){return this.$proxyDescriptor.$derivable.react(r,t)},i.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),i.prototype[Symbol.iterator]=function(){var t,e,n,i;return r(this,(function(r){switch(r.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw n=t.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:t.$value,expression:n});i=0,r.label=1;case 1:return i<e?[4,t.$pluck(i)]:[3,4];case 2:r.sent(),r.label=3;case 3:return i++,[3,1];case 4:return[2]}}))},Object.defineProperty(i.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),i}();function a(r){return o(r)?r.$derivable:r}c.prototype[u]=!0;var f={get:function(r,t,e){return"$proxyDescriptor"===t?r:s(r,t)?r.$pluck.call(e,t):Reflect.get(r,t,e)},set:function(r,t,e,n){if(s(r,t)){var u=r.$pluck.call(n,t);return e&&o(e)?u.$targetValue=e.$targetValue:u.$value=e&&i(e)?e.get():e,!0}return Reflect.set(r,t,e,n)},has:function(r,t){return t===Symbol.iterator?void 0!==r.$length():s(r,t)},getOwnPropertyDescriptor:function(r,t){if(s(r,t))return{get:function(){return this[t]},set:function(r){this[t]=r},configurable:!0,enumerable:!0}},ownKeys:function(r){return r.$pluckableKeys()}};function s(r,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(r,t)}function l(r,t){return void 0===r&&(r=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?r+"."+t:"string"==typeof t?r+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':r+"["+t+"]"}function h(r,t){return void 0===r&&(r=[]),r.concat(t)}export{c as ProxyDescriptor,l as extendExpression,h as extendPath,o as isDerivableProxy,a as unwrapProxy}; | ||
//# sourceMappingURL=sherlock-proxy.esm.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@politie/sherlock")):"function"==typeof define&&define.amd?define(["exports","@politie/sherlock"],t):t((e=e||self).SherlockProxy={},e.Sherlock)}(this,function(e,t){"use strict";var r=Symbol("isDerivableProxy");function n(e){return!0===e[r]}var i=function(){function e(){this.$$derivable=void 0}return Object.defineProperty(e.prototype,"$derivable",{get:function(){var e=this.$proxyDescriptor;return e.$$derivable||(e.$$derivable=function(e,r){if(!r)return e;var n=r.get,i=r.set;return i&&t.isSettableDerivable(e)?t.lens({get:n,set:function(t,r){e.set(i.call(this,t,r))}},e).autoCache():e.derive(n).autoCache()}(e.$target,e.$lens&&e.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$value",{get:function(){var e=this.$proxyDescriptor;try{return e.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(e.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(e){var r=this.$proxyDescriptor,n=r.$derivable,i=r.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(e)}catch(e){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(e&&e.message)),{jse_cause:e})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$targetValue",{get:function(){var e=this.$proxyDescriptor;try{return e.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(e.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(e){var r=this.$proxyDescriptor,n=r.$target,i=r.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(e)}catch(e){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(e&&e.message)),{jse_cause:e})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.$create=function(e,r,n){var i=t.utils.clone(this.$proxyDescriptor);return i.$target=e,Object.getOwnPropertyNames(i).filter(function(e){return e.startsWith("$$")}).forEach(function(e){return i[e]=void 0}),i.$expression=r,i.$path=n,new Proxy(i,o)},e.prototype.$pluck=function(e){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(e),f(t.$expression,e),a(t.$path,e))},e.prototype.$pluckableKeys=function(){var e=this.$proxyDescriptor.$value;return"object"==typeof e?Reflect.ownKeys(e):[]},e.prototype.$length=function(){var e=this.$proxyDescriptor.$targetValue;return Array.isArray(e)?e.length:void 0},e.prototype.$and=function(e){return this.$proxyDescriptor.$derivable.and(u(e))},e.prototype.$or=function(e){return this.$proxyDescriptor.$derivable.or(u(e))},e.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},e.prototype.$is=function(e){return this.$proxyDescriptor.$derivable.is(u(e))},e.prototype.$derive=function(){var e=this.$proxyDescriptor.$derivable;return e.derive.apply(e,arguments)},e.prototype.$react=function(e,t){return this.$proxyDescriptor.$derivable.react(e,t)},e.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){var e,t,r,n;return function(e,t){var r,n,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,function(i){switch(i.label){case 0:if(e=this.$proxyDescriptor,void 0===(t=e.$length()))throw r=e.$expression,Object.assign(Error((r||"object")+" is not iterable"),{value:e.$value,expression:r});n=0,i.label=1;case 1:return n<t?[4,e.$pluck(n)]:[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}})},Object.defineProperty(e.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),e}();function u(e){return n(e)?e.$derivable:e}i.prototype[r]=!0;var o={get:function(e,t,r){return"$proxyDescriptor"===t?e:c(e,t)?e.$pluck.call(r,t):Reflect.get(e,t,r)},set:function(e,r,i,u){if(c(e,r)){var o=e.$pluck.call(u,r);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&t.isDerivable(i)?i.get():i,!0}return Reflect.set(e,r,i,u)},has:function(e,t){return t===Symbol.iterator?void 0!==e.$length():c(e,t)},getOwnPropertyDescriptor:function(e,t){if(c(e,t))return{get:function(){return this[t]},set:function(e){this[t]=e},configurable:!0,enumerable:!0}},ownKeys:function(e){return e.$pluckableKeys()}};function c(e,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(e,t)}function f(e,t){return void 0===e&&(e=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?e+"."+t:"string"==typeof t?e+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':e+"["+t+"]"}function a(e,t){return void 0===e&&(e=[]),e.concat(t)}e.ProxyDescriptor=i,e.extendExpression=f,e.extendPath=a,e.isDerivableProxy=n,e.unwrapProxy=u,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@politie/sherlock")):"function"==typeof define&&define.amd?define(["exports","@politie/sherlock"],t):t((e=e||self).SherlockProxy={},e.Sherlock)}(this,(function(e,t){"use strict";var r=Symbol("isDerivableProxy");function n(e){return!0===e[r]}var i=function(){function e(){this.$$derivable=void 0}return Object.defineProperty(e.prototype,"$derivable",{get:function(){var e=this.$proxyDescriptor;return e.$$derivable||(e.$$derivable=function(e,r){if(!r)return e;var n=r.get,i=r.set;return i&&t.isSettableDerivable(e)?t.lens({get:n,set:function(t,r){e.set(i.call(this,t,r))}},e).autoCache():e.derive(n).autoCache()}(e.$target,e.$lens&&e.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$value",{get:function(){var e=this.$proxyDescriptor;try{return e.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(e.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(e){var r=this.$proxyDescriptor,n=r.$derivable,i=r.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(e)}catch(e){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(e&&e.message)),{jse_cause:e})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$targetValue",{get:function(){var e=this.$proxyDescriptor;try{return e.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(e.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(e){var r=this.$proxyDescriptor,n=r.$target,i=r.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(e)}catch(e){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(e&&e.message)),{jse_cause:e})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.$create=function(e,r,n){var i=t.utils.clone(this.$proxyDescriptor);return i.$target=e,Object.getOwnPropertyNames(i).filter((function(e){return e.startsWith("$$")})).forEach((function(e){return i[e]=void 0})),i.$expression=r,i.$path=n,new Proxy(i,o)},e.prototype.$pluck=function(e){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(e),f(t.$expression,e),a(t.$path,e))},e.prototype.$pluckableKeys=function(){var e=this.$proxyDescriptor.$value;return"object"==typeof e?Reflect.ownKeys(e):[]},e.prototype.$length=function(){var e=this.$proxyDescriptor.$targetValue;return Array.isArray(e)?e.length:void 0},e.prototype.$and=function(e){return this.$proxyDescriptor.$derivable.and(u(e))},e.prototype.$or=function(e){return this.$proxyDescriptor.$derivable.or(u(e))},e.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},e.prototype.$is=function(e){return this.$proxyDescriptor.$derivable.is(u(e))},e.prototype.$derive=function(){var e=this.$proxyDescriptor.$derivable;return e.derive.apply(e,arguments)},e.prototype.$react=function(e,t){return this.$proxyDescriptor.$derivable.react(e,t)},e.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){var e,t,r,n;return function(e,t){var r,n,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,(function(i){switch(i.label){case 0:if(e=this.$proxyDescriptor,void 0===(t=e.$length()))throw r=e.$expression,Object.assign(Error((r||"object")+" is not iterable"),{value:e.$value,expression:r});n=0,i.label=1;case 1:return n<t?[4,e.$pluck(n)]:[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),e}();function u(e){return n(e)?e.$derivable:e}i.prototype[r]=!0;var o={get:function(e,t,r){return"$proxyDescriptor"===t?e:c(e,t)?e.$pluck.call(r,t):Reflect.get(e,t,r)},set:function(e,r,i,u){if(c(e,r)){var o=e.$pluck.call(u,r);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&t.isDerivable(i)?i.get():i,!0}return Reflect.set(e,r,i,u)},has:function(e,t){return t===Symbol.iterator?void 0!==e.$length():c(e,t)},getOwnPropertyDescriptor:function(e,t){if(c(e,t))return{get:function(){return this[t]},set:function(e){this[t]=e},configurable:!0,enumerable:!0}},ownKeys:function(e){return e.$pluckableKeys()}};function c(e,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(e,t)}function f(e,t){return void 0===e&&(e=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?e+"."+t:"string"==typeof t?e+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':e+"["+t+"]"}function a(e,t){return void 0===e&&(e=[]),e.concat(t)}e.ProxyDescriptor=i,e.extendExpression=f,e.extendPath=a,e.isDerivableProxy=n,e.unwrapProxy=u,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=sherlock-proxy.umd.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
221614
2