Socket
Socket
Sign inDemoInstall

mobx-utils

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-utils - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 1.1.6
* Fixed #34: fromStream threw when being used in strict mode
* Introduced `reset()` on lazyObservable, see #28 by @daitr92
# 1.1.5

@@ -2,0 +7,0 @@

4

lib/lazy-observable.d.ts

@@ -31,3 +31,4 @@ /**

* current(): T,
* refresh(): T
* refresh(): T,
* reset(): T
* }}

@@ -38,2 +39,3 @@ */

refresh(): T;
reset(): T;
};

@@ -34,3 +34,4 @@ "use strict";

* current(): T,
* refresh(): T
* refresh(): T,
* reset(): T
* }}

@@ -54,2 +55,6 @@ */

};
var resetFnc = mobx_1.action("lazyObservable-reset", function () {
value.set(initialValue);
return value.get();
});
return {

@@ -60,2 +65,5 @@ current: currentFnc,

return currentFnc();
},
reset: function () {
return resetFnc();
}

@@ -62,0 +70,0 @@ };

@@ -55,5 +55,8 @@ "use strict";

function StreamListener(observable, initialValue) {
var _this = this;
this.current = mobx_1.asReference(undefined);
this.current = initialValue;
this.subscription = observable.subscribe(this);
mobx_1.runInAction(function () {
_this.current = initialValue;
_this.subscription = observable.subscribe(_this);
});
}

@@ -79,2 +82,11 @@ StreamListener.prototype.dispose = function () {

], StreamListener.prototype, "current", void 0);
__decorate([
mobx_1.action
], StreamListener.prototype, "next", null);
__decorate([
mobx_1.action
], StreamListener.prototype, "complete", null);
__decorate([
mobx_1.action
], StreamListener.prototype, "error", null);
/**

@@ -81,0 +93,0 @@ *

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("mobx")):"function"==typeof define&&define.amd?define(["mobx"],t):"object"==typeof exports?exports.mobxUtils=t(require("mobx")):e.mobxUtils=t(e.mobx)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}n(r(6)),n(r(9)),n(r(3)),n(r(11)),n(r(5)),n(r(7)),n(r(8)),n(r(12)),n(r(4)),n(r(10)),n(r(2))},function(t,r){t.exports=e},function(e,t){"use strict";function r(e,t){if(void 0===t&&(t="Illegal state"),!e)throw new Error("[mobx-utils] "+t)}function n(e){o.indexOf(e)===-1&&(o.push(e),console.error("[mobx-utils] Deprecated: "+e))}t.NOOP=function(){},t.IDENTITY=function(e){return e},t.invariant=r;var o=[];t.deprecated=n},function(e,t,r){"use strict";function n(e,t,r){void 0===t&&(t=i.NOOP),void 0===r&&(r=void 0);var n=!1,u=!1,s=r,c=function(){n&&(n=!1,t())},a=new o.Atom("ResourceBasedObservable",function(){i.invariant(!n&&!u),n=!0,e(function(e){o.extras.allowStateChanges(!0,function(){s=e,a.reportChanged()})})},c);return{current:function(){i.invariant(!u,"subscribingObservable has already been disposed");var e=a.reportObserved();return e||n||console.warn("Called `get` of an subscribingObservable outside a reaction. Current value will be returned but no new subscription has started"),s},dispose:function(){u=!0,c()},isAlive:function(){return n}}}var o=r(1),i=r(2);t.fromResource=n},function(e,t,r){"use strict";function n(e,t,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),!o.isObservableArray(e))throw new Error("Expected observable array as first argument");o.isAction(t)||(t=o.action("chunkProcessor",t));var i=function(){for(var r=function(){var r=0===n?e.length:Math.min(e.length,n),i=e.slice(0,r);o.runInAction(function(){return e.splice(0,r)}),t(i)};e.length>0;)r()};return r>0?o.autorunAsync(i,r):o.autorun(i)}var o=r(1);t.chunkProcessor=n},function(e,t,r){"use strict";function n(e){return new c(e)}var o=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u},i=r(1),u=r(2),s=["model","reset","submit","isDirty","isPropertyDirty"],c=function(){function e(e){var t=this;this.model=e,this.localValues=i.asMap({}),u.invariant(i.isObservableObject(e),"createViewModel expects an observable object"),Object.keys(e).forEach(function(e){u.invariant(s.indexOf(e)===-1,"The propertyname "+e+" is reserved and cannot be used with viewModels"),Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return t.isPropertyDirty(e)?t.localValues.get(e):t.model[e]},set:i.action(function(r){(t.isPropertyDirty(e)||r!==t.model[e])&&t.localValues.set(e,r)})})})}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!0,configurable:!0}),e.prototype.isPropertyDirty=function(e){return this.localValues.has(e)},e.prototype.submit=function(){var e=this;this.localValues.keys().forEach(function(t){var r=e.localValues.get(t),n=e.model[t];i.isObservableArray(n)?n.replace(r):i.isObservableMap(n)?(n.clear(),n.merge(r)):e.model[t]=r}),this.localValues.clear()},e.prototype.reset=function(){this.localValues.clear()},e.prototype.resetProperty=function(e){this.localValues.delete(e)},e}();o([i.computed],c.prototype,"isDirty",null),o([i.action],c.prototype,"submit",null),o([i.action],c.prototype,"reset",null),o([i.action],c.prototype,"resetProperty",null),t.createViewModel=n},function(e,t,r){"use strict";function n(e,t,r){return void 0===t&&(t=void 0),void 0===r&&(r=i.IDENTITY),new u(e,t,r)}var o=r(1),i=r(2);t.PENDING="pending",t.FULFILLED="fulfilled",t.REJECTED="rejected";var u=function(){function e(e,t,r){void 0===t&&(t=void 0),void 0===r&&(r=i.IDENTITY);var n=this;this.promise=e,this.modifier=r,this._state=o.observable("pending"),this._reason=o.observable(void 0),this._observable=o.observable(r(t)),e.then(o.action("observableFromPromise-resolve",function(e){n._observable.set(e),n._state.set("fulfilled")}),o.action("observableFromPromise-reject",function(e){n._reason.set(e),n._observable.set(e),n._state.set("rejected")}))}return Object.defineProperty(e.prototype,"value",{get:function(){return this._observable.get()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state.get()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reason",{get:function(){return i.deprecated("In `fromPromise`: `.reason` is deprecated, use `.value` instead"),this._reason.get()},enumerable:!0,configurable:!0}),e.prototype.case=function(e){switch(this.state){case"pending":return e.pending&&e.pending();case"rejected":return e.rejected&&e.rejected(this.value);case"fulfilled":return e.fulfilled&&e.fulfilled(this.value)}},e}();t.fromPromise=n},function(e,t,r){"use strict";function n(e,t,r,n){void 0===r&&(r=1e4),void 0===n&&(n=function(){});var i=!1,u=setTimeout(function(){i||(s(),n())},r),s=o.when(e,function(){i=!0,clearTimeout(u),t()});return function(){clearTimeout(u),s()}}var o=r(1);t.whenWithTimeout=n},function(e,t,r){"use strict";function n(e,t){var r=o.extras.getAtom(e,t);if(!r)throw new Error("No computed provided, please provide an object created with `computed(() => expr)` or an object + property name");return r.observe(function(){})}var o=r(1);t.keepAlive=n},function(e,t,r){"use strict";function n(e,t,r){void 0===t&&(t=void 0),void 0===r&&(r=o.IDENTITY);var n=!1,u=i.observable(r(t)),s=function(){return n||(n=!0,e(function(e){i.extras.allowStateChanges(!0,function(){u.set(e)})})),u.get()};return{current:s,refresh:function(){return n=!1,s()}}}var o=r(2),i=r(1);t.lazyObservable=n},function(e,t,r){"use strict";function n(e){return void 0===e&&(e=1e3),s[e]||("number"==typeof e?s[e]=o(e):s[e]=i()),s[e].current()}function o(e){var t;return u.fromResource(function(r){t=setInterval(function(){return r(Date.now())},e)},function(){clearInterval(t)},Date.now())}function i(){var e=u.fromResource(function(t){function r(){window.requestAnimationFrame(function(){t(Date.now()),e.isAlive()&&r()})}r()},function(){},Date.now());return e}var u=r(3),s={};t.now=n},function(e,t,r){"use strict";function n(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}function o(){return this}function i(e){var t=c.computed(e);return r={subscribe:function(e){return{unsubscribe:t.observe("function"==typeof e?function(t){return e(t)}:function(t){return e.next(t)})}}},r[n()]=o,r;var r}function u(e,t){return void 0===t&&(t=void 0),new a(e,t)}var s=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u},c=r(1);t.toStream=i;var a=function(){function e(e,t){this.current=c.asReference(void 0),this.current=t,this.subscription=e.subscribe(this)}return e.prototype.dispose=function(){this.subscription.unsubscribe()},e.prototype.next=function(e){this.current=e},e.prototype.complete=function(){this.subscription.unsubscribe(),this.dispose()},e.prototype.error=function(e){this.current=e,this.dispose()},e}();s([c.observable],a.prototype,"current",void 0),t.fromStream=u},function(e,t,r){"use strict";function n(e,t,r){if(void 0===r&&(r=0),!o.isObservableArray(e))throw new Error("Expected observable array as first argument");o.isAction(t)||(t=o.action("queueProcessor",t));var n=function(){var r=e.slice(0);o.runInAction(function(){return e.splice(0)}),r.forEach(t)};return r>0?o.autorunAsync(n,r):o.autorun(n)}var o=r(1);t.queueProcessor=n}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("mobx")):"function"==typeof define&&define.amd?define(["mobx"],t):"object"==typeof exports?exports.mobxUtils=t(require("mobx")):e.mobxUtils=t(e.mobx)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}n(r(6)),n(r(9)),n(r(3)),n(r(11)),n(r(5)),n(r(7)),n(r(8)),n(r(12)),n(r(4)),n(r(10)),n(r(2))},function(t,r){t.exports=e},function(e,t){"use strict";function r(e,t){if(void 0===t&&(t="Illegal state"),!e)throw new Error("[mobx-utils] "+t)}function n(e){o.indexOf(e)===-1&&(o.push(e),console.error("[mobx-utils] Deprecated: "+e))}t.NOOP=function(){},t.IDENTITY=function(e){return e},t.invariant=r;var o=[];t.deprecated=n},function(e,t,r){"use strict";function n(e,t,r){void 0===t&&(t=i.NOOP),void 0===r&&(r=void 0);var n=!1,u=!1,s=r,c=function(){n&&(n=!1,t())},a=new o.Atom("ResourceBasedObservable",function(){i.invariant(!n&&!u),n=!0,e(function(e){o.extras.allowStateChanges(!0,function(){s=e,a.reportChanged()})})},c);return{current:function(){i.invariant(!u,"subscribingObservable has already been disposed");var e=a.reportObserved();return e||n||console.warn("Called `get` of an subscribingObservable outside a reaction. Current value will be returned but no new subscription has started"),s},dispose:function(){u=!0,c()},isAlive:function(){return n}}}var o=r(1),i=r(2);t.fromResource=n},function(e,t,r){"use strict";function n(e,t,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),!o.isObservableArray(e))throw new Error("Expected observable array as first argument");o.isAction(t)||(t=o.action("chunkProcessor",t));var i=function(){for(var r=function(){var r=0===n?e.length:Math.min(e.length,n),i=e.slice(0,r);o.runInAction(function(){return e.splice(0,r)}),t(i)};e.length>0;)r()};return r>0?o.autorunAsync(i,r):o.autorun(i)}var o=r(1);t.chunkProcessor=n},function(e,t,r){"use strict";function n(e){return new c(e)}var o=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u},i=r(1),u=r(2),s=["model","reset","submit","isDirty","isPropertyDirty"],c=function(){function e(e){var t=this;this.model=e,this.localValues=i.asMap({}),u.invariant(i.isObservableObject(e),"createViewModel expects an observable object"),Object.keys(e).forEach(function(e){u.invariant(s.indexOf(e)===-1,"The propertyname "+e+" is reserved and cannot be used with viewModels"),Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return t.isPropertyDirty(e)?t.localValues.get(e):t.model[e]},set:i.action(function(r){(t.isPropertyDirty(e)||r!==t.model[e])&&t.localValues.set(e,r)})})})}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!0,configurable:!0}),e.prototype.isPropertyDirty=function(e){return this.localValues.has(e)},e.prototype.submit=function(){var e=this;this.localValues.keys().forEach(function(t){var r=e.localValues.get(t),n=e.model[t];i.isObservableArray(n)?n.replace(r):i.isObservableMap(n)?(n.clear(),n.merge(r)):e.model[t]=r}),this.localValues.clear()},e.prototype.reset=function(){this.localValues.clear()},e.prototype.resetProperty=function(e){this.localValues.delete(e)},e}();o([i.computed],c.prototype,"isDirty",null),o([i.action],c.prototype,"submit",null),o([i.action],c.prototype,"reset",null),o([i.action],c.prototype,"resetProperty",null),t.createViewModel=n},function(e,t,r){"use strict";function n(e,t,r){return void 0===t&&(t=void 0),void 0===r&&(r=i.IDENTITY),new u(e,t,r)}var o=r(1),i=r(2);t.PENDING="pending",t.FULFILLED="fulfilled",t.REJECTED="rejected";var u=function(){function e(e,t,r){void 0===t&&(t=void 0),void 0===r&&(r=i.IDENTITY);var n=this;this.promise=e,this.modifier=r,this._state=o.observable("pending"),this._reason=o.observable(void 0),this._observable=o.observable(r(t)),e.then(o.action("observableFromPromise-resolve",function(e){n._observable.set(e),n._state.set("fulfilled")}),o.action("observableFromPromise-reject",function(e){n._reason.set(e),n._observable.set(e),n._state.set("rejected")}))}return Object.defineProperty(e.prototype,"value",{get:function(){return this._observable.get()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state.get()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reason",{get:function(){return i.deprecated("In `fromPromise`: `.reason` is deprecated, use `.value` instead"),this._reason.get()},enumerable:!0,configurable:!0}),e.prototype.case=function(e){switch(this.state){case"pending":return e.pending&&e.pending();case"rejected":return e.rejected&&e.rejected(this.value);case"fulfilled":return e.fulfilled&&e.fulfilled(this.value)}},e}();t.fromPromise=n},function(e,t,r){"use strict";function n(e,t,r,n){void 0===r&&(r=1e4),void 0===n&&(n=function(){});var i=!1,u=setTimeout(function(){i||(s(),n())},r),s=o.when(e,function(){i=!0,clearTimeout(u),t()});return function(){clearTimeout(u),s()}}var o=r(1);t.whenWithTimeout=n},function(e,t,r){"use strict";function n(e,t){var r=o.extras.getAtom(e,t);if(!r)throw new Error("No computed provided, please provide an object created with `computed(() => expr)` or an object + property name");return r.observe(function(){})}var o=r(1);t.keepAlive=n},function(e,t,r){"use strict";function n(e,t,r){void 0===t&&(t=void 0),void 0===r&&(r=o.IDENTITY);var n=!1,u=i.observable(r(t)),s=function(){return n||(n=!0,e(function(e){i.extras.allowStateChanges(!0,function(){u.set(e)})})),u.get()},c=i.action("lazyObservable-reset",function(){return u.set(t),u.get()});return{current:s,refresh:function(){return n=!1,s()},reset:function(){return c()}}}var o=r(2),i=r(1);t.lazyObservable=n},function(e,t,r){"use strict";function n(e){return void 0===e&&(e=1e3),s[e]||("number"==typeof e?s[e]=o(e):s[e]=i()),s[e].current()}function o(e){var t;return u.fromResource(function(r){t=setInterval(function(){return r(Date.now())},e)},function(){clearInterval(t)},Date.now())}function i(){var e=u.fromResource(function(t){function r(){window.requestAnimationFrame(function(){t(Date.now()),e.isAlive()&&r()})}r()},function(){},Date.now());return e}var u=r(3),s={};t.now=n},function(e,t,r){"use strict";function n(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}function o(){return this}function i(e){var t=c.computed(e);return r={subscribe:function(e){return{unsubscribe:t.observe("function"==typeof e?function(t){return e(t)}:function(t){return e.next(t)})}}},r[n()]=o,r;var r}function u(e,t){return void 0===t&&(t=void 0),new a(e,t)}var s=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u},c=r(1);t.toStream=i;var a=function(){function e(e,t){var r=this;this.current=c.asReference(void 0),c.runInAction(function(){r.current=t,r.subscription=e.subscribe(r)})}return e.prototype.dispose=function(){this.subscription.unsubscribe()},e.prototype.next=function(e){this.current=e},e.prototype.complete=function(){this.subscription.unsubscribe(),this.dispose()},e.prototype.error=function(e){this.current=e,this.dispose()},e}();s([c.observable],a.prototype,"current",void 0),s([c.action],a.prototype,"next",null),s([c.action],a.prototype,"complete",null),s([c.action],a.prototype,"error",null),t.fromStream=u},function(e,t,r){"use strict";function n(e,t,r){if(void 0===r&&(r=0),!o.isObservableArray(e))throw new Error("Expected observable array as first argument");o.isAction(t)||(t=o.action("queueProcessor",t));var n=function(){var r=e.slice(0);o.runInAction(function(){return e.splice(0)}),r.forEach(t)};return r>0?o.autorunAsync(n,r):o.autorun(n)}var o=r(1);t.queueProcessor=n}])});
{
"name": "mobx-utils",
"version": "1.1.5",
"version": "1.1.6",
"description": "Utility functions and common patterns for MobX",

@@ -60,2 +60,2 @@ "main": "lib/mobx-utils.js",

]
}
}

@@ -27,3 +27,3 @@ # MobX-utils

[lib/from-promise.js:103-107](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/from-promise.js#L103-L107 "Source code on GitHub")
[lib/from-promise.js:103-107](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/from-promise.js#L103-L107 "Source code on GitHub")

@@ -84,3 +84,3 @@ `fromPromise` takes a Promise and returns an object with 3 observable properties that track

[lib/lazy-observable.js:37-60](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/lazy-observable.js#L37-L60 "Source code on GitHub")
[lib/lazy-observable.js:38-68](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/lazy-observable.js#L38-L68 "Source code on GitHub")

@@ -122,3 +122,3 @@ `lazyObservable` creates an observable around a `fetch` method that will not be invoked

[lib/from-resource.js:68-104](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/from-resource.js#L68-L104 "Source code on GitHub")
[lib/from-resource.js:68-104](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/from-resource.js#L68-L104 "Source code on GitHub")

@@ -188,3 +188,3 @@ `fromResource` creates an observable which current state can be inspected using `.current()`,

[lib/observable-stream.js:37-51](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/observable-stream.js#L37-L51 "Source code on GitHub")
[lib/observable-stream.js:37-51](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/observable-stream.js#L37-L51 "Source code on GitHub")

@@ -217,3 +217,3 @@ Converts an expression to an observable stream (a.k.a. TC 39 Observable / RxJS observable).

[lib/observable-stream.js:103-106](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/observable-stream.js#L103-L106 "Source code on GitHub")
[lib/observable-stream.js:115-118](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/observable-stream.js#L115-L118 "Source code on GitHub")

@@ -245,3 +245,3 @@ Converts an subscribable, observable stream (TC 39 observable / RxJS stream)

[lib/create-view-model.js:127-129](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/create-view-model.js#L127-L129 "Source code on GitHub")
[lib/create-view-model.js:127-129](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/create-view-model.js#L127-L129 "Source code on GitHub")

@@ -297,3 +297,3 @@ `createViewModel` takes an object with observable properties (model)

[lib/guarded-when.js:32-51](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/guarded-when.js#L32-L51 "Source code on GitHub")
[lib/guarded-when.js:32-51](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/guarded-when.js#L32-L51 "Source code on GitHub")

@@ -334,3 +334,3 @@ Like normal `when`, except that this `when` will automatically dispose if the condition isn't met within a certain amount of time.

[lib/keep-alive.js:31-36](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/keep-alive.js#L31-L36 "Source code on GitHub")
[lib/keep-alive.js:31-36](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/keep-alive.js#L31-L36 "Source code on GitHub")

@@ -362,3 +362,3 @@ MobX normally suspends any computed value that is not in use by any reaction,

[lib/keep-alive.js:31-36](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/keep-alive.js#L31-L36 "Source code on GitHub")
[lib/keep-alive.js:31-36](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/keep-alive.js#L31-L36 "Source code on GitHub")

@@ -386,3 +386,3 @@ **Parameters**

[lib/queue-processor.js:22-40](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/queue-processor.js#L22-L40 "Source code on GitHub")
[lib/queue-processor.js:22-40](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/queue-processor.js#L22-L40 "Source code on GitHub")

@@ -415,3 +415,3 @@ `queueProcessor` takes an observable array, observes it and calls `processor`

[lib/chunk-processor.js:27-52](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/chunk-processor.js#L27-L52 "Source code on GitHub")
[lib/chunk-processor.js:27-52](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/chunk-processor.js#L27-L52 "Source code on GitHub")

@@ -449,3 +449,3 @@ `chunkProcessor` takes an observable array, observes it and calls `processor`

[lib/now.js:30-39](https://github.com/mobxjs/mobx-utils/blob/d80f853f7cd2ccacb3b63412636aff66a5466bad/lib/now.js#L30-L39 "Source code on GitHub")
[lib/now.js:30-39](https://github.com/mobxjs/mobx-utils/blob/a45d274dbac24c24b971c4b1acbed9302f965c56/lib/now.js#L30-L39 "Source code on GitHub")

@@ -452,0 +452,0 @@ Returns the current date time as epoch number.

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