Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/config

Package Overview
Dependencies
Maintainers
14
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/config - npm Package Compare versions

Comparing version 0.0.2 to 1.0.0-alpha.1

src/config.js

13

CHANGELOG.md

@@ -1,11 +0,10 @@

### Unreleased
# @onflow/config
- YYYY-MM-DD **BREAKING?** -- description
## 1.0.0-alpha.1
### 0.0.2 -- 2020-08-13
### Patch Changes
2020-08-13 -- `@onflow/util-actor` VSN `0.0.1` -> `0.0.2`
- [#1124](https://github.com/onflow/fcl-js/pull/1124) [`9c191c15`](https://github.com/onflow/fcl-js/commit/9c191c1520ee772b4343265a42ad0e995a92dd9a) Thanks [@chasefleming](https://github.com/chasefleming)! - Create config package
### 0.0.1 -- 2020-07-17
- 2020-07-17 -- Initial Implementation
- Updated dependencies [[`de47af64`](https://github.com/onflow/fcl-js/commit/de47af647a5bdad154a2d83e2ea2260ab54f0c60)]:
- @onflow/util-actor@1.0.0-alpha.1

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

var n,e=require("@onflow/util-actor"),r="config",t="PUT_CONFIG",o="GET_CONFIG",i="CONFIG/UPDATED",u=function(n){return n},f=((n={})[t]=function(n,e,r){var t=r.key,o=r.value;if(null==t)throw new Error("Missing 'key' for config/put.");n.put(t,o),n.broadcast(i,n.all())},n[o]=function(n,e,r){var t=r.key,o=r.fallback;if(null==t)throw new Error("Missing 'key' for config/get");e.reply(n.get(t,o))},n.UPDATE_CONFIG=function(n,e,r){var t=r.key,o=r.fn;if(null==t)throw new Error("Missing 'key' for config/update");n.update(t,o||u),n.broadcast(i,n.all())},n.DELETE_CONFIG=function(n,e,r){var t=r.key;if(null==t)throw new Error("Missing 'key' for config/delete");n.delete(t),n.broadcast(i,n.all())},n.WHERE_CONFIG=function(n,e,r){var t=r.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");e.reply(n.where(t))},n[e.SUBSCRIBE]=function(n,e){n.subscribe(e.from),n.send(e.from,i,n.all())},n[e.UNSUBSCRIBE]=function(n,e){n.unsubscribe(e.from)},n);function c(n,o){return e.send(r,t,{key:n,value:o}),d()}function l(n,t){return e.send(r,o,{key:n,fallback:t},{expectReply:!0,timeout:10})}function a(n,t){return void 0===t&&(t=u),e.send(r,"UPDATE_CONFIG",{key:n,fn:t}),d()}function s(n){return e.send(r,"DELETE_CONFIG",{key:n}),d()}function E(n){return e.send(r,"WHERE_CONFIG",{pattern:n},{expectReply:!0,timeout:10})}function p(n){return e.subscriber(r,function(){return e.spawn(f,r)},n)}function d(){return{put:c,get:l,update:a,delete:s,where:E,subscribe:p}}e.spawn(f,r),exports.config=d;
var e,r=require("@onflow/util-actor");function n(){return(n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var t=function e(r,n){void 0===r&&(r=[]);try{if(!r.length)return Promise.resolve(n);var t=r[0],o=r.slice(1);return Promise.resolve(s(t)).then(function(r){return null==r?e(o,n):r})}catch(e){return Promise.reject(e)}},o="config",i="PUT_CONFIG",u="GET_CONFIG",l="CONFIG/UPDATED",c=function(e){return e},f=((e={})[i]=function(e,r,t){var o=t.key,i=t.value;if(null==o)throw new Error("Missing 'key' for config/put.");e.put(o,i),e.broadcast(l,n({},e.all()))},e[u]=function(e,r,n){var t=n.key,o=n.fallback;if(null==t)throw new Error("Missing 'key' for config/get");r.reply(e.get(t,o))},e.GET_ALL_CONFIG=function(e,r){r.reply(n({},e.all()))},e.UPDATE_CONFIG=function(e,r,t){var o=t.key,i=t.fn;if(null==o)throw new Error("Missing 'key' for config/update");e.update(o,i||c),e.broadcast(l,n({},e.all()))},e.DELETE_CONFIG=function(e,r,t){var o=t.key;if(null==o)throw new Error("Missing 'key' for config/delete");e.delete(o),e.broadcast(l,n({},e.all()))},e.CLEAR_CONFIG=function(e,r){for(var t=0,o=Object.keys(e.all());t<o.length;t++)e.delete(o[t]);e.broadcast(l,n({},e.all()))},e.WHERE_CONFIG=function(e,r,n){var t=n.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");r.reply(e.where(t))},e[r.SUBSCRIBE]=function(e,r){e.subscribe(r.from),e.send(r.from,l,n({},e.all()))},e[r.UNSUBSCRIBE]=function(e,r){e.unsubscribe(r.from)},e);function a(e,n){return r.send(o,i,{key:e,value:n}),m()}function s(e,n){return r.send(o,u,{key:e,fallback:n},{expectReply:!0,timeout:10})}function y(){return r.send(o,"GET_ALL_CONFIG",null,{expectReply:!0,timeout:10})}function v(e,n){return void 0===n&&(n=c),r.send(o,"UPDATE_CONFIG",{key:e,fn:n}),m()}function p(e){return r.send(o,"DELETE_CONFIG",{key:e}),m()}function d(e){return r.send(o,"WHERE_CONFIG",{pattern:e},{expectReply:!0,timeout:10})}function b(e){return r.subscriber(o,function(){return r.spawn(f,o)},e)}function h(){return r.send(o,"CLEAR_CONFIG")}function m(e){return null!=e&&"object"==typeof e&&Object.keys(e).map(function(r){return a(r,e[r])}),{put:a,get:s,all:y,first:t,update:v,delete:p,where:d,subscribe:b,overload:g}}r.spawn(f,o),m.put=a,m.get=s,m.all=y,m.first=t,m.update=v,m.delete=p,m.where=d,m.subscribe=b,m.overload=g;var E=function(e){return e};function g(e,r){return void 0===e&&(e={}),void 0===r&&(r=E),new Promise(function(n,t){try{return Promise.resolve(y()).then(function(o){var i=function(t,i){try{var u=function(){m(e);var t=r;return Promise.resolve(y()).then(function(e){return Promise.resolve(t(e)).then(function(e){return Promise.resolve(h()).then(function(){return Promise.resolve(m(o)).then(function(){n(e)})})})})}()}catch(e){return i(e)}return u&&u.then?u.then(void 0,i):u}(0,function(e){return Promise.resolve(h()).then(function(){return Promise.resolve(m(o)).then(function(){t(e)})})});if(i&&i.then)return i.then(function(){})})}catch(e){return Promise.reject(e)}})}exports.clearConfig=h,exports.config=m;
//# sourceMappingURL=config.js.map

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

import{spawn as e,SUBSCRIBE as r,UNSUBSCRIBE as n,send as t,subscriber as o}from"@onflow/util-actor";const i="config",u="PUT_CONFIG",l="GET_CONFIG",f="CONFIG/UPDATED",c=e=>e,a={[u]:(e,r,{key:n,value:t})=>{if(null==n)throw new Error("Missing 'key' for config/put.");e.put(n,t),e.broadcast(f,e.all())},[l]:(e,r,{key:n,fallback:t})=>{if(null==n)throw new Error("Missing 'key' for config/get");r.reply(e.get(n,t))},UPDATE_CONFIG:(e,r,{key:n,fn:t})=>{if(null==n)throw new Error("Missing 'key' for config/update");e.update(n,t||c),e.broadcast(f,e.all())},DELETE_CONFIG:(e,r,{key:n})=>{if(null==n)throw new Error("Missing 'key' for config/delete");e.delete(n),e.broadcast(f,e.all())},WHERE_CONFIG:(e,r,{pattern:n})=>{if(null==n)throw new Error("Missing 'pattern' for config/where");r.reply(e.where(n))},[r]:(e,r)=>{e.subscribe(r.from),e.send(r.from,f,e.all())},[n]:(e,r)=>{e.unsubscribe(r.from)}};function s(e,r){return t(i,u,{key:e,value:r}),w()}function E(e,r){return t(i,l,{key:e,fallback:r},{expectReply:!0,timeout:10})}function p(e,r=c){return t(i,"UPDATE_CONFIG",{key:e,fn:r}),w()}function y(e){return t(i,"DELETE_CONFIG",{key:e}),w()}function g(e){return t(i,"WHERE_CONFIG",{pattern:e},{expectReply:!0,timeout:10})}function k(r){return o(i,()=>e(a,i),r)}function w(){return{put:s,get:E,update:p,delete:y,where:g,subscribe:k}}e(a,i);export{w as config};
import{SUBSCRIBE as e,UNSUBSCRIBE as r,spawn as n,send as t,subscriber as o}from"@onflow/util-actor";function i(){return(i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}var u;"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var l=function e(r,n){void 0===r&&(r=[]);try{if(!r.length)return Promise.resolve(n);var t=r[0],o=r.slice(1);return Promise.resolve(p(t)).then(function(r){return null==r?e(o,n):r})}catch(e){return Promise.reject(e)}},c="config",f="PUT_CONFIG",a="GET_CONFIG",s="CONFIG/UPDATED",y=function(e){return e},v=((u={})[f]=function(e,r,n){var t=n.key,o=n.value;if(null==t)throw new Error("Missing 'key' for config/put.");e.put(t,o),e.broadcast(s,i({},e.all()))},u[a]=function(e,r,n){var t=n.key,o=n.fallback;if(null==t)throw new Error("Missing 'key' for config/get");r.reply(e.get(t,o))},u.GET_ALL_CONFIG=function(e,r){r.reply(i({},e.all()))},u.UPDATE_CONFIG=function(e,r,n){var t=n.key,o=n.fn;if(null==t)throw new Error("Missing 'key' for config/update");e.update(t,o||y),e.broadcast(s,i({},e.all()))},u.DELETE_CONFIG=function(e,r,n){var t=n.key;if(null==t)throw new Error("Missing 'key' for config/delete");e.delete(t),e.broadcast(s,i({},e.all()))},u.CLEAR_CONFIG=function(e,r){for(var n=0,t=Object.keys(e.all());n<t.length;n++)e.delete(t[n]);e.broadcast(s,i({},e.all()))},u.WHERE_CONFIG=function(e,r,n){var t=n.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");r.reply(e.where(t))},u[e]=function(e,r){e.subscribe(r.from),e.send(r.from,s,i({},e.all()))},u[r]=function(e,r){e.unsubscribe(r.from)},u);function m(e,r){return t(c,f,{key:e,value:r}),w()}function p(e,r){return t(c,a,{key:e,fallback:r},{expectReply:!0,timeout:10})}function b(){return t(c,"GET_ALL_CONFIG",null,{expectReply:!0,timeout:10})}function h(e,r){return void 0===r&&(r=y),t(c,"UPDATE_CONFIG",{key:e,fn:r}),w()}function d(e){return t(c,"DELETE_CONFIG",{key:e}),w()}function E(e){return t(c,"WHERE_CONFIG",{pattern:e},{expectReply:!0,timeout:10})}function g(e){return o(c,function(){return n(v,c)},e)}function O(){return t(c,"CLEAR_CONFIG")}function w(e){return null!=e&&"object"==typeof e&&Object.keys(e).map(function(r){return m(r,e[r])}),{put:m,get:p,all:b,first:l,update:h,delete:d,where:E,subscribe:g,overload:k}}n(v,c),w.put=m,w.get=p,w.all=b,w.first=l,w.update=h,w.delete=d,w.where=E,w.subscribe=g,w.overload=k;var P=function(e){return e};function k(e,r){return void 0===e&&(e={}),void 0===r&&(r=P),new Promise(function(n,t){try{return Promise.resolve(b()).then(function(o){var i=function(t,i){try{var u=function(){w(e);var t=r;return Promise.resolve(b()).then(function(e){return Promise.resolve(t(e)).then(function(e){return Promise.resolve(O()).then(function(){return Promise.resolve(w(o)).then(function(){n(e)})})})})}()}catch(e){return i(e)}return u&&u.then?u.then(void 0,i):u}(0,function(e){return Promise.resolve(O()).then(function(){return Promise.resolve(w(o)).then(function(){t(e)})})});if(i&&i.then)return i.then(function(){})})}catch(e){return Promise.reject(e)}})}export{O as clearConfig,w as config};
//# sourceMappingURL=config.modern.js.map

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

import{SUBSCRIBE as n,UNSUBSCRIBE as r,spawn as e,send as t,subscriber as o}from"@onflow/util-actor";var i,u="config",f="PUT_CONFIG",c="GET_CONFIG",l="CONFIG/UPDATED",a=function(n){return n},s=((i={})[f]=function(n,r,e){var t=e.key,o=e.value;if(null==t)throw new Error("Missing 'key' for config/put.");n.put(t,o),n.broadcast(l,n.all())},i[c]=function(n,r,e){var t=e.key,o=e.fallback;if(null==t)throw new Error("Missing 'key' for config/get");r.reply(n.get(t,o))},i.UPDATE_CONFIG=function(n,r,e){var t=e.key,o=e.fn;if(null==t)throw new Error("Missing 'key' for config/update");n.update(t,o||a),n.broadcast(l,n.all())},i.DELETE_CONFIG=function(n,r,e){var t=e.key;if(null==t)throw new Error("Missing 'key' for config/delete");n.delete(t),n.broadcast(l,n.all())},i.WHERE_CONFIG=function(n,r,e){var t=e.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");r.reply(n.where(t))},i[n]=function(n,r){n.subscribe(r.from),n.send(r.from,l,n.all())},i[r]=function(n,r){n.unsubscribe(r.from)},i);function E(n,r){return t(u,f,{key:n,value:r}),b()}function p(n,r){return t(u,c,{key:n,fallback:r},{expectReply:!0,timeout:10})}function y(n,r){return void 0===r&&(r=a),t(u,"UPDATE_CONFIG",{key:n,fn:r}),b()}function g(n){return t(u,"DELETE_CONFIG",{key:n}),b()}function k(n){return t(u,"WHERE_CONFIG",{pattern:n},{expectReply:!0,timeout:10})}function w(n){return o(u,function(){return e(s,u)},n)}function b(){return{put:E,get:p,update:y,delete:g,where:k,subscribe:w}}e(s,u);export{b as config};
import{SUBSCRIBE as e,UNSUBSCRIBE as r,spawn as n,send as t,subscriber as o}from"@onflow/util-actor";function i(){return(i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}var u;"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var l=function e(r,n){void 0===r&&(r=[]);try{if(!r.length)return Promise.resolve(n);var t=r[0],o=r.slice(1);return Promise.resolve(p(t)).then(function(r){return null==r?e(o,n):r})}catch(e){return Promise.reject(e)}},c="config",f="PUT_CONFIG",a="GET_CONFIG",s="CONFIG/UPDATED",y=function(e){return e},v=((u={})[f]=function(e,r,n){var t=n.key,o=n.value;if(null==t)throw new Error("Missing 'key' for config/put.");e.put(t,o),e.broadcast(s,i({},e.all()))},u[a]=function(e,r,n){var t=n.key,o=n.fallback;if(null==t)throw new Error("Missing 'key' for config/get");r.reply(e.get(t,o))},u.GET_ALL_CONFIG=function(e,r){r.reply(i({},e.all()))},u.UPDATE_CONFIG=function(e,r,n){var t=n.key,o=n.fn;if(null==t)throw new Error("Missing 'key' for config/update");e.update(t,o||y),e.broadcast(s,i({},e.all()))},u.DELETE_CONFIG=function(e,r,n){var t=n.key;if(null==t)throw new Error("Missing 'key' for config/delete");e.delete(t),e.broadcast(s,i({},e.all()))},u.CLEAR_CONFIG=function(e,r){for(var n=0,t=Object.keys(e.all());n<t.length;n++)e.delete(t[n]);e.broadcast(s,i({},e.all()))},u.WHERE_CONFIG=function(e,r,n){var t=n.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");r.reply(e.where(t))},u[e]=function(e,r){e.subscribe(r.from),e.send(r.from,s,i({},e.all()))},u[r]=function(e,r){e.unsubscribe(r.from)},u);function m(e,r){return t(c,f,{key:e,value:r}),w()}function p(e,r){return t(c,a,{key:e,fallback:r},{expectReply:!0,timeout:10})}function b(){return t(c,"GET_ALL_CONFIG",null,{expectReply:!0,timeout:10})}function h(e,r){return void 0===r&&(r=y),t(c,"UPDATE_CONFIG",{key:e,fn:r}),w()}function d(e){return t(c,"DELETE_CONFIG",{key:e}),w()}function E(e){return t(c,"WHERE_CONFIG",{pattern:e},{expectReply:!0,timeout:10})}function g(e){return o(c,function(){return n(v,c)},e)}function O(){return t(c,"CLEAR_CONFIG")}function w(e){return null!=e&&"object"==typeof e&&Object.keys(e).map(function(r){return m(r,e[r])}),{put:m,get:p,all:b,first:l,update:h,delete:d,where:E,subscribe:g,overload:k}}n(v,c),w.put=m,w.get=p,w.all=b,w.first=l,w.update=h,w.delete=d,w.where=E,w.subscribe=g,w.overload=k;var P=function(e){return e};function k(e,r){return void 0===e&&(e={}),void 0===r&&(r=P),new Promise(function(n,t){try{return Promise.resolve(b()).then(function(o){var i=function(t,i){try{var u=function(){w(e);var t=r;return Promise.resolve(b()).then(function(e){return Promise.resolve(t(e)).then(function(e){return Promise.resolve(O()).then(function(){return Promise.resolve(w(o)).then(function(){n(e)})})})})}()}catch(e){return i(e)}return u&&u.then?u.then(void 0,i):u}(0,function(e){return Promise.resolve(O()).then(function(){return Promise.resolve(w(o)).then(function(){t(e)})})});if(i&&i.then)return i.then(function(){})})}catch(e){return Promise.reject(e)}})}export{O as clearConfig,w as config};
//# sourceMappingURL=config.module.js.map

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@onflow/util-actor")):"function"==typeof define&&define.amd?define(["exports","@onflow/util-actor"],n):n((e=e||self).config={},e.utilActor)}(this,function(e,n){var r,t="config",o="PUT_CONFIG",i="GET_CONFIG",f="CONFIG/UPDATED",u=function(e){return e},c=((r={})[o]=function(e,n,r){var t=r.key,o=r.value;if(null==t)throw new Error("Missing 'key' for config/put.");e.put(t,o),e.broadcast(f,e.all())},r[i]=function(e,n,r){var t=r.key,o=r.fallback;if(null==t)throw new Error("Missing 'key' for config/get");n.reply(e.get(t,o))},r.UPDATE_CONFIG=function(e,n,r){var t=r.key,o=r.fn;if(null==t)throw new Error("Missing 'key' for config/update");e.update(t,o||u),e.broadcast(f,e.all())},r.DELETE_CONFIG=function(e,n,r){var t=r.key;if(null==t)throw new Error("Missing 'key' for config/delete");e.delete(t),e.broadcast(f,e.all())},r.WHERE_CONFIG=function(e,n,r){var t=r.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");n.reply(e.where(t))},r[n.SUBSCRIBE]=function(e,n){e.subscribe(n.from),e.send(n.from,f,e.all())},r[n.UNSUBSCRIBE]=function(e,n){e.unsubscribe(n.from)},r);function l(e,r){return n.send(t,o,{key:e,value:r}),y()}function s(e,r){return n.send(t,i,{key:e,fallback:r},{expectReply:!0,timeout:10})}function a(e,r){return void 0===r&&(r=u),n.send(t,"UPDATE_CONFIG",{key:e,fn:r}),y()}function d(e){return n.send(t,"DELETE_CONFIG",{key:e}),y()}function p(e){return n.send(t,"WHERE_CONFIG",{pattern:e},{expectReply:!0,timeout:10})}function E(e){return n.subscriber(t,function(){return n.spawn(c,t)},e)}function y(){return{put:l,get:s,update:a,delete:d,where:p,subscribe:E}}n.spawn(c,t),e.config=y});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@onflow/util-actor")):"function"==typeof define&&define.amd?define(["exports","@onflow/util-actor"],n):n((e=e||self).config={},e.utilActor)}(this,function(e,n){function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}var t;"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var o=function e(n,r){void 0===n&&(n=[]);try{if(!n.length)return Promise.resolve(r);var t=n[0],o=n.slice(1);return Promise.resolve(y(t)).then(function(n){return null==n?e(o,r):n})}catch(e){return Promise.reject(e)}},i="config",u="PUT_CONFIG",f="GET_CONFIG",c="CONFIG/UPDATED",l=function(e){return e},s=((t={})[u]=function(e,n,t){var o=t.key,i=t.value;if(null==o)throw new Error("Missing 'key' for config/put.");e.put(o,i),e.broadcast(c,r({},e.all()))},t[f]=function(e,n,r){var t=r.key,o=r.fallback;if(null==t)throw new Error("Missing 'key' for config/get");n.reply(e.get(t,o))},t.GET_ALL_CONFIG=function(e,n){n.reply(r({},e.all()))},t.UPDATE_CONFIG=function(e,n,t){var o=t.key,i=t.fn;if(null==o)throw new Error("Missing 'key' for config/update");e.update(o,i||l),e.broadcast(c,r({},e.all()))},t.DELETE_CONFIG=function(e,n,t){var o=t.key;if(null==o)throw new Error("Missing 'key' for config/delete");e.delete(o),e.broadcast(c,r({},e.all()))},t.CLEAR_CONFIG=function(e,n){for(var t=0,o=Object.keys(e.all());t<o.length;t++)e.delete(o[t]);e.broadcast(c,r({},e.all()))},t.WHERE_CONFIG=function(e,n,r){var t=r.pattern;if(null==t)throw new Error("Missing 'pattern' for config/where");n.reply(e.where(t))},t[n.SUBSCRIBE]=function(e,n){e.subscribe(n.from),e.send(n.from,c,r({},e.all()))},t[n.UNSUBSCRIBE]=function(e,n){e.unsubscribe(n.from)},t);function a(e,r){return n.send(i,u,{key:e,value:r}),E()}function y(e,r){return n.send(i,f,{key:e,fallback:r},{expectReply:!0,timeout:10})}function d(){return n.send(i,"GET_ALL_CONFIG",null,{expectReply:!0,timeout:10})}function p(e,r){return void 0===r&&(r=l),n.send(i,"UPDATE_CONFIG",{key:e,fn:r}),E()}function v(e){return n.send(i,"DELETE_CONFIG",{key:e}),E()}function b(e){return n.send(i,"WHERE_CONFIG",{pattern:e},{expectReply:!0,timeout:10})}function m(e){return n.subscriber(i,function(){return n.spawn(s,i)},e)}function h(){return n.send(i,"CLEAR_CONFIG")}function E(e){return null!=e&&"object"==typeof e&&Object.keys(e).map(function(n){return a(n,e[n])}),{put:a,get:y,all:d,first:o,update:p,delete:v,where:b,subscribe:m,overload:w}}n.spawn(s,i),E.put=a,E.get=y,E.all=d,E.first=o,E.update=p,E.delete=v,E.where=b,E.subscribe=m,E.overload=w;var g=function(e){return e};function w(e,n){return void 0===e&&(e={}),void 0===n&&(n=g),new Promise(function(r,t){try{return Promise.resolve(d()).then(function(o){var i=function(t,i){try{var u=function(){E(e);var t=n;return Promise.resolve(d()).then(function(e){return Promise.resolve(t(e)).then(function(e){return Promise.resolve(h()).then(function(){return Promise.resolve(E(o)).then(function(){r(e)})})})})}()}catch(e){return i(e)}return u&&u.then?u.then(void 0,i):u}(0,function(e){return Promise.resolve(h()).then(function(){return Promise.resolve(E(o)).then(function(){t(e)})})});if(i&&i.then)return i.then(function(){})})}catch(e){return Promise.reject(e)}})}e.clearConfig=h,e.config=E});
//# sourceMappingURL=config.umd.js.map
{
"name": "@onflow/config",
"version": "0.0.2",
"description": "A mechanism for configuring the Flow JS SDK and FCL",
"version": "1.0.0-alpha.1",
"description": "Config for FCL-JS",
"license": "Apache-2.0",

@@ -21,10 +21,7 @@ "author": "Dapper Labs <dev@dapperlabs.com>",

"devDependencies": {
"jest": "26.4.0",
"jest": "25.3.0",
"jest-esm-transformer": "1.0.0",
"microbundle": "0.12.3"
"microbundle": "0.12.0-next.8"
},
"dependencies": {
"@onflow/util-actor": "0.0.2"
},
"source": "src/index.js",
"source": "src/config.js",
"main": "dist/config.js",

@@ -39,3 +36,6 @@ "module": "dist/config.module.js",

"start": "microbundle watch"
},
"dependencies": {
"@onflow/util-actor": "^1.0.0-alpha.1"
}
}

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

Sorry, the diff of this file is not supported yet

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