New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tdreyno/pretty-please

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tdreyno/pretty-please - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

dist-src/Task/__tests__/prepend.spec.js

4

dist-node/index.js

@@ -167,2 +167,6 @@ 'use strict';

prepend(...items) {
return map(a => [...items, a], this);
}
tap(fn) {

@@ -169,0 +173,0 @@ return tap(fn, this);

@@ -65,2 +65,5 @@ /* eslint-disable @typescript-eslint/no-misused-promises, @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-explicit-any, @typescript-eslint/no-use-before-define */

}
prepend(...items) {
return map(a => [...items, a], this);
}
tap(fn) {

@@ -67,0 +70,0 @@ return tap(fn, this);

@@ -58,2 +58,7 @@ export declare type Reject<E> = (error: E) => void;

append<A>(a: A): Task<E, [S, A]>;
prepend<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): Task<E, [S, A, B, C, D, E]>;
prepend<A, B, C, D>(a: A, b: B, c: C, d: D): Task<E, [A, B, C, D, S]>;
prepend<A, B, C>(a: A, b: B, c: C): Task<E, [A, B, C, S]>;
prepend<A, B>(a: A, b: B): Task<E, [A, B, S]>;
prepend<A>(a: A): Task<E, [A, S]>;
tap(fn: (result: S) => void): Task<E, S>;

@@ -60,0 +65,0 @@ tapChain<S2>(fn: (result: S) => Task<E, S2> | Promise<S2>): Task<E, S>;

@@ -134,2 +134,5 @@ function initialize() {

}
prepend(...items) {
return map(a => [...items, a], this);
}
tap(fn) {

@@ -136,0 +139,0 @@ return tap(fn, this);

2

dist-web/index.min.js

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

var t=Object.freeze({__proto__:null,initialize:function(){return{type:"Initialized"}},pending:function(){return{type:"Pending"}},succeed:function(t){return{type:"Success",result:t}},fail:function(t){return{type:"Failure",error:t}},fold:function(t,n,r,e,i){switch(i.type){case"Initialized":return t();case"Pending":return n();case"Failure":return r(i.error);case"Success":return e(i.result)}}});function n(t,n=0){return Array(t-n).fill(void 0).map((t,r)=>n+r)}function r(t){return(n,r,e,i)=>e===i.length-1?t(i):n}function e(t){return()=>t}function i(t){return t}function u(t){return(n,r,e)=>{const[i,u]=t(r,e);return n[i]=u,n}}function s(t,n,r={}){return n.reduce(u(t),r)}function c(t,[n,r]){return t[n]=r,t}class o{constructor(t){this.computation=t,this.isCanceled=!1}fork(t,n){let r=this.isCanceled;const e={cancel:()=>r=!0};return r||this.computation(n=>{r||t(n)},t=>{r||n(t)}),e}cancel(){this.isCanceled=!0}then(t,n){return this.toPromise().then(t,n)}chain(t){return p(t,this)}succeedIf(t){return function(t,n){return new o((r,e)=>{const i=t();i?e(i):n.fork(r,e)})}(t,this)}onlyOnce(){return function(t){let n,r,e="initialized",i=0;const u={};function s(t,n){const r=i++;u[r]={reject:t,resolve:n}}function c(t){e="failure",r=t,Object.keys(u).forEach(n=>{u[n].reject(t),delete u[n]})}function f(t){e="success",n=t,Object.keys(u).forEach(n=>{u[n].resolve(t),delete u[n]})}return new o((i,u)=>{switch(e){case"success":u(n);break;case"failure":i(r);break;case"pending":s(i,u);break;case"initialized":e="pending",s(i,u),t.fork(c,f)}})}(this)}toPromise(){return t=this,new Promise((n,r)=>t.fork(r,n));var t}swap(){return t=this,new o((n,r)=>t.fork(t=>r(t),t=>n(t)));var t}map(t){return I(t,this)}forward(t){return I(e(t),this)}append(...t){return I(n=>[n,...t],this)}tap(t){return function(t,n){return I(n=>(t(n),n),n)}(t,this)}tapChain(t){return function(t,n){return p(n=>m(t(n)).forward(n),n)}(t,this)}mapError(t){return P(t,this)}mapBoth(t,n){return function(t,n,r){return P(t,I(n,r))}(t,n,this)}fold(t,n){return function(t,n,r){return new o((e,i)=>r.fork(n=>i(t(n)),t=>i(n(t))))}(t,n,this)}orElse(t){return function(t,n){return new o((r,e)=>n.fork(n=>m(t(n)).fork(r,e),e))}(t,this)}ap(t){return S(this,t)}wait(t){return function(t,n){return new o((r,e)=>{setTimeout(()=>n.fork(r,e),t)})}(t,this)}retryIn(t){return function(t,n){return n.orElse(()=>n.wait(t))}(t,this)}retryWithExponentialBackoff(t,r){return function(t,r,e){return n(r).reduce((n,r)=>n.retryIn(t*2**r),e)}(t,r,this)}flatten(){return j(this)}}o.fail=d,o.succeed=a,o.empty=function(){return l(void 0)},o.failIn=function(t,n){return new o(r=>setTimeout(()=>r(n),t))},o.succeedIn=function(t,n){return new o((r,e)=>setTimeout(()=>e(n),t))},o.of=a,o.all=function(t){return 0===t.length?l([]):new o((n,r)=>{let e=!1,i=t.length;const u=[];return t.map((t,s)=>m(t).fork(t=>{e||(e=!0,n(t))},t=>{e||(i-=1,u[s]=t,0===i&&r(u))}))})},o.sequence=function(t){return 0===t.length?l([]):t.reduce((t,n)=>p(t=>I(n=>[...t,n],m(n)),t),a([]))},o.firstSuccess=function(t){return 0===t.length?d([]):new o((n,r)=>{let e=!1,i=t.length;const u=[];return t.map(t=>m(t).fork(t=>{e||(i-=1,u.push(t),0===i&&n(u))},t=>{e||(e=!0,r(t))}))})},o.never=function(){return new o(()=>{})},o.fromPromise=y,o.fromLazyPromise=function(t){return w(t).chain(y)},o.race=function(t){return new o((n,r)=>{let e=!1;return t.map(t=>m(t).fork(t=>{e||(e=!0,n(t))},t=>{e||(e=!0,r(t))}))})},o.external=h,o.emitter=function(t){const n=h();return[n,(...r)=>{try{n.resolve(t(...r))}catch(t){n.reject(t)}}]},o.succeedBy=w,o.ap=S,o.map2=k,o.map3=function(t,n,r,e){return o.of(t).ap(n).ap(r).ap(e)},o.map4=function(t,n,r,e,i){return o.of(t).ap(n).ap(r).ap(e).ap(i)},o.loop=b,o.reduce=function(t,n,r){return b(({remainingItems:n,currentResult:e})=>{if(0===n.length)return l(new g(e));const[i,...u]=n,s=r.length-u.length-1;return t(e,i,s,r).map(t=>new v({remainingItems:u,currentResult:t}))},{remainingItems:r,currentResult:n})},o.zip=function(t,n){return k(t=>n=>[t,n],t,n)},o.zipWith=function(t,n,r){return k(n=>r=>t(n,r),n,r)},o.flatten=j;class f extends o{constructor(){super((t,n)=>{switch(this.t){case"error":t(this.i);case"success":n(this.u);case"pending":this.s=t,this.o=n}}),this.t="pending"}reject(t){this.i=t,this.t="error",this.s&&this.s(t)}resolve(t){this.u=t,this.t="success",this.o&&this.o(t)}}function h(){return new f}function a(t){return new o((n,r)=>r(t))}const l=a;function w(t){return new o((n,r)=>{try{r(t())}catch(t){n(t)}})}function d(t){return new o(n=>n(t))}function p(t,n){return new o((r,e)=>n.fork(r,n=>m(t(n)).fork(r,e)))}function m(t){return t instanceof Promise?y(t):t}function y(t){return t instanceof Promise?new o((n,r)=>t.then(r,n)):l(t)}class g{constructor(t){this.value=t}}class v{constructor(t){this.value=t}}function b(t,n){return new o((r,e)=>{const i=n=>{t(n).fork(t=>{r(t)},t=>{t instanceof g&&e(t.value),t instanceof v&&i(t.value)})};i(n)})}function I(t,n){return new o((r,e)=>n.fork(r,n=>e(t(n))))}function k(t,n,r){return o.of(t).ap(n).ap(r)}function P(t,n){return new o((r,e)=>n.fork(n=>r(t(n)),e))}function S(t,n){return new o((r,e)=>{let i,u,s=!1,c=!1;const o=t=>n=>{c||(t(n),u&&s&&e(u(i)))},f=t=>{c||(c=!0,r(t))};m(t).fork(f,o(t=>{u=t})),m(n).fork(f,o(t=>{s=!0,i=t}))})}function j(t){return t.chain(i)}class z{constructor(){this.h=new Set,this.l="inactive",this.p=new Set}emit(t){return o.all(Array.from(this.h).map(n=>n(t)||o.empty()))}subscribe(t){return this.h.add(t),this.m(),()=>{this.h.delete(t),this.m()}}clear(){this.h.clear(),this.m()}onStatusChange(t){return this.p.add(t),()=>this.p.delete(t)}m(){const t=this.h.size>0?"active":"inactive";t!==this.l&&(this.l=t,Array.from(this.p).map(n=>n(t)))}}export{f as ExternalTask,g as LoopBreak,v as LoopContinue,t as RemoteData,z as Subscription,o as Task,e as constant,i as identity,s as mapToIndexedObject,c as pairsToIndexedObject,n as range,r as to,u as toIndexedObject};
var t=Object.freeze({__proto__:null,initialize:function(){return{type:"Initialized"}},pending:function(){return{type:"Pending"}},succeed:function(t){return{type:"Success",result:t}},fail:function(t){return{type:"Failure",error:t}},fold:function(t,n,r,e,i){switch(i.type){case"Initialized":return t();case"Pending":return n();case"Failure":return r(i.error);case"Success":return e(i.result)}}});function n(t,n=0){return Array(t-n).fill(void 0).map((t,r)=>n+r)}function r(t){return(n,r,e,i)=>e===i.length-1?t(i):n}function e(t){return()=>t}function i(t){return t}function u(t){return(n,r,e)=>{const[i,u]=t(r,e);return n[i]=u,n}}function s(t,n,r={}){return n.reduce(u(t),r)}function c(t,[n,r]){return t[n]=r,t}class o{constructor(t){this.computation=t,this.isCanceled=!1}fork(t,n){let r=this.isCanceled;const e={cancel:()=>r=!0};return r||this.computation(n=>{r||t(n)},t=>{r||n(t)}),e}cancel(){this.isCanceled=!0}then(t,n){return this.toPromise().then(t,n)}chain(t){return d(t,this)}succeedIf(t){return function(t,n){return new o((r,e)=>{const i=t();i?e(i):n.fork(r,e)})}(t,this)}onlyOnce(){return function(t){let n,r,e="initialized",i=0;const u={};function s(t,n){const r=i++;u[r]={reject:t,resolve:n}}function c(t){e="failure",r=t,Object.keys(u).forEach(n=>{u[n].reject(t),delete u[n]})}function h(t){e="success",n=t,Object.keys(u).forEach(n=>{u[n].resolve(t),delete u[n]})}return new o((i,u)=>{switch(e){case"success":u(n);break;case"failure":i(r);break;case"pending":s(i,u);break;case"initialized":e="pending",s(i,u),t.fork(c,h)}})}(this)}toPromise(){return t=this,new Promise((n,r)=>t.fork(r,n));var t}swap(){return t=this,new o((n,r)=>t.fork(t=>r(t),t=>n(t)));var t}map(t){return I(t,this)}forward(t){return I(e(t),this)}append(...t){return I(n=>[n,...t],this)}prepend(...t){return I(n=>[...t,n],this)}tap(t){return function(t,n){return I(n=>(t(n),n),n)}(t,this)}tapChain(t){return function(t,n){return d(n=>m(t(n)).forward(n),n)}(t,this)}mapError(t){return P(t,this)}mapBoth(t,n){return function(t,n,r){return P(t,I(n,r))}(t,n,this)}fold(t,n){return function(t,n,r){return new o((e,i)=>r.fork(n=>i(t(n)),t=>i(n(t))))}(t,n,this)}orElse(t){return function(t,n){return new o((r,e)=>n.fork(n=>m(t(n)).fork(r,e),e))}(t,this)}ap(t){return S(this,t)}wait(t){return function(t,n){return new o((r,e)=>{setTimeout(()=>n.fork(r,e),t)})}(t,this)}retryIn(t){return function(t,n){return n.orElse(()=>n.wait(t))}(t,this)}retryWithExponentialBackoff(t,r){return function(t,r,e){return n(r).reduce((n,r)=>n.retryIn(t*2**r),e)}(t,r,this)}flatten(){return j(this)}}o.fail=p,o.succeed=a,o.empty=function(){return l(void 0)},o.failIn=function(t,n){return new o(r=>setTimeout(()=>r(n),t))},o.succeedIn=function(t,n){return new o((r,e)=>setTimeout(()=>e(n),t))},o.of=a,o.all=function(t){return 0===t.length?l([]):new o((n,r)=>{let e=!1,i=t.length;const u=[];return t.map((t,s)=>m(t).fork(t=>{e||(e=!0,n(t))},t=>{e||(i-=1,u[s]=t,0===i&&r(u))}))})},o.sequence=function(t){return 0===t.length?l([]):t.reduce((t,n)=>d(t=>I(n=>[...t,n],m(n)),t),a([]))},o.firstSuccess=function(t){return 0===t.length?p([]):new o((n,r)=>{let e=!1,i=t.length;const u=[];return t.map(t=>m(t).fork(t=>{e||(i-=1,u.push(t),0===i&&n(u))},t=>{e||(e=!0,r(t))}))})},o.never=function(){return new o(()=>{})},o.fromPromise=y,o.fromLazyPromise=function(t){return w(t).chain(y)},o.race=function(t){return new o((n,r)=>{let e=!1;return t.map(t=>m(t).fork(t=>{e||(e=!0,n(t))},t=>{e||(e=!0,r(t))}))})},o.external=f,o.emitter=function(t){const n=f();return[n,(...r)=>{try{n.resolve(t(...r))}catch(t){n.reject(t)}}]},o.succeedBy=w,o.ap=S,o.map2=k,o.map3=function(t,n,r,e){return o.of(t).ap(n).ap(r).ap(e)},o.map4=function(t,n,r,e,i){return o.of(t).ap(n).ap(r).ap(e).ap(i)},o.loop=b,o.reduce=function(t,n,r){return b(({remainingItems:n,currentResult:e})=>{if(0===n.length)return l(new g(e));const[i,...u]=n,s=r.length-u.length-1;return t(e,i,s,r).map(t=>new v({remainingItems:u,currentResult:t}))},{remainingItems:r,currentResult:n})},o.zip=function(t,n){return k(t=>n=>[t,n],t,n)},o.zipWith=function(t,n,r){return k(n=>r=>t(n,r),n,r)},o.flatten=j;class h extends o{constructor(){super((t,n)=>{switch(this.t){case"error":t(this.i);case"success":n(this.u);case"pending":this.s=t,this.o=n}}),this.t="pending"}reject(t){this.i=t,this.t="error",this.s&&this.s(t)}resolve(t){this.u=t,this.t="success",this.o&&this.o(t)}}function f(){return new h}function a(t){return new o((n,r)=>r(t))}const l=a;function w(t){return new o((n,r)=>{try{r(t())}catch(t){n(t)}})}function p(t){return new o(n=>n(t))}function d(t,n){return new o((r,e)=>n.fork(r,n=>m(t(n)).fork(r,e)))}function m(t){return t instanceof Promise?y(t):t}function y(t){return t instanceof Promise?new o((n,r)=>t.then(r,n)):l(t)}class g{constructor(t){this.value=t}}class v{constructor(t){this.value=t}}function b(t,n){return new o((r,e)=>{const i=n=>{t(n).fork(t=>{r(t)},t=>{t instanceof g&&e(t.value),t instanceof v&&i(t.value)})};i(n)})}function I(t,n){return new o((r,e)=>n.fork(r,n=>e(t(n))))}function k(t,n,r){return o.of(t).ap(n).ap(r)}function P(t,n){return new o((r,e)=>n.fork(n=>r(t(n)),e))}function S(t,n){return new o((r,e)=>{let i,u,s=!1,c=!1;const o=t=>n=>{c||(t(n),u&&s&&e(u(i)))},h=t=>{c||(c=!0,r(t))};m(t).fork(h,o(t=>{u=t})),m(n).fork(h,o(t=>{s=!0,i=t}))})}function j(t){return t.chain(i)}class z{constructor(){this.h=new Set,this.l="inactive",this.p=new Set}emit(t){return o.all(Array.from(this.h).map(n=>n(t)||o.empty()))}subscribe(t){return this.h.add(t),this.m(),()=>{this.h.delete(t),this.m()}}clear(){this.h.clear(),this.m()}onStatusChange(t){return this.p.add(t),()=>this.p.delete(t)}m(){const t=this.h.size>0?"active":"inactive";t!==this.l&&(this.l=t,Array.from(this.p).map(n=>n(t)))}}export{h as ExternalTask,g as LoopBreak,v as LoopContinue,t as RemoteData,z as Subscription,o as Task,e as constant,i as identity,s as mapToIndexedObject,c as pairsToIndexedObject,n as range,r as to,u as toIndexedObject};
{
"name": "@tdreyno/pretty-please",
"version": "1.6.0",
"version": "1.7.0",
"files": [

@@ -5,0 +5,0 @@ "dist-*/",

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