Comparing version 0.7.0 to 0.7.1
@@ -603,3 +603,3 @@ // UMD loader | ||
case gc_UNSTABLE: | ||
for (i = this._parents.length; i--;) { | ||
for (i = 0; i < this._parents.length; i++) { | ||
parent = this._parents[i]; | ||
@@ -625,3 +625,3 @@ var parentState = parent._state; | ||
var parents = []; | ||
for (i = this._parents.length; i--;) { | ||
for (i = 0; i < this._parents.length; i++) { | ||
var parentStateTuple = this._parents[i], | ||
@@ -628,0 +628,0 @@ state = parentStateTuple[1]; |
!function(t,n){"use strict";t&&"function"==typeof t.define&&t.define.amd?t.define(["exports"],n):n("undefined"!=typeof exports?exports:t.Derivable={})}(this,function(t){"use strict";function n(t){for(var n=1;n<arguments.length;n++)for(var e=arguments[n],r=Z(e),i=r.length;i--;){var u=r[i];t[u]=e[u]}return t}function e(t){return Object.prototype.toString.call(t).slice(8,-1)}function r(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}function i(t,n){return Object.hasOwnProperty.call(n,t)}function u(t,n,a,o){var c=e(t);if(c!==e(n))return!1;if("Boolean"===c||"Number"===c||"String"===c)return"object"==typeof t?"object"==typeof n&&r(t.valueOf(),n.valueOf()):r(t,n);if(r(t,n))return!0;if("RegExp"===c)return t.source===n.source&&t.global===n.global&&t.ignoreCase===n.ignoreCase&&t.multiline===n.multiline&&t.sticky===n.sticky&&t.unicode===n.unicode;if(Object(t)===t){if("Date"===c&&t.getTime()!==n.getTime())return!1;var s=Z(t);if(s.length!==Z(n).length)return!1;for(var f=a.length-1;f>=0;){if(a[f]===t)return o[f]===n;f-=1}for(a[a.length]=t,o[o.length]=n,f=s.length-1;f>=0;){var l=s[f];if(!i(l,n)||!u(n[l],t[l],a,o))return!1;f-=1}return a.pop(),o.pop(),!0}return!1}function a(t,n){return t&&"function"==typeof t.equals?t.equals(n):u(t,n,[],[])}function o(t,n){var e=t.indexOf(n);0>e&&t.push(n)}function c(t,n){var e=t.indexOf(n);e>=0&&t.splice(e,1)}function s(t,n){return t.indexOf(n)>=0}function f(){return $++}function l(t,n){return Array.prototype.slice.call(t,n)}function h(t,n){if(t._type===ht){if(t.reacting)throw new Error("Cycle detected! Don't do this!");n.push(t)}else for(var e=t._children.length;e--;){var r=t._children[e];r._state!==ut&&(r._state=ut,h(r,n))}}function p(t){var n;switch(t._state){case et:case rt:for(n=t._children.length;n--;){var e=t._children[n];p(e),e._state!==at&&t._children.splice(n,1)}t._state=at;break;case ut:var r=[];for(n=t._parents.length;n--;){var i=t._parents[n];if(i._state!==rt){t._state=it;break}r.push([i,i._value])}t._state!==it&&(t._state=ot,t._parents=r);break;case at:case it:case ot:break;default: | ||
throw new Error("can't sweep state "+t._state)}}function _(t){var n=!1;switch(t._type){case st:t._state=at,n=!0;break;case ft:case lt:t._state=nt,t._value=tt,n=!0;break;case ht:t._state=at,n=!1}if(n){for(var e=t._children.length;e--;)_(t._children[e]);t._children=[]}}function v(t){return ct.push([]),t(),ct.pop()}function d(t){ct.length>0&&o(ct[ct.length-1],t)}function g(){throw dt}function y(){return{currentTxn:null}}function w(t){return null!==t.currentTxn}function k(t){return t.currentTxn}function b(t,n){n._parent=t.currentTxn,n._state=pt,t.currentTxn=n}function m(t,n){var e=t.currentTxn;if(t.currentTxn=e._parent,e._state!==pt)throw new Error("unexpected state: "+e._state);n(e)}function x(t){m(t,function(t){t._state=_t,t.onCommit&&t.onCommit()})}function E(t){m(t,function(t){t._state=vt,t.onAbort&&t.onAbort()})}function T(t,n,e){b(t,n);try{e(g)}catch(r){if(E(t),r!==dt)throw r;return}x(t)}function O(t,n){b(t,n());var e=!1;return{tick:function(){if(e)throw new Error("can't tick disposed ticker");x(t),b(t,n())},stop:function(){if(e)throw new Error("ticker already disposed");x(t)}}}function j(t,n){return{control:n,parent:t,_state:at,active:!1,_type:ht,uid:f(),reacting:!1}}function A(t){c(t.parent._children,t),t.active=!1,t.control.onStop&&t.control.onStop()}function V(t){o(t.parent._children,t),t.active=!0,t.control.onStart&&t.control.onStart(),t.parent._get()}function q(t){if(t._state===ut){var n=t.parent,e=n._state;if((e===ut||e===it||e===ot||e===nt)&&n._get(),e=n._state,e===rt)t._state=at;else{if(e!==et)throw new Error("invalid parent state: "+e);C(t)}}}function C(t){if(!t.control.react)throw new Error("No reaction function available.");t._state=at;try{t.reacting=!0,t.control.react(t.parent._get())}finally{t.reacting=!1}}function D(){this._type=ht}function S(t,n){if(t._base)throw new Error("This reaction has already been initialized");return t._base=j(n,t),t}function R(t){this._type=ht,this.react=t}function N(t){return n(new D,t)}function G(t,n){var e={derive:function(n,e,r,i,u){var a=this;switch(arguments.length){ | ||
case 0:return a;case 1:return t.derivation(function(){return n(a.get())});case 2:return t.derivation(function(){return n(a.get(),t.unpack(e))});case 3:return t.derivation(function(){return n(a.get(),t.unpack(e),t.unpack(r))});case 4:return t.derivation(function(){return n(a.get(),t.unpack(e),t.unpack(r),t.unpack(i))});case 5:return t.derivation(function(){return n(a.get(),t.unpack(e),t.unpack(r),t.unpack(i),t.unpack(u))});default:var o=[a].concat(l(arguments,1));return t.derivation(function(){return n.apply(null,o.map(t.unpack))})}},reaction:function(t){if("function"==typeof t)return S(new R(t),this);if(t instanceof D)return S(t,this);if(t&&t.react)return S(N(t),this);throw new Error("Unrecognized type for reaction "+t)},react:function(t){return this.reaction(t).start().force()},get:function(){return d(this),this._get()},is:function(e){return t.lift(n.equals)(this,e)},and:function(n){return this.derive(function(e){return e&&t.unpack(n)})},or:function(n){return this.derive(function(e){return e||t.unpack(n)})},then:function(n,e){return this.derive(function(r){return t.unpack(r?n:e)})},some:function(n,e){return this.derive(function(r){return t.unpack(null===r||void 0===r?e:n)})},not:function(){return this.derive(function(t){return!t})}};return e["switch"]=function(){var e=arguments;return this.derive(function(r){var i;for(i=0;e.length-1>i;i+=2)if(n.equals(r,t.unpack(e[i])))return t.unpack(e[i+1]);return i===e.length-1?t.unpack(e[i]):void 0})},e}function z(t,n){return{_clone:function(){return t.derivation(this._deriver)},_forceGet:function(){var t,e=this,r=v(function(){var t=e._deriver();e._state=n.equals(t,e._value)?rt:et,e._value=t});for(t=this._parents.length;t--;){var i=this._parents[t];s(r,i)||c(i._children,this)}for(this._parents=r,t=r.length;t--;)o(r[t]._children,this)},_get:function(){var t,e;t:switch(this._state){case nt:case it:this._forceGet();break;case ut:for(t=this._parents.length;t--;){e=this._parents[t];var r=e._state;if((r===ut||r===it||r===ot)&&e._get(),r=e._state,r===et){this._forceGet();break t}if(r!==at&&r!==rt)throw new Error("invalid parent mode: "+r); | ||
}this._state=rt;break;case ot:var i=[];for(t=this._parents.length;t--;){var u=this._parents[t],a=u[1];if(e=u[0],!n.equals(e._get(),a)){this._parents=[],this._forceGet();break t}i.push(e)}for(t=i.length;t--;)o(i[t]._children,this);this._parents=i,this._state=rt}return this._value}}}function I(t,n){return t._children=[],t._parents=[],t._deriver=n,t._state=nt,t._type=ft,t._value=tt,t}function Q(t,n){return{swap:function(t){var n=l(arguments,0);return n[0]=this.get(),this.set(t.apply(null,n))},lens:function(n){return t.lens(this,n)}}}function L(t,n){return{_clone:function(){return t.lens(this._parent,{get:this._getter,set:this._setter})},set:function(t){return this._parent.set(this._setter(this._parent._get(),t)),this}}}function B(t,n,e){return t._getter=e.get,t._setter=e.set,t._parent=n,t._type=lt,t}function F(t){for(var n=t.length;n--;)q(t[n])}function M(){this.inTxnValues={},this.reactionQueue=[]}function P(t,n){var e=t.inTxnValues[n._uid];return e?e[1]:n._value}function U(t,n,e){t.inTxnValues[n._uid]=[n,e],h(n,t.reactionQueue)}function W(t,n){return{_clone:function(){return t.atom(this._value)},withValidator:function(t){if(null===t)return this._clone();if("function"==typeof t){var n=this._clone(),e=this._validator;return n._validator=e?function(n){return t(n)&&e(n)}:t,n}throw new Error(".withValidator expects function or null")},validate:function(){this._validate(this.get())},_validate:function(t){var n=this._validator&&this._validator(t);if(this._validator&&n!==!0)throw new Error("Failed validation with value: '"+t+"'. Validator returned '"+n+"' ")},set:function(t){if(this._validate(t),!n.equals(t,this._value))if(this._state=et,w(gt))U(k(gt),this,t);else{this._value=t;var e=[];h(this,e),F(e),p(this)}return this},_get:function(){return w(gt)?P(k(gt),this):this._value}}}function H(t,n){return t._uid=f(),t._children=[],t._state=at,t._value=n,t._type=st,t}function J(t){T(gt,new M,t)}function K(t){return function(){var n,e=l(arguments,0),r=this;return J(function(){n=t.apply(r,e)}),n}}function X(){wt?wt.refCount++:(wt=O(gt,function(){ | ||
return new M}),wt.refCount=1);var t=!1;return{tick:function(){if(t)throw new Error("tyring to use ticker after release");wt.tick()},release:function(){if(t)throw new Error("ticker already released");0===--wt.refCount&&(wt.stop(),wt=null),t=!0}}}function Y(t){function e(t){var n=l(arguments,1);return i.derivation(function(){for(var e="",r=0;t.length>r;r++)e+=t[r],n.length>r&&(e+=i.unpack(n[r]));return e})}function r(t){if(i.isDerivable(t))return t.get();if(t instanceof Array)return t.map(r);if(t.constructor===Object){for(var n={},e=Z(t),u=e.length;u--;){var a=e[u];n[a]=r(t[a])}return n}return t}t=n({},kt,t||{});var i={transact:J,defaultEquals:a,transaction:K,ticker:X,Reaction:D,isAtom:function(t){return t&&(t._type===st||t._type===lt)},isDerivable:function(t){return t&&(t._type===st||t._type===lt||t._type===ft)},isDerivation:function(t){return t&&(t._type===ft||t._type===lt)},isLensed:function(t){return t&&t._type===lt},isReaction:function(t){return t&&t._type===ht}},u=G(i,t),o=Q(i,t),c=n({},o,u,W(i,t)),s=n({},u,z(i,t)),f=n({},o,s,L(i,t));return i.atom=function(t){return H(Object.create(c),t)},i.swap=function(t,n){var e=l(arguments,1);return e[0]=t.get(),t.set(n.apply(null,e))},i.derivation=function(t){return I(Object.create(s),t)},i.derive=function(t){if(t instanceof Array)return e.apply(null,arguments);if(arguments.length>0)return u.derive.apply(t,l(arguments,1));throw new Error("Wrong arity for derive. Expecting 1+ args")},i.lens=function(t,n){var e=Object.create(f);return B(I(e,function(){return n.get(t.get())}),t,n)},i.unpack=function(t){return i.isDerivable(t)?t.get():t},i.lift=function(t){return function(){var n=arguments,e=this;return i.derivation(function(){return t.apply(e,Array.prototype.map.call(n,i.unpack))})}},i.set=function(t,n){return t.set(n)},i.get=function(t){return t.get()},i.struct=function(t){if(t.constructor===Object||t instanceof Array)return i.derivation(function(){return r(t)});throw new Error("`struct` expects plain Object or Array")},i.ifThenElse=function(t,n,e){return t.then(n,e)},i.ifThenElse=function(t,n,e){ | ||
return i.derivation(function(){return i.unpack(i.unpack(t)?n:e)})},i.some=function(t,n,e){return i.derivation(function(){var r=i.unpack(t);return i.unpack(null===r||void 0===r?e:n)})},i.or=function(){var t=arguments;return i.derivation(function(){for(var n,e=0;t.length>e&&!(n=i.unpack(t[e]));e++);return n})},i.and=function(){var t=arguments;return i.derivation(function(){for(var n,e=0;t.length>e&&(n=i.unpack(t[e]),n);e++);return n})},i.not=function(t){return t.derive(function(t){return!t})},i.switchCase=function(t){return u["switch"].apply(t,l(arguments,1))},i}var Z=Object.keys,$=0,tt=Object.freeze({equals:function(){return!1}}),nt=0,et=1,rt=2,it=3,ut=4,at=5,ot=6,ct=[],st="ATOM",ft="DERIVATION",lt="LENS",ht="REACTION",pt=0,_t=1,vt=3,dt={};n(D.prototype,{start:function(){return V(this._base),this},stop:function(){return A(this._base),this},force:function(){return C(this._base),this},isRunning:function(){return this._base.active}}),n(R.prototype,D.prototype);var gt=y(),yt={push:function(){}};n(M.prototype,{onCommit:function(){var t,n,e=Z(this.inTxnValues);if(w(gt))for(t=e.length;t--;)n=this.inTxnValues[e[t]],n[0].set(n[1]);else{for(t=e.length;t--;)n=this.inTxnValues[e[t]],n[0]._value=n[1],h(n[0],yt);for(F(this.reactionQueue),t=e.length;t--;)p(this.inTxnValues[e[t]][0])}},onAbort:function(){if(!w(gt))for(var t=Z(this.inTxnValues),n=t.length;n--;)_(this.inTxnValues[t[n]][0])}});var wt=null,kt={equals:a};n(t,Y()),t.withEquality=function(t){return Y({equals:t})},t["default"]=t}); | ||
case 0:return a;case 1:return t.derivation(function(){return n(a.get())});case 2:return t.derivation(function(){return n(a.get(),t.unpack(e))});case 3:return t.derivation(function(){return n(a.get(),t.unpack(e),t.unpack(r))});case 4:return t.derivation(function(){return n(a.get(),t.unpack(e),t.unpack(r),t.unpack(i))});case 5:return t.derivation(function(){return n(a.get(),t.unpack(e),t.unpack(r),t.unpack(i),t.unpack(u))});default:var o=[a].concat(l(arguments,1));return t.derivation(function(){return n.apply(null,o.map(t.unpack))})}},reaction:function(t){if("function"==typeof t)return S(new R(t),this);if(t instanceof D)return S(t,this);if(t&&t.react)return S(N(t),this);throw new Error("Unrecognized type for reaction "+t)},react:function(t){return this.reaction(t).start().force()},get:function(){return d(this),this._get()},is:function(e){return t.lift(n.equals)(this,e)},and:function(n){return this.derive(function(e){return e&&t.unpack(n)})},or:function(n){return this.derive(function(e){return e||t.unpack(n)})},then:function(n,e){return this.derive(function(r){return t.unpack(r?n:e)})},some:function(n,e){return this.derive(function(r){return t.unpack(null===r||void 0===r?e:n)})},not:function(){return this.derive(function(t){return!t})}};return e["switch"]=function(){var e=arguments;return this.derive(function(r){var i;for(i=0;e.length-1>i;i+=2)if(n.equals(r,t.unpack(e[i])))return t.unpack(e[i+1]);return i===e.length-1?t.unpack(e[i]):void 0})},e}function z(t,n){return{_clone:function(){return t.derivation(this._deriver)},_forceGet:function(){var t,e=this,r=v(function(){var t=e._deriver();e._state=n.equals(t,e._value)?rt:et,e._value=t});for(t=this._parents.length;t--;){var i=this._parents[t];s(r,i)||c(i._children,this)}for(this._parents=r,t=r.length;t--;)o(r[t]._children,this)},_get:function(){var t,e;t:switch(this._state){case nt:case it:this._forceGet();break;case ut:for(t=0;this._parents.length>t;t++){e=this._parents[t];var r=e._state;if((r===ut||r===it||r===ot)&&e._get(),r=e._state,r===et){this._forceGet();break t} | ||
if(r!==at&&r!==rt)throw new Error("invalid parent mode: "+r)}this._state=rt;break;case ot:var i=[];for(t=0;this._parents.length>t;t++){var u=this._parents[t],a=u[1];if(e=u[0],!n.equals(e._get(),a)){this._parents=[],this._forceGet();break t}i.push(e)}for(t=i.length;t--;)o(i[t]._children,this);this._parents=i,this._state=rt}return this._value}}}function I(t,n){return t._children=[],t._parents=[],t._deriver=n,t._state=nt,t._type=ft,t._value=tt,t}function Q(t,n){return{swap:function(t){var n=l(arguments,0);return n[0]=this.get(),this.set(t.apply(null,n))},lens:function(n){return t.lens(this,n)}}}function L(t,n){return{_clone:function(){return t.lens(this._parent,{get:this._getter,set:this._setter})},set:function(t){return this._parent.set(this._setter(this._parent._get(),t)),this}}}function B(t,n,e){return t._getter=e.get,t._setter=e.set,t._parent=n,t._type=lt,t}function F(t){for(var n=t.length;n--;)q(t[n])}function M(){this.inTxnValues={},this.reactionQueue=[]}function P(t,n){var e=t.inTxnValues[n._uid];return e?e[1]:n._value}function U(t,n,e){t.inTxnValues[n._uid]=[n,e],h(n,t.reactionQueue)}function W(t,n){return{_clone:function(){return t.atom(this._value)},withValidator:function(t){if(null===t)return this._clone();if("function"==typeof t){var n=this._clone(),e=this._validator;return n._validator=e?function(n){return t(n)&&e(n)}:t,n}throw new Error(".withValidator expects function or null")},validate:function(){this._validate(this.get())},_validate:function(t){var n=this._validator&&this._validator(t);if(this._validator&&n!==!0)throw new Error("Failed validation with value: '"+t+"'. Validator returned '"+n+"' ")},set:function(t){if(this._validate(t),!n.equals(t,this._value))if(this._state=et,w(gt))U(k(gt),this,t);else{this._value=t;var e=[];h(this,e),F(e),p(this)}return this},_get:function(){return w(gt)?P(k(gt),this):this._value}}}function H(t,n){return t._uid=f(),t._children=[],t._state=at,t._value=n,t._type=st,t}function J(t){T(gt,new M,t)}function K(t){return function(){var n,e=l(arguments,0),r=this;return J(function(){ | ||
n=t.apply(r,e)}),n}}function X(){wt?wt.refCount++:(wt=O(gt,function(){return new M}),wt.refCount=1);var t=!1;return{tick:function(){if(t)throw new Error("tyring to use ticker after release");wt.tick()},release:function(){if(t)throw new Error("ticker already released");0===--wt.refCount&&(wt.stop(),wt=null),t=!0}}}function Y(t){function e(t){var n=l(arguments,1);return i.derivation(function(){for(var e="",r=0;t.length>r;r++)e+=t[r],n.length>r&&(e+=i.unpack(n[r]));return e})}function r(t){if(i.isDerivable(t))return t.get();if(t instanceof Array)return t.map(r);if(t.constructor===Object){for(var n={},e=Z(t),u=e.length;u--;){var a=e[u];n[a]=r(t[a])}return n}return t}t=n({},kt,t||{});var i={transact:J,defaultEquals:a,transaction:K,ticker:X,Reaction:D,isAtom:function(t){return t&&(t._type===st||t._type===lt)},isDerivable:function(t){return t&&(t._type===st||t._type===lt||t._type===ft)},isDerivation:function(t){return t&&(t._type===ft||t._type===lt)},isLensed:function(t){return t&&t._type===lt},isReaction:function(t){return t&&t._type===ht}},u=G(i,t),o=Q(i,t),c=n({},o,u,W(i,t)),s=n({},u,z(i,t)),f=n({},o,s,L(i,t));return i.atom=function(t){return H(Object.create(c),t)},i.swap=function(t,n){var e=l(arguments,1);return e[0]=t.get(),t.set(n.apply(null,e))},i.derivation=function(t){return I(Object.create(s),t)},i.derive=function(t){if(t instanceof Array)return e.apply(null,arguments);if(arguments.length>0)return u.derive.apply(t,l(arguments,1));throw new Error("Wrong arity for derive. Expecting 1+ args")},i.lens=function(t,n){var e=Object.create(f);return B(I(e,function(){return n.get(t.get())}),t,n)},i.unpack=function(t){return i.isDerivable(t)?t.get():t},i.lift=function(t){return function(){var n=arguments,e=this;return i.derivation(function(){return t.apply(e,Array.prototype.map.call(n,i.unpack))})}},i.set=function(t,n){return t.set(n)},i.get=function(t){return t.get()},i.struct=function(t){if(t.constructor===Object||t instanceof Array)return i.derivation(function(){return r(t)});throw new Error("`struct` expects plain Object or Array"); | ||
},i.ifThenElse=function(t,n,e){return t.then(n,e)},i.ifThenElse=function(t,n,e){return i.derivation(function(){return i.unpack(i.unpack(t)?n:e)})},i.some=function(t,n,e){return i.derivation(function(){var r=i.unpack(t);return i.unpack(null===r||void 0===r?e:n)})},i.or=function(){var t=arguments;return i.derivation(function(){for(var n,e=0;t.length>e&&!(n=i.unpack(t[e]));e++);return n})},i.and=function(){var t=arguments;return i.derivation(function(){for(var n,e=0;t.length>e&&(n=i.unpack(t[e]),n);e++);return n})},i.not=function(t){return t.derive(function(t){return!t})},i.switchCase=function(t){return u["switch"].apply(t,l(arguments,1))},i}var Z=Object.keys,$=0,tt=Object.freeze({equals:function(){return!1}}),nt=0,et=1,rt=2,it=3,ut=4,at=5,ot=6,ct=[],st="ATOM",ft="DERIVATION",lt="LENS",ht="REACTION",pt=0,_t=1,vt=3,dt={};n(D.prototype,{start:function(){return V(this._base),this},stop:function(){return A(this._base),this},force:function(){return C(this._base),this},isRunning:function(){return this._base.active}}),n(R.prototype,D.prototype);var gt=y(),yt={push:function(){}};n(M.prototype,{onCommit:function(){var t,n,e=Z(this.inTxnValues);if(w(gt))for(t=e.length;t--;)n=this.inTxnValues[e[t]],n[0].set(n[1]);else{for(t=e.length;t--;)n=this.inTxnValues[e[t]],n[0]._value=n[1],h(n[0],yt);for(F(this.reactionQueue),t=e.length;t--;)p(this.inTxnValues[e[t]][0])}},onAbort:function(){if(!w(gt))for(var t=Z(this.inTxnValues),n=t.length;n--;)_(this.inTxnValues[t[n]][0])}});var wt=null,kt={equals:a};n(t,Y()),t.withEquality=function(t){return Y({equals:t})},t["default"]=t}); | ||
//# sourceMappingURL=derivable.min.js.map |
{ | ||
"name": "derivable", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Functional Reactive State for JavaScript & TypeScript", | ||
@@ -5,0 +5,0 @@ "author": "David Sheldrick", |
<h1 align="center">DerivableJS</h1> | ||
<h3 align="center">Observable State done Right</h3> | ||
[![Join the chat at https://gitter.im/ds300/derivablejs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ds300/derivablejs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![npm version](https://badge.fury.io/js/derivable.svg)](http://badge.fury.io/js/derivable) | ||
[![Join the chat at https://gitter.im/ds300/derivablejs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ds300/derivablejs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://badge.fury.io/js/derivable.svg)](http://badge.fury.io/js/derivable) | ||
--- | ||
@@ -36,3 +35,3 @@ | ||
They make it trivially easy to maintain consistent (i.e. sense-making) state at all times without requiring us to keep it all in one place. This is a huge win for those of us who develop complex systems with lots of moving parts. | ||
Sickening hyperbole aside, Derivables really do make it trivial to maintain consistent (i.e. sense-making) state at all times without requiring that it be kept all in one place. This is a huge win for those of us who develop complex systems with lots of moving parts. | ||
@@ -117,3 +116,3 @@ There are two types of Derivable: | ||
A final potential drawback is that DerivableJS requires one to think and design in terms of pure functions and immutable data being lazily computed, which I think takes a little while to get comfortable with coming from an OO background. | ||
A final potential drawback is that DerivableJS requires one to think and design in terms of pure functions and immutable data being lazily computed, which I think takes a little while to get comfortable with coming directly from an OO background. | ||
@@ -125,6 +124,6 @@ ## Usage | ||
##### API | ||
[See Here](https://ds300.github.com/derivable) | ||
[See Here](https://ds300.github.com/derivablejs) | ||
##### Examples (wip) | ||
If you want to get a really good feel for what DerivableJS can do, I recommend checking out the [Routing Walkthrough](https://github.com/ds300/derivable/tree/master/examples/routing/README.md), which is presented in TypeScript to aid readability. | ||
If you want to get a really good feel for what DerivableJS can do, I recommend checking out the [Routing Walkthrough](https://github.com/ds300/derivablejs/tree/master/examples/routing/README.md), which is presented in TypeScript to aid readability. | ||
@@ -131,0 +130,0 @@ Others: |
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
241902
1105
200