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

jolenejs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jolenejs - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/jolenejs.cjs.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pragmajs");const t=e=>null!==e&&"object"==typeof e;function r(e,s){if(!t(e)||!t(s))return s;for(let[t,n]of Object.entries(s))t in s&&(e[t]=r(e[t],s[t]));return e}class s extends e.Pragma{constructor(){super(),this.createEvents("set","get","setHash"),this.on("setHash",(e=>{this._currentHash=e}))}set currentHash(e){this.triggerEvent("setHash",e)}set(e,t){this.triggerEvent("set",e,t);let s=e.split(">").map((e=>e.trim()));s[s.length-1];let n=s.reduceRight(((e,r,n)=>({[r]:n==s.length-1?t:Object.assign({},e),lastModified:new Date})),{}),i=s[0];return function(e,t){localStorage.setItem(e,JSON.stringify(t))}(i,r(this._get(i),n)),t}_get(...e){var r;return e.slice(1).reduce(((e,r)=>null!=e&&t(e)&&r in e?e[r]:null),(r=e[0],JSON.parse(localStorage.getItem(r))))}get(e){let t=e.split(">").map((e=>e.trim())),r=this._get(...t);return this.triggerEvent("get",e,r),r}}exports.Jolene=s;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pragmajs");const t=e=>null!==e&&"object"==typeof e;function r(e,l){if(!t(e)||!t(l))return l;for(let[t,n]of Object.entries(l))t in l&&(e[t]=r(e[t],l[t]));return e}class l{static watcher=e._p("jolene-watcher").createEvents("set","get");static on(){return l.watcher.on(...arguments)}static setLocal(e,t){return window.localStorage.setItem("jolene",JSON.stringify({[e]:t}))}static getLocal(e=null){let t=JSON.parse(window.localStorage.getItem("jolene"));return null==t?null:null==e?t:t[e]}static set(e,t){l.watcher.triggerEvent("set",e,t);let n=e.split(">").map((e=>e.trim())),s=n.reduceRight(((e,r,l)=>({[r]:l==n.length-1?t:Object.assign({},e),lastModified:new Date})),{}),a=n[0],i=r(l._get(a),s);return l.setLocal(a,i[a]),t}static _get(...e){return e.slice(1).reduce(((e,r)=>null!=e&&t(e)&&r in e?e[r]:null),l.getLocal(e[0]))}static get(e=null){if(null===e)return l.getLocal();let t=e.split(">").map((e=>e.trim())),r=l._get(...t);return l.watcher.triggerEvent("get",e.trim(),r),r}}exports.deepMerge=r,exports.isObj=t,exports.jolene=l;

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

import{Pragma as t}from"pragmajs";const e=t=>null!==t&&"object"==typeof t;function r(t,s){if(!e(t)||!e(s))return s;for(let[e,n]of Object.entries(s))e in s&&(t[e]=r(t[e],s[e]));return t}class s extends t{constructor(){super(),this.createEvents("set","get","setHash"),this.on("setHash",(t=>{this._currentHash=t}))}set currentHash(t){this.triggerEvent("setHash",t)}set(t,e){this.triggerEvent("set",t,e);let s=t.split(">").map((t=>t.trim()));s[s.length-1];let n=s.reduceRight(((t,r,n)=>({[r]:n==s.length-1?e:Object.assign({},t),lastModified:new Date})),{}),i=s[0];return function(t,e){localStorage.setItem(t,JSON.stringify(e))}(i,r(this._get(i),n)),e}_get(...t){var r;return t.slice(1).reduce(((t,r)=>null!=t&&e(t)&&r in t?t[r]:null),(r=t[0],JSON.parse(localStorage.getItem(r))))}get(t){let e=t.split(">").map((t=>t.trim())),r=this._get(...e);return this.triggerEvent("get",t,r),r}}export{s as Jolene};
import{_p as t}from"pragmajs";const e=t=>null!==t&&"object"==typeof t;function r(t,l){if(!e(t)||!e(l))return l;for(let[e,n]of Object.entries(l))e in l&&(t[e]=r(t[e],l[e]));return t}class l{static watcher=t("jolene-watcher").createEvents("set","get");static on(){return l.watcher.on(...arguments)}static setLocal(t,e){return window.localStorage.setItem("jolene",JSON.stringify({[t]:e}))}static getLocal(t=null){let e=JSON.parse(window.localStorage.getItem("jolene"));return null==e?null:null==t?e:e[t]}static set(t,e){l.watcher.triggerEvent("set",t,e);let n=t.split(">").map((t=>t.trim())),a=n.reduceRight(((t,r,l)=>({[r]:l==n.length-1?e:Object.assign({},t),lastModified:new Date})),{}),i=n[0],c=r(l._get(i),a);return l.setLocal(i,c[i]),e}static _get(...t){return t.slice(1).reduce(((t,r)=>null!=t&&e(t)&&r in t?t[r]:null),l.getLocal(t[0]))}static get(t=null){if(null===t)return l.getLocal();let e=t.split(">").map((t=>t.trim())),r=l._get(...e);return l.watcher.triggerEvent("get",t.trim(),r),r}}export{r as deepMerge,e as isObj,l as jolene};

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jolenejs={})}(this,(function(t){"use strict";function e(t,e=null,n=["rerun the code 10 times"],i=null,r=!1){if(!O()&&!r)return null;console.error(`%c 🧯 pragma.js %c \n\n encountered a soft error 🔫 %c \n\n \n${i?`Triggered by: [${i.key} ${i}]`:""}\n \n${t} %c\n\n \n${null!=e?`Potential ${e}: \n\t${n.join("\n\t")}`:""}\n `,"font-size:15px","font-size: 12px;","color:whitesmoke","color:white")}function n(){if(!O())return null;console.log(...arguments)}function i(){if(!O())return null;console.log("%c 🌴 [pragma] \n\n ","font-size:12px; color:#86D787;",...arguments,"\n")}class r{constructor(t){this.self=t,this.actions=new Map,this.delete=this.destroy}addWithKey(t,e=null){return e=e||this.actions.size,this.actions.set(e,t),e}add(...t){let e=[];for(let n of t)e.push(this.addWithKey(n));return e.length>1?e:e[0]}forAction(t){for(let[e,n]of this.actions)t(e,n)}exec(...t){this.execAs(this.self,...t)}destroy(...t){t.forEach((t=>this.actions.delete(t)))}execAs(t,...e){this.forAction(((n,i)=>{let r=null;r="function"==typeof i.bind?i.bind(t)(...e):i(...e),"function"==typeof r&&r({key:n,action:i,replaceWith:t=>{},selfDestruct:()=>{this.destroy(n)}})}))}}function s(){return Math.random().toString(36).substring(3,6)+Math.random().toString(36).substring(5,8)}function o(){return a(8)}function a(t=7){return t<5?s():(s()+a(t-5)).substring(0,t)}function h(t){return a(t)}function l(t,e){for(let[n,i]of Object.entries(e))t[n]=i;return t}const c=t=>t.replace(/([-_]\w)/g,(t=>t[1].toUpperCase()));function u(t,e){let n=`${t}Chain`,i=`on${t.capitalize()}`;return e[n]=new r(e),e[i]=function(t,i){e[n].addWithKey(t,i)},{chainName:n,eventName:i}}function f(t,...e){for(let n of e)u(n,t)}function d(t,e){let n=u(t,e),i=`is${t.capitalize()}ed`;e[n.chainName].add((()=>{e[i]=!0})),e[n.eventName]=function(t){if(e[i])return t(e);e[n.chainName].add(t)}}function p(t,...e){for(let n of e)d(n,t)}String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};const g=t=>t.toString().replace(/[^a-z0-9]/gi,"-").toLowerCase();globalThis.pragmaSpace||(globalThis.pragmaSpace={}),p(globalThis.pragmaSpace,"docLoad");const m=globalThis.pragmaSpace.onDocLoad;function y(){globalThis.pragmaSpace.isDocLoaded||(i("📰 document is loaded."),globalThis.pragmaSpace.docLoadChain.exec())}document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&y()})),document.addEventListener("turbolinks:load",(()=>{i("🚀 TURBOLINKS loaded"),y()}));var v=/[#.]/g;function x(t,e="div"){var n=t||"",i={tag:e},r=0;let s,o,a;for(;r<n.length;)v.lastIndex=r,a=v.exec(n),s=n.slice(r,a?a.index:n.length),s&&(o?"#"===o?i.id=s:i.class?i.class.push(s):i.class=[s]:i.tag=s,r+=s.length),a&&(o=a[0],r++);return i}function b(t,n,i){if(!Array.isArray(t))return e(`Could not ${i} class [${t}] -> [${n}]`);for(let e of t){let t=e.split(" ");t.length>1?b(t,n,i):n.classList[i](e)}}function _(t,e){b(t,e,"add")}function C(t,e){b(t,e,"remove")}function $(t,e){b(t,e,"toggle")}function E(t){t=t.trim();try{let e=document.querySelector(t);if(e)return e}catch{}let e=x(t),n=document.createElement(e.tag||"div");return e.id&&(n.id=e.id),e.class&&_(e.class,n),n}function A(t){return document.createRange().createContextualFragment(t)}function T(t){return t instanceof Element?t:"string"==typeof t?"<"===t[0]?A(t):E(t):e(`Could not find/create element from [${t}]`)}const S={html:(t,e)=>{e.innerHTML=t},pcss:(t,e)=>{for(let[n,i]of M.cssToDict(t))e.style[c(n)]=i}},M={cssToDict:t=>{t=t.replace(/\n/g,";").replace(/:/g," ");let n=new Map;for(let e of t.split(";")){if(e.replace(/\s/g,"").length<2)continue;e=e.trim().split(" ");let t=e[0];e.shift(),n.set(t.trim(),e.join(" ").trim())}let i=[];for(const[t,e]of n.entries())CSS.supports(t,e)||i.push(`${t.trim()}: ${e.trim()}`);return i.length>0&&e("CSS syntax error","typos",i),n},css:t=>{let e="";for(let[n,i]of M.cssToDict(t))e+=`${n}:${i};`;return e},html:t=>t};function O(){return globalThis.pragmaSpace.dev}globalThis.pragmaSpace||(globalThis.pragmaSpace={}),globalThis.pragmaSpace.dev=globalThis.pragmaSpace.dev||"undefined"!=typeof process&&process.env&&"development"===process.env.NODE_ENV;var w=Object.freeze({__proto__:null,_deving:O,throwSoft:e,log:n,suc:i,whenDOM:m,parseQuery:x,addClassAryTo:_,removeClassAryFrom:C,toggleClassAryOf:$,selectOrCreateDOM:E,elementFrom:T,toHTMLAttr:g,fragmentFromString:A,fillSVG:function(t,e){k(t).findAll("path").forEach((t=>{const n=t.attr("fill");"none"!=n&&"transparent"!=n&&t.attr("fill",e)}))},generateRandomKey:h,objDiff:l,aryDiff:function(t,e){return t.filter((t=>e.indexOf(t)<0))},_extend:function(t,e){Object.setPrototypeOf(t,l(Object.getPrototypeOf(t),e))},overwrite:function(t,e,n){let i=t[e];t[`_${e}`]=i.bind(t),t[e]=n},createEventChains:p,createChains:f,snake2camel:c,mimic:function(t,e,n){for(let i of n||Object.keys(e)){let n=Object.getOwnPropertyDescriptor(e,i);if(!n)break;Object.defineProperty(t,i,n)}},bench:function(t,e){console.time(e),t(),console.timeEnd(e)},addStyles:function(t,e="injected-pragma-style"){k(`style#${e}-${s()}`,t).appendTo("head")},rk:a,rk5:s,rk8:o,parse:M,apply:S,createTemplate:t=>(new q).run((function(){f(this,"config"),this.config=function(t){return this.configChain.exec(t),this},this.onConfig(((t={})=>{["events","chains","exports","persistentExports"].forEach((e=>{t[e]&&(this[`_${e}`]=t[e],delete t[e])})),this._events&&p(this,...this._events),this._chains&&f(this,...this._chains);for(let[e,n]of Object.entries(t))this[e]=n,this.export(e);this._exports&&this.export(...this._exports)})),this.export("exports","config","exportChain","configChain","onConfig")}),(function(){"object"==typeof t&&this.config(t)}))});function j(t){return null==t||null==t?e(`Could not find a DOM element for ${t}`):t.element?j(t.element):T(t)}function k(t,e){let n=j(t);var i,r;return n.constructor===DocumentFragment&&(i=n,(r=document.createElement("template")).appendChild(i.cloneNode(!0)),n=r.firstChild),n instanceof Element&&(n.init(),n._render()),"string"==typeof e&&n.html(e),n}const D={init:function(){this.isPragmaElement=!0,p(this,"docLoad","render"),m((()=>this.docLoadChain.exec(this)))},_render:function(){this.renderChain.exec(this)},appendTo:function(t){return this.onDocLoad((()=>{this._parentElement=j(t),this._parentElement.appendChild(this),this._render()})),this},prependTo:function(t){return this.onDocLoad((()=>{this._parentElement=j(t),this._parentElement.prepend(this),this._render()})),this},append:function(...t){return this.onRender((()=>{for(let e of t){let t=j(e);this.appendChild(t)}})),this},destroy:function(){this.onRender((()=>{this.parentElement&&this.parentElement.removeChild(this)}))},css:function(t){return this.onRender((()=>{S.pcss(t,this)})),this},setText:function(t){return t?(this.onRender((()=>{this.textContent=t})),this):this.text},html:function(t){return t?(this.onRender((()=>{S.html(t,this)})),this):this.innerHTML},setId:function(t){return this.id=t,this},setData:function(t){for(let[e,n]of Object.entries(t))this.dataset[e]=n;return this},getData:function(t){return this.dataset[t]},addClass:function(...t){return _(t,this),this},removeClass:function(...t){return C(t,this),this},toggleClass:function(...t){return $(t,this),this},listenTo:function(...t){return this.onRender((()=>{this.addEventListener(...t)})),this},attr:function(t,e){if("string"==typeof t){if(void 0===e)return this.getAttribute(t);const n=t;(t={})[n]=e}for(let[e,n]of Object.entries(t))this.setAttribute(e,n);return this},find:function(){return k(this.query(...arguments))},findAll:function(t){return Array.from(this.queryAll(t)).map((t=>k(t)))},query:function(){return this.querySelector(...arguments)},queryAll:function(t){return this.querySelectorAll(t)},hide:function(){return this.style.display="none",this},show:function(){return this.style.display="",this},deepQueryAll:function(t){let e=Array.from(this.queryAll(t));for(let n of this.children)e=e.concat(n.deepQueryAll(t));return e},deepFindAll:function(t){return this.deepQueryAll(t).map((t=>k(t)))},rect:function(){return"function"==typeof this.getBoundingClientRect?this.getBoundingClientRect():{}},offset:function(t){t&&["width","height","left","right","top","bottom"].forEach((e=>{e in t&&(this.style[e]=t[e]+"px")}));var e=this.rect();return{top:e.top+window.scrollY,left:e.left+window.scrollX}},x:function(t){return this.left+this.width/2-t/2}},L={top:function(){return this.offset().top},left:function(){return this.offset().left},width:function(){return this.rect().width},height:function(){return this.rect().height},text:function(){return this.textContent},classArray:function(){return Array.from(this.classList)},childrenArray:function(){return Array.from(this.children)}};for(let[t,e]of Object.entries(D))Element.prototype[t]=e;for(let[t,e]of Object.entries(L))Object.defineProperty(Element.prototype,t,{get:e,configurable:!0});class R{constructor(t){this._childMap=new Map,this.key="string"==typeof t?t:o(),this.containsKey=this.childMap.has}set childMap(t){for(let[e,n]of t)n instanceof R&&this.add(n)}get childMap(){return this._childMap}get kidsum(){return this.childMap.size}get hasKids(){return this.kidsum>0}get shape(){return this.shapePrefix()}get master(){return null==this.parent||null==this.parent.parent?this.parent:this.parent.master}get children(){return Array.from(this.childMap.values())}get depthKey(){return this.parent?this.parent.depthKey+"<~<"+this.key:this.key}get allChildren(){if(!this.hasKids)return null;let t=this.children;for(let e of t){let n=e.allChildren;n&&(t=t.concat(n))}return t}get(t){return this.childMap.get(t)}find(t){if(this.childMap.has(t))return this.childMap.get(t);for(let e of this.childMap.values()){let n;try{n=e.find(t)}catch{}if(n)return n}}adopt(...t){for(let e of t)this.add(e);return this}add(t,n=!1){return t?!n&&this.childMap.has(t.key)?(t.key=`${t.key}<${s()}`,this.add(t)):(t.parent=this,void this.childMap.set(t.key,t)):e(`Could not add [${t}] to [${this.id}]`)}delete(t){return this.remove(t)}remove(t){this.childMap.get(t)&&this.childMap.delete(t)}shapePrefix(t=""){let e=`${t}| ${this.type} - ${this.key} \n`;if(this.hasKids){t+="| ";for(let n of this.children)e+=n.shapePrefix(t)}return e}}const z={parent:(t,e)=>{t.parent=e},value:(t,e)=>{t.value=e},key:(t,e)=>{t.key=e},class:(t,e)=>{t._class=e},element:(t,n)=>{if(!(n instanceof Element))return e(`Could not add ${n} as the element of [${t}]`);t.element=n},children:(t,e)=>{if(e.constructor==Array)return t.buildAry(e);t.build(e)},childTemplate:(t,e)=>{}};function P(t,e){return{val:t,set:e}}function N(t,e){return t=e.min?Math.max(e.min,t):t,e.max?Math.min(e.max,t):t}function K(t,n){return function(t){return t&&null!=t.min&&null!=t.max}(n)?(null==t&&(t=n.min),t=(t=t>n.max?n.min:t)<n.min?n.max:t):e(`Could not loop value, since range (${JSON.stringify(n)}) is unbounded`)}class q extends R{constructor(t,e){super(),p(this,"export"),this.actionChain=new r,this._events=new Map,"object"==typeof t?function(t,e){let n=new Map;for(let[i,r]of Object.entries(t))z.hasOwnProperty(i)?z[i](e,r):n.set(i,r);e.element&&e.element.whenInDOM((t=>{for(let[i,r]of n)if(i=i.toLowerCase(),i.includes("on")){let n=i.split("on")[1].trim();t.listenTo(n,(()=>{e.action(r)}))}}))}(t,this):this.key=t,this.element||this.as()}listenTo(t,e){return this.element.listenTo(t,e.bind(this)),this}_addToEventChain(t,...e){let n=this._events.get(t);if(n){let i=n.add(...e);return this._events.set(t,n),i}return null}createEvent(t,...e){let n=new r(this);return this._events.set(t,n),e.length>0&&this.on(t,e),this}createEvents(...t){return t.forEach((t=>{this.createEvent(t)})),this}triggerEvents(t,...e){return t.forEach((t=>{this.triggerEvent(t,...e)})),this}triggerEvent(t,...e){return this._events.has(t)?(this._events.get(t).execAs(this,...e),this):w.throwSoft(`pragma doesnt have ${event} - cannot .triggerEvent("${event}")]`,this)}_on(t,...e){let n=this._addToEventChain(t,...e);return null===n?w.throwSoft(`pragma doesnt have ${t} - cannot .on("${t}")`,this):n}on(){return this._on(...arguments),this}_onNext(t,e){this._on(t,(function(){return e(...arguments),t=>{t.selfDestruct()}}))}onNext(){return this._onNext(...arguments),this}createWires(...t){return t.forEach((t=>this.createWire(t))),this}createWire(t){let e={change:`${t}Change`,set:`${t}Set`};return this.createEvents(e.change,e.set),Object.defineProperty(this,t,{set:n=>{let i=function(t,e,n){if(n)return P(K(t,n),!0);if(e){let n=N(t,e);return P(n,n===t)}return P(t,!0)}(n,this[`_${t}Range`],this[`_${t}Loop`]);const r=this[`_${t}`];i.set&&i.val!==r&&(this[`_${t}`]=i.val,this.triggerEvent(e.change,i.val,r)),this.triggerEvent(e.set,n,r)},get:()=>this[`_${t}`]}),this[`set${t.capitalize()}`]=e=>(this[`${t}`]=e,this),this[`set${t.capitalize()}Silently`]=e=>(this[`_${t}`]=e,this),this[`set${t.capitalize()}Loop`]=(e,n)=>(this[`_${t}Loop`]={min:e,max:n},this),this[`set${t.capitalize()}Range`]=(e,n)=>(this[`_${t}Range`]={min:e,max:n},this),this}get _e(){return this.element}setElement(t,e=!0){return this.elementDOM=t,e&&this.element.id&&(this.id=this.element.id),this}get element(){return this.elementDOM}set element(t){this.setElement(t)}setRange(t=null,e=null){return this.range=this.range||{},this.range.min=null===t?this.range.min:t,this.range.max=null===e?this.range.max:e,this}breakLoop(){return this._loopVal=!1,this}setLoop(t,e){return this.setRange(t,e),this._loopVal=!0,this}get dv(){return this.v-this._lv}get value(){return this.v}setValue(t){return this.value=t,this}set value(t){let e=function(t,e,n){if(!e)return P(t,!0);if(n)return P(K(t,e),!0);let i=N(t,e);return P(i,i==t)}(t,this.range,this._loopVal);e.set&&(this._lv=this.v,this.v=e.val,this.exec())}exec(){return this.actionChain.execAs(this,...arguments),this}setKey(t){return this.key=t,this}set key(t){this._KEY=null==t?h():t}get key(){return this._KEY}set id(t){this.element&&(this.element.id=this.id)}get id(){return g(this.key)}buildAry(t){for(let e of t)this.add(new q(e,this));return this}build(...t){return this.buildAry(t)}as(t=null,e){return t=t||`div#${this.id}.pragma`,this.setElement(k(t,e),!1),this}addExport(t){this.exports=this.exports||new Set,this.exports.add(t)}export(...t){for(let e of t)this.addExport(e)}import(...t){let e=new r;for(let n of t)"function"==typeof n&&(n=n()),n.exports&&w.mimic(this,n,n.exports),n.exportChain&&e.add((t=>{n.exportChain.exec(this)}));return e.exec(),this}from(t){return t.exports&&w.mimic(this,t,t.exports),t.exportChain&&t.exportChain.exec(this),this}wireTo(t){let e=this;return t.do((function(){e.value=this.value})),this}do(){return this.actionChain.add(...arguments),this}extend(t,e){return w.overwrite(this,t,e),this}run(...t){let n=t[0];return"function"==typeof n?this._runAry(t):"object"==typeof n?this._runAry(Object.values(n)):e(`Could not run [${t}] as [${this}]`),this}_runAry(t){for(let e of t)this.runAs(e)}runAs(t){return t.bind(this)()}containAry(t,n="append"){for(let i of t)super.add(i),i.isRendered?e(`[${i}] is already appended`):this.element[n](i);return this}contain(...t){return this.containAry(t)}containFirst(...t){return this.containAry(t.reverse(),"prepend")}pragmatize(){return this.element.appendTo(this.parent&&this.parent.element||"body"),this}pragmatizeAt(t){return this.element.appendTo(t),this}addListeners(t){for(let[e,n]of Object.entries(t))this.on(e).do(n);return this}}const H=["html","css","addClass","removeClass","toggleClass","setId","append","prepend","appendTo","prependTo","setData"];for(let t of H)q.prototype[t]=function(){return this.element[t](...arguments),this};const I=["getData"];for(let t of I)q.prototype[t]=function(){return this.element[t](...arguments)};const F=["offset","text","top","left","width","height","x","classArray"];for(let t of F)Object.defineProperty(q.prototype,t,{get:function(){return this.element[t]}});globalThis.pragmaSpace||(globalThis.pragmaSpace={}),globalThis.pragmaSpace.integrateMousetrap=function(t){"function"==typeof t&&(q.prototype.bind=function(e,n,i){let r=this;return t.bind(e,(function(){return r.runAs(n)}),i),this},globalThis.pragmaSpace.mousetrapIntegration=!0,i("Mousetrap configuration detected! Extended Pragmas to support .bind() method!"))};try{globalThis.pragmaSpace.integrateMousetrap(Mousetrap)}catch(t){n("Tried to integrate extensions, but failed. To disable,\n this attempt: globalThis.pragmaSpace.integrate3rdParties = false")}const W=t=>null!==t&&"object"==typeof t;function V(t,e){if(!W(t)||!W(e))return e;for(let[n,i]of Object.entries(e))n in e&&(t[n]=V(t[n],e[n]));return t}t.Jolene=class extends q{constructor(){super(),this.createEvents("set","get","setHash"),this.on("setHash",(t=>{this._currentHash=t}))}set currentHash(t){this.triggerEvent("setHash",t)}set(t,e){this.triggerEvent("set",t,e);let n=t.split(">").map((t=>t.trim()));n[n.length-1];let i=n.reduceRight(((t,i,r)=>({[i]:r==n.length-1?e:Object.assign({},t),lastModified:new Date})),{}),r=n[0];return function(t,e){localStorage.setItem(t,JSON.stringify(e))}(r,V(this._get(r),i)),e}_get(...t){var e;return t.slice(1).reduce(((t,e)=>null!=t&&W(t)&&e in t?t[e]:null),(e=t[0],JSON.parse(localStorage.getItem(e))))}get(t){let e=t.split(">").map((t=>t.trim())),n=this._get(...e);return this.triggerEvent("get",t,n),n}},Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jolenejs={})}(this,(function(t){"use strict";function e(t,e=null,n=["rerun the code 10 times"],i=null,r=!1){if(!M()&&!r)return null;console.error(`%c 🧯 pragma.js %c \n\n encountered a soft error 🔫 %c \n\n \n${i?`Triggered by: [${i.key} ${i}]`:""}\n \n${t} %c\n\n \n${null!=e?`Potential ${e}: \n\t${n.join("\n\t")}`:""}\n `,"font-size:15px","font-size: 12px;","color:whitesmoke","color:white")}function n(){if(!M())return null;console.log(...arguments)}function i(){if(!M())return null;console.log("%c 🌴 [pragma] \n\n ","font-size:12px; color:#86D787;",...arguments,"\n")}class r{constructor(t){this.self=t,this.actions=new Map,this.delete=this.destroy}addWithKey(t,e=null){return e=e||this.actions.size,this.actions.set(e,t),e}add(...t){let e=[];for(let n of t)e.push(this.addWithKey(n));return e.length>1?e:e[0]}forAction(t){for(let[e,n]of this.actions)t(e,n)}exec(...t){this.execAs(this.self,...t)}destroy(...t){t.forEach((t=>this.actions.delete(t)))}execAs(t,...e){this.forAction(((n,i)=>{let r=null;r="function"==typeof i.bind?i.bind(t)(...e):i(...e),"function"==typeof r&&r({key:n,action:i,replaceWith:t=>{},selfDestruct:()=>{this.destroy(n)}})}))}}function s(){return Math.random().toString(36).substring(3,6)+Math.random().toString(36).substring(5,8)}function o(){return a(8)}function a(t=7){return t<5?s():(s()+a(t-5)).substring(0,t)}function l(t){return a(t)}function h(t,e){for(let[n,i]of Object.entries(e))t[n]=i;return t}const c=t=>t.replace(/([-_]\w)/g,(t=>t[1].toUpperCase()));function u(t,e){let n=`${t}Chain`,i=`on${t.capitalize()}`;return e[n]=new r(e),e[i]=function(t,i){e[n].addWithKey(t,i)},{chainName:n,eventName:i}}function f(t,...e){for(let n of e)u(n,t)}function d(t,e){let n=u(t,e),i=`is${t.capitalize()}ed`;e[n.chainName].add((()=>{e[i]=!0})),e[n.eventName]=function(t){if(e[i])return t(e);e[n.chainName].add(t)}}function p(t,...e){for(let n of e)d(n,t)}String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};const g=t=>t.toString().replace(/[^a-z0-9]/gi,"-").toLowerCase();globalThis.pragmaSpace||(globalThis.pragmaSpace={}),p(globalThis.pragmaSpace,"docLoad");const m=globalThis.pragmaSpace.onDocLoad;function y(){globalThis.pragmaSpace.isDocLoaded||(i("📰 document is loaded."),globalThis.pragmaSpace.docLoadChain.exec())}document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&y()})),document.addEventListener("turbolinks:load",(()=>{i("🚀 TURBOLINKS loaded"),y()}));var v=/[#.]/g;function x(t,e="div"){var n=t||"",i={tag:e},r=0;let s,o,a;for(;r<n.length;)v.lastIndex=r,a=v.exec(n),s=n.slice(r,a?a.index:n.length),s&&(o?"#"===o?i.id=s:i.class?i.class.push(s):i.class=[s]:i.tag=s,r+=s.length),a&&(o=a[0],r++);return i}function b(t,n,i){if(!Array.isArray(t))return e(`Could not ${i} class [${t}] -> [${n}]`);for(let e of t){let t=e.split(" ");t.length>1?b(t,n,i):n.classList[i](e)}}function _(t,e){b(t,e,"add")}function C(t,e){b(t,e,"remove")}function $(t,e){b(t,e,"toggle")}function E(t){t=t.trim();try{let e=document.querySelector(t);if(e)return e}catch{}let e=x(t),n=document.createElement(e.tag||"div");return e.id&&(n.id=e.id),e.class&&_(e.class,n),n}function w(t){return document.createRange().createContextualFragment(t)}function A(t){return t instanceof Element?t:"string"==typeof t?"<"===t[0]?w(t):E(t):e(`Could not find/create element from [${t}]`)}const T={html:(t,e)=>{e.innerHTML=t},pcss:(t,e)=>{for(let[n,i]of S.cssToDict(t))e.style[c(n)]=i}},S={cssToDict:t=>{t=t.replace(/\n/g,";").replace(/:/g," ");let n=new Map;for(let e of t.split(";")){if(e.replace(/\s/g,"").length<2)continue;e=e.trim().split(" ");let t=e[0];e.shift(),n.set(t.trim(),e.join(" ").trim())}let i=[];for(const[t,e]of n.entries())CSS.supports(t,e)||i.push(`${t.trim()}: ${e.trim()}`);return i.length>0&&e("CSS syntax error","typos",i),n},css:t=>{let e="";for(let[n,i]of S.cssToDict(t))e+=`${n}:${i};`;return e},html:t=>t};function M(){return globalThis.pragmaSpace.dev}globalThis.pragmaSpace||(globalThis.pragmaSpace={}),globalThis.pragmaSpace.dev=globalThis.pragmaSpace.dev||"undefined"!=typeof process&&process.env&&"development"===process.env.NODE_ENV;var O=Object.freeze({__proto__:null,_deving:M,throwSoft:e,log:n,suc:i,whenDOM:m,parseQuery:x,addClassAryTo:_,removeClassAryFrom:C,toggleClassAryOf:$,selectOrCreateDOM:E,elementFrom:A,toHTMLAttr:g,fragmentFromString:w,fillSVG:function(t,e){L(t).findAll("path").forEach((t=>{const n=t.attr("fill");"none"!=n&&"transparent"!=n&&t.attr("fill",e)}))},generateRandomKey:l,objDiff:h,aryDiff:function(t,e){return t.filter((t=>e.indexOf(t)<0))},_extend:function(t,e){Object.setPrototypeOf(t,h(Object.getPrototypeOf(t),e))},overwrite:function(t,e,n){let i=t[e];t[`_${e}`]=i.bind(t),t[e]=n},createEventChains:p,createChains:f,snake2camel:c,mimic:function(t,e,n){for(let i of n||Object.keys(e)){let n=Object.getOwnPropertyDescriptor(e,i);if(!n)break;Object.defineProperty(t,i,n)}},bench:function(t,e){console.time(e),t(),console.timeEnd(e)},addStyles:function(t,e="injected-pragma-style"){L(`style#${e}-${s()}`,t).appendTo("head")},rk:a,rk5:s,rk8:o,parse:S,apply:T,createTemplate:t=>(new q).run((function(){f(this,"config"),this.config=function(t){return this.configChain.exec(t),this},this.onConfig(((t={})=>{["events","chains","exports","persistentExports"].forEach((e=>{t[e]&&(this[`_${e}`]=t[e],delete t[e])})),this._events&&p(this,...this._events),this._chains&&f(this,...this._chains);for(let[e,n]of Object.entries(t))this[e]=n,this.export(e);this._exports&&this.export(...this._exports)})),this.export("exports","config","exportChain","configChain","onConfig")}),(function(){"object"==typeof t&&this.config(t)}))});function j(t){return null==t||null==t?e(`Could not find a DOM element for ${t}`):t.element?j(t.element):A(t)}function L(t,e){let n=j(t);var i,r;return n.constructor===DocumentFragment&&(i=n,(r=document.createElement("template")).appendChild(i.cloneNode(!0)),n=r.firstChild),n instanceof Element&&(n.init(),n._render()),"string"==typeof e&&n.html(e),n}const k={init:function(){this.isPragmaElement=!0,p(this,"docLoad","render"),m((()=>this.docLoadChain.exec(this)))},_render:function(){this.renderChain.exec(this)},appendTo:function(t){return this.onDocLoad((()=>{this._parentElement=j(t),this._parentElement.appendChild(this),this._render()})),this},prependTo:function(t){return this.onDocLoad((()=>{this._parentElement=j(t),this._parentElement.prepend(this),this._render()})),this},append:function(...t){return this.onRender((()=>{for(let e of t){let t=j(e);this.appendChild(t)}})),this},destroy:function(){this.onRender((()=>{this.parentElement&&this.parentElement.removeChild(this)}))},css:function(t){return this.onRender((()=>{T.pcss(t,this)})),this},setText:function(t){return t?(this.onRender((()=>{this.textContent=t})),this):this.text},html:function(t){return t?(this.onRender((()=>{T.html(t,this)})),this):this.innerHTML},setId:function(t){return this.id=t,this},setData:function(t){for(let[e,n]of Object.entries(t))this.dataset[e]=n;return this},getData:function(t){return this.dataset[t]},addClass:function(...t){return _(t,this),this},removeClass:function(...t){return C(t,this),this},toggleClass:function(...t){return $(t,this),this},listenTo:function(...t){return this.onRender((()=>{this.addEventListener(...t)})),this},attr:function(t,e){if("string"==typeof t){if(void 0===e)return this.getAttribute(t);const n=t;(t={})[n]=e}for(let[e,n]of Object.entries(t))this.setAttribute(e,n);return this},find:function(){return L(this.query(...arguments))},findAll:function(t){return Array.from(this.queryAll(t)).map((t=>L(t)))},query:function(){return this.querySelector(...arguments)},queryAll:function(t){return this.querySelectorAll(t)},hide:function(){return this.style.display="none",this},show:function(){return this.style.display="",this},deepQueryAll:function(t){let e=Array.from(this.queryAll(t));for(let n of this.children)e=e.concat(n.deepQueryAll(t));return e},deepFindAll:function(t){return this.deepQueryAll(t).map((t=>L(t)))},rect:function(){return"function"==typeof this.getBoundingClientRect?this.getBoundingClientRect():{}},offset:function(t){t&&["width","height","left","right","top","bottom"].forEach((e=>{e in t&&(this.style[e]=t[e]+"px")}));var e=this.rect();return{top:e.top+window.scrollY,left:e.left+window.scrollX}},x:function(t){return this.left+this.width/2-t/2}},D={top:function(){return this.offset().top},left:function(){return this.offset().left},width:function(){return this.rect().width},height:function(){return this.rect().height},text:function(){return this.textContent},classArray:function(){return Array.from(this.classList)},childrenArray:function(){return Array.from(this.children)}};for(let[t,e]of Object.entries(k))Element.prototype[t]=e;for(let[t,e]of Object.entries(D))Object.defineProperty(Element.prototype,t,{get:e,configurable:!0});class R{constructor(t){this._childMap=new Map,this.key="string"==typeof t?t:o(),this.containsKey=this.childMap.has}set childMap(t){for(let[e,n]of t)n instanceof R&&this.add(n)}get childMap(){return this._childMap}get kidsum(){return this.childMap.size}get hasKids(){return this.kidsum>0}get shape(){return this.shapePrefix()}get master(){return null==this.parent||null==this.parent.parent?this.parent:this.parent.master}get children(){return Array.from(this.childMap.values())}get depthKey(){return this.parent?this.parent.depthKey+"<~<"+this.key:this.key}get allChildren(){if(!this.hasKids)return null;let t=this.children;for(let e of t){let n=e.allChildren;n&&(t=t.concat(n))}return t}get(t){return this.childMap.get(t)}find(t){if(this.childMap.has(t))return this.childMap.get(t);for(let e of this.childMap.values()){let n;try{n=e.find(t)}catch{}if(n)return n}}adopt(...t){for(let e of t)this.add(e);return this}add(t,n=!1){return t?!n&&this.childMap.has(t.key)?(t.key=`${t.key}<${s()}`,this.add(t)):(t.parent=this,void this.childMap.set(t.key,t)):e(`Could not add [${t}] to [${this.id}]`)}delete(t){return this.remove(t)}remove(t){this.childMap.get(t)&&this.childMap.delete(t)}shapePrefix(t=""){let e=`${t}| ${this.type} - ${this.key} \n`;if(this.hasKids){t+="| ";for(let n of this.children)e+=n.shapePrefix(t)}return e}}const z={parent:(t,e)=>{t.parent=e},value:(t,e)=>{t.value=e},key:(t,e)=>{t.key=e},class:(t,e)=>{t._class=e},element:(t,n)=>{if(!(n instanceof Element))return e(`Could not add ${n} as the element of [${t}]`);t.element=n},children:(t,e)=>{if(e.constructor==Array)return t.buildAry(e);t.build(e)},childTemplate:(t,e)=>{}};function P(t,e){return{val:t,set:e}}function N(t,e){return t=e.min?Math.max(e.min,t):t,e.max?Math.min(e.max,t):t}function K(t,n){return function(t){return t&&null!=t.min&&null!=t.max}(n)?(null==t&&(t=n.min),t=(t=t>n.max?n.min:t)<n.min?n.max:t):e(`Could not loop value, since range (${JSON.stringify(n)}) is unbounded`)}class q extends R{constructor(t,e){super(),p(this,"export"),this.actionChain=new r,this._events=new Map,"object"==typeof t?function(t,e){let n=new Map;for(let[i,r]of Object.entries(t))z.hasOwnProperty(i)?z[i](e,r):n.set(i,r);e.element&&e.element.whenInDOM((t=>{for(let[i,r]of n)if(i=i.toLowerCase(),i.includes("on")){let n=i.split("on")[1].trim();t.listenTo(n,(()=>{e.action(r)}))}}))}(t,this):this.key=t,this.element||this.as()}listenTo(t,e){return this.element.listenTo(t,e.bind(this)),this}_addToEventChain(t,...e){let n=this._events.get(t);if(n){let i=n.add(...e);return this._events.set(t,n),i}return null}createEvent(t,...e){let n=new r(this);return this._events.set(t,n),e.length>0&&this.on(t,e),this}createEvents(...t){return t.forEach((t=>{this.createEvent(t)})),this}triggerEvents(t,...e){return t.forEach((t=>{this.triggerEvent(t,...e)})),this}triggerEvent(t,...e){return this._events.has(t)?(this._events.get(t).execAs(this,...e),this):O.throwSoft(`pragma doesnt have ${event} - cannot .triggerEvent("${event}")]`,this)}_on(t,...e){let n=this._addToEventChain(t,...e);return null===n?O.throwSoft(`pragma doesnt have ${t} - cannot .on("${t}")`,this):n}on(){return this._on(...arguments),this}_onNext(t,e){this._on(t,(function(){return e(...arguments),t=>{t.selfDestruct()}}))}onNext(){return this._onNext(...arguments),this}createWires(...t){return t.forEach((t=>this.createWire(t))),this}createWire(t){let e={change:`${t}Change`,set:`${t}Set`};return this.createEvents(e.change,e.set),Object.defineProperty(this,t,{set:n=>{let i=function(t,e,n){if(n)return P(K(t,n),!0);if(e){let n=N(t,e);return P(n,n===t)}return P(t,!0)}(n,this[`_${t}Range`],this[`_${t}Loop`]);const r=this[`_${t}`];i.set&&i.val!==r&&(this[`_${t}`]=i.val,this.triggerEvent(e.change,i.val,r)),this.triggerEvent(e.set,n,r)},get:()=>this[`_${t}`]}),this[`set${t.capitalize()}`]=e=>(this[`${t}`]=e,this),this[`set${t.capitalize()}Silently`]=e=>(this[`_${t}`]=e,this),this[`set${t.capitalize()}Loop`]=(e,n)=>(this[`_${t}Loop`]={min:e,max:n},this),this[`set${t.capitalize()}Range`]=(e,n)=>(this[`_${t}Range`]={min:e,max:n},this),this}get _e(){return this.element}setElement(t,e=!0){return this.elementDOM=t,e&&this.element.id&&(this.id=this.element.id),this}get element(){return this.elementDOM}set element(t){this.setElement(t)}setRange(t=null,e=null){return this.range=this.range||{},this.range.min=null===t?this.range.min:t,this.range.max=null===e?this.range.max:e,this}breakLoop(){return this._loopVal=!1,this}setLoop(t,e){return this.setRange(t,e),this._loopVal=!0,this}get dv(){return this.v-this._lv}get value(){return this.v}setValue(t){return this.value=t,this}set value(t){let e=function(t,e,n){if(!e)return P(t,!0);if(n)return P(K(t,e),!0);let i=N(t,e);return P(i,i==t)}(t,this.range,this._loopVal);e.set&&(this._lv=this.v,this.v=e.val,this.exec())}exec(){return this.actionChain.execAs(this,...arguments),this}setKey(t){return this.key=t,this}set key(t){this._KEY=null==t?l():t}get key(){return this._KEY}set id(t){this.element&&(this.element.id=this.id)}get id(){return g(this.key)}buildAry(t){for(let e of t)this.add(new q(e,this));return this}build(...t){return this.buildAry(t)}as(t=null,e){return t=t||`div#${this.id}.pragma`,this.setElement(L(t,e),!1),this}addExport(t){this.exports=this.exports||new Set,this.exports.add(t)}export(...t){for(let e of t)this.addExport(e)}import(...t){let e=new r;for(let n of t)"function"==typeof n&&(n=n()),n.exports&&O.mimic(this,n,n.exports),n.exportChain&&e.add((t=>{n.exportChain.exec(this)}));return e.exec(),this}from(t){return t.exports&&O.mimic(this,t,t.exports),t.exportChain&&t.exportChain.exec(this),this}wireTo(t){let e=this;return t.do((function(){e.value=this.value})),this}do(){return this.actionChain.add(...arguments),this}extend(t,e){return O.overwrite(this,t,e),this}run(...t){let n=t[0];return"function"==typeof n?this._runAry(t):"object"==typeof n?this._runAry(Object.values(n)):e(`Could not run [${t}] as [${this}]`),this}_runAry(t){for(let e of t)this.runAs(e)}runAs(t){return t.bind(this)()}containAry(t,n="append"){for(let i of t)super.add(i),i.isRendered?e(`[${i}] is already appended`):this.element[n](i);return this}contain(...t){return this.containAry(t)}containFirst(...t){return this.containAry(t.reverse(),"prepend")}pragmatize(){return this.element.appendTo(this.parent&&this.parent.element||"body"),this}pragmatizeAt(t){return this.element.appendTo(t),this}addListeners(t){for(let[e,n]of Object.entries(t))this.on(e).do(n);return this}}const I=["html","css","addClass","removeClass","toggleClass","setId","append","prepend","appendTo","prependTo","setData"];for(let t of I)q.prototype[t]=function(){return this.element[t](...arguments),this};const F=["getData"];for(let t of F)q.prototype[t]=function(){return this.element[t](...arguments)};const W=["offset","text","top","left","width","height","x","classArray"];for(let t of W)Object.defineProperty(q.prototype,t,{get:function(){return this.element[t]}});globalThis.pragmaSpace||(globalThis.pragmaSpace={}),globalThis.pragmaSpace.integrateMousetrap=function(t){"function"==typeof t&&(q.prototype.bind=function(e,n,i){let r=this;return t.bind(e,(function(){return r.runAs(n)}),i),this},globalThis.pragmaSpace.mousetrapIntegration=!0,i("Mousetrap configuration detected! Extended Pragmas to support .bind() method!"))};try{globalThis.pragmaSpace.integrateMousetrap(Mousetrap)}catch(t){n("Tried to integrate extensions, but failed. To disable,\n this attempt: globalThis.pragmaSpace.integrate3rdParties = false")}const V=(t,e)=>new q(t,e),Q=t=>null!==t&&"object"==typeof t;function B(t,e){if(!Q(t)||!Q(e))return e;for(let[n,i]of Object.entries(e))n in e&&(t[n]=B(t[n],e[n]));return t}class H{static watcher=V("jolene-watcher").createEvents("set","get");static on(){return H.watcher.on(...arguments)}static setLocal(t,e){return window.localStorage.setItem("jolene",JSON.stringify({[t]:e}))}static getLocal(t=null){let e=JSON.parse(window.localStorage.getItem("jolene"));return null==e?null:null==t?e:e[t]}static set(t,e){H.watcher.triggerEvent("set",t,e);let n=t.split(">").map((t=>t.trim())),i=n.reduceRight(((t,i,r)=>({[i]:r==n.length-1?e:Object.assign({},t),lastModified:new Date})),{}),r=n[0],s=B(H._get(r),i);return H.setLocal(r,s[r]),e}static _get(...t){return t.slice(1).reduce(((t,e)=>null!=t&&Q(t)&&e in t?t[e]:null),H.getLocal(t[0]))}static get(t=null){if(null===t)return H.getLocal();let e=t.split(">").map((t=>t.trim())),n=H._get(...e);return H.watcher.triggerEvent("get",t.trim(),n),n}}t.deepMerge=B,t.isObj=Q,t.jolene=H,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "jolenejs",
"version": "1.0.0",
"version": "1.0.1",
"description": "jolenejs is awesome",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -12,4 +12,9 @@ ![npm-size](https://img.shields.io/npm/v/jolenejs?style=flat-square)

## WARNING
While jolenejs is relatively & generally secure, if your app is vulnerable to [ XSS attacks ](https://owasp.org/www-community/attacks/xss/) attackers will able to decrypt and have access to user's local data. Use jolenejs with caution.
While jolenejs uses `localStorage` which is relatively secure (as secure as cookies), if your app is vulnerable to [ XSS attacks ](https://owasp.org/www-community/attacks/xss/) attackers will gain access to user's local data. Use jolenejs with caution.
## Install
```
yarn add jolenejs
npm i jolenejs
```

@@ -20,16 +25,39 @@ ## Usage

jolene.store("which way?", new Promise((resolve, reject) => {
resolve("that way")
})) // you can use promises to derive both the key and the value
jolene = jolenejs.jolene // browser
// const jolene = require('jolenejs').jolene // commonjs
// import { jolene } from "jolenejs" // es6
// ...
describe('jolene set', () => {
test("simple set", () => {
jolene.set("fready-user > token > yeet ", 420)
token = jolene.get("fready-user > token > yeet")
expect(token).toBe(420)
})
jolene.get("which way?") // "that way"
test("saves type of variables", () => {
jolene.set("fready-user > token > digest ", "420")
jolene.set("fready-user > token > number ", 420)
jolene.on('store', (key, value) => {
console.log(key, value)
expect(jolene.get("fready-user > token > number")).toBe(420)
expect(jolene.get("fready-user > token").number).toBe(420)
})
test("trip", () => {
jolene.set("fready-user > token > digest > how > deep > can > this > be", { yeet: "yoing" })
expect(jolene.get("fready-user > token > digest > how > deep > can > this > be > yeet")).toBe("yoing")
})
})
jolene.on('get', (key, value) => {
console.log(key, value)
describe("jolene on set", () => {
test("simple case", () => {
let _set = null
jolene.on("set", (key, value) => {
_set = [ key, value ]
})
jolene.set("fready-user > token > digest", "xcq")
expect(_set).toStrictEqual([ "fready-user > token > digest", "xcq"])
})
})

@@ -39,7 +67,3 @@

## Proposition
It uses [ paralleljs ](https://www.npmjs.com/package/paralleljs) to run in the background, without interrupting the main thread.
## First time:

@@ -46,0 +70,0 @@

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