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 2.0.0 to 2.0.1

6

CHANGELOG.md

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

# 2.0.1
* Fixed several deprecation messages related to MobX 3 upgrade (see #36 by RainerAtSpirit)
* Fixed #26: Rejected promises not playing nicely with JQuery
* Fixed #25: Refreshing a lazy observable should not accidentally refresh it if it didn't start yet
# 2.0.0

@@ -2,0 +8,0 @@

2

lib/create-view-model.js

@@ -15,3 +15,3 @@ "use strict";

this.model = model;
this.localValues = mobx_1.asMap({});
this.localValues = mobx_1.observable.map({});
utils_1.invariant(mobx_1.isObservableObject(model), "createViewModel expects an observable object");

@@ -18,0 +18,0 @@ Object.keys(model).forEach(function (key) {

@@ -13,3 +13,3 @@ "use strict";

this._state = mobx_1.observable(exports.PENDING); // MWE: Hm... as any should not be needed...
this._reason = mobx_1.observable(undefined);
this._reason = mobx_1.observable.shallowBox(undefined);
this._observable = mobx_1.observable.box(initialValue);

@@ -16,0 +16,0 @@ promise.then(mobx_1.action("observableFromPromise-resolve", function (value) {

@@ -60,4 +60,9 @@ "use strict";

refresh: function () {
started = false;
return currentFnc();
if (started) {
started = false;
return currentFnc();
}
else {
return value.get();
}
},

@@ -64,0 +69,0 @@ reset: function () {

@@ -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){return void 0===t&&(t=void 0),new u(e,t)}var o=r(1),i=r(2);t.PENDING="pending",t.FULFILLED="fulfilled",t.REJECTED="rejected";var u=function(){function e(e,r){void 0===r&&(r=void 0);var n=this;this.promise=e,this._state=o.observable(t.PENDING),this._reason=o.observable(void 0),this._observable=o.observable.box(r),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){var r=t.newValue;return e(r)}:function(t){var r=t.newValue;return e.next(r)})}}},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=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.ref],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}])});
!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.observable.map({}),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){return void 0===t&&(t=void 0),new u(e,t)}var o=r(1),i=r(2);t.PENDING="pending",t.FULFILLED="fulfilled",t.REJECTED="rejected";var u=function(){function e(e,r){void 0===r&&(r=void 0);var n=this;this.promise=e,this._state=o.observable(t.PENDING),this._reason=o.observable.shallowBox(void 0),this._observable=o.observable.box(r),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?(n=!1,s()):u.get()},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){var r=t.newValue;return e(r)}:function(t){var r=t.newValue;return e.next(r)})}}},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=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.ref],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": "2.0.0",
"version": "2.0.1",
"description": "Utility functions and common patterns for MobX",

@@ -5,0 +5,0 @@ "main": "lib/mobx-utils.js",

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

[lib/from-promise.js:100-103](https://github.com/mobxjs/mobx-utils/blob/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/lib/from-promise.js#L100-L103 "Source code on GitHub")
[lib/from-promise.js:100-103](https://github.com/mobxjs/mobx-utils/blob/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/from-promise.js#L100-L103 "Source code on GitHub")

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

[lib/lazy-observable.js:37-67](https://github.com/mobxjs/mobx-utils/blob/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/lib/lazy-observable.js#L37-L67 "Source code on GitHub")
[lib/lazy-observable.js:37-72](https://github.com/mobxjs/mobx-utils/blob/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/lazy-observable.js#L37-L72 "Source code on GitHub")

@@ -121,3 +121,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/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/lib/from-resource.js#L68-L104 "Source code on GitHub")
[lib/from-resource.js:68-104](https://github.com/mobxjs/mobx-utils/blob/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/from-resource.js#L68-L104 "Source code on GitHub")

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

[lib/observable-stream.js:37-57](https://github.com/mobxjs/mobx-utils/blob/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/lib/observable-stream.js#L37-L57 "Source code on GitHub")
[lib/observable-stream.js:37-57](https://github.com/mobxjs/mobx-utils/blob/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/observable-stream.js#L37-L57 "Source code on GitHub")

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

[lib/observable-stream.js:121-124](https://github.com/mobxjs/mobx-utils/blob/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/lib/observable-stream.js#L121-L124 "Source code on GitHub")
[lib/observable-stream.js:121-124](https://github.com/mobxjs/mobx-utils/blob/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/observable-stream.js#L121-L124 "Source code on GitHub")

@@ -244,3 +244,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/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/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/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/create-view-model.js#L127-L129 "Source code on GitHub")

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

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

@@ -333,3 +333,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/7e5cf303e74bb20a74f9d8e405f369e2b9f94205/lib/keep-alive.js#L31-L36 "Source code on GitHub")
[lib/keep-alive.js:31-36](https://github.com/mobxjs/mobx-utils/blob/626e6e984b7b8d52457873cdb5c1ab72e6d0d5da/lib/keep-alive.js#L31-L36 "Source code on GitHub")

@@ -357,3 +357,3 @@ **Parameters**

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

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

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

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

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

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

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

@@ -451,0 +451,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