Socket
Socket
Sign inDemoInstall

@yamiteru/cynic

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.4 to 3.3.5

2

dist/clear.d.ts
import { Event } from "./types";
export declare const clear: <I, O>(event$: Event<O>) => void;
export declare function clear<I, O>(event$: Event<O>): void;
import { TCallback, Event, Maybe } from "./types";
export declare const event: <O>(subs?: Maybe<TCallback<O>[]>) => Event<O>;
export declare function event<O>(subs?: Maybe<TCallback<O>[]>): Event<O>;
import { Event, TCallback } from "./types";
export declare const has: <O>(event$: Event<O>, callback: TCallback<O>) => boolean;
export declare function has<O>(event$: Event<O>, callback: TCallback<O>): boolean;

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

var e=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var T=(o,r)=>{for(var a in r)e(o,a,{get:r[a],enumerable:!0})},b=(o,r,a,f)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of s(r))!E.call(o,m)&&m!==a&&e(o,m,{get:()=>r[m],enumerable:!(f=O(r,m))||f.enumerable});return o};var i=o=>b(e({},"__esModule",{value:!0}),o);var v={};T(v,{clear:()=>p,event:()=>l,has:()=>S,once:()=>k,publish:()=>x,size:()=>C,subscribe:()=>n});module.exports=i(v);var t=Symbol(),c=Symbol();var l=o=>({[t]:o?new Set(o):!1});var n=(o,r)=>((o[t]||(o[t]=new Set)).add(r),()=>o[t].delete(r));var x=(o,r)=>{if(o[t])for(let a of o[t].values())a(r,o)};var C=o=>o[t]?o[t].size:0;var S=(o,r)=>o[t]?o[t].has(r):!1;var p=o=>{var r;o[t]=new Set,(r=o[c])==null||r.call(o)};var k=(o=[])=>l([...o,(r,a)=>p(a)]);
var m=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var O=(r,o)=>{for(var e in o)m(r,e,{get:o[e],enumerable:!0})},E=(r,o,e,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of c(o))!i.call(r,a)&&a!==e&&m(r,a,{get:()=>o[a],enumerable:!(f=p(o,a))||f.enumerable});return r};var T=r=>E(m({},"__esModule",{value:!0}),r);var v={};O(v,{clear:()=>l,event:()=>n,has:()=>C,once:()=>S,publish:()=>s,size:()=>k,subscribe:()=>x});module.exports=T(v);var t=Symbol();var b={[t]:!1};function u(r){return{[t]:new Set(r)}}function n(r){return Object.create(r?u(r):b)}function x(r,o){return(r[t]||(r[t]=new Set)).add(o),()=>{r[t].delete(o)}}function s(r,o){if(r[t])for(let e of r[t].values())e(o,r)}function k(r){return r[t]?r[t].size:0}function C(r,o){return r[t]?r[t].has(o):!1}function l(r){r[t]=new Set}function S(r=[]){return n([...r,(o,e)=>l(e)])}
//# sourceMappingURL=index.cjs.js.map

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

var r=Symbol(),m=Symbol();var e=o=>({[r]:o?new Set(o):!1});var s=(o,t)=>((o[r]||(o[r]=new Set)).add(t),()=>o[r].delete(t));var b=(o,t)=>{if(o[r])for(let a of o[r].values())a(t,o)};var x=o=>o[r]?o[r].size:0;var k=(o,t)=>o[r]?o[r].has(t):!1;var l=o=>{var t;o[r]=new Set,(t=o[m])==null||t.call(o)};var w=(o=[])=>e([...o,(t,a)=>l(a)]);export{l as clear,e as event,k as has,w as once,b as publish,x as size,s as subscribe};
var t=Symbol();var n={[t]:!1};function l(r){return{[t]:new Set(r)}}function a(r){return Object.create(r?l(r):n)}function O(r,o){return(r[t]||(r[t]=new Set)).add(o),()=>{r[t].delete(o)}}function b(r,o){if(r[t])for(let e of r[t].values())e(o,r)}function s(r){return r[t]?r[t].size:0}function S(r,o){return r[t]?r[t].has(o):!1}function m(r){r[t]=new Set}function z(r=[]){return a([...r,(o,e)=>m(e)])}export{m as clear,a as event,S as has,z as once,b as publish,s as size,O as subscribe};
//# sourceMappingURL=index.esm.js.map
import { Event, TCallback } from "./types";
export declare const once: <O>(subs?: TCallback<O>[]) => Event<O>;
export declare function once<O>(subs?: TCallback<O>[]): Event<O>;
import { Event } from "./types";
export declare const publish: <O>(event$: Event<O>, value?: O | undefined) => void;
export declare function publish<O>(event$: Event<O>, value?: O): void;
import { Event } from "./types";
export declare const size: <O>(event$: Event<O>) => number;
export declare function size<O>(event$: Event<O>): number;
import { TCallback, Event } from "./types";
export declare const subscribe: <O>(event$: Event<O>, callback: TCallback<O>) => () => boolean;
export declare function subscribe<O>(event$: Event<O>, callback: TCallback<O>): () => void;
export declare const SET: unique symbol;
export declare const ON_CLEAR: unique symbol;

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

import { ON_CLEAR, SET } from "./symbols";
import { SET } from "./symbols";
export declare type Either<L, R> = L | R;

@@ -9,3 +9,2 @@ export declare type Nullable<T> = Either<null, T>;

[SET]: Either<false, Set<TCallback<T>>>;
[ON_CLEAR]?: Noop;
};
{
"name": "@yamiteru/cynic",
"version": "3.3.4",
"version": "3.3.5",
"license": "MIT",

@@ -35,6 +35,10 @@ "author": "Miroslav Vršecký <yamiteru@icloud.com>",

"test": "jest --collectCoverage",
"benchmark": "ts-node __benchmarks__/index.ts",
"build": "yarn clean && ts-node scripts/build.ts && tsc --emitDeclarationOnly --outDir dist",
"clean": "rimraf dist",
"prepublishOnly": "yarn test && yarn build"
"prepublishOnly": "yarn test && yarn build",
"benchmark": "yarn benchmark:init && yarn benchmark:subscribe && yarn benchmark:publish && yarn benchmark:remove",
"benchmark:init": "ts-node __benchmarks__/init.ts",
"benchmark:subscribe": "ts-node __benchmarks__/subscribe.ts",
"benchmark:publish": "ts-node __benchmarks__/publish.ts",
"benchmark:remove": "ts-node __benchmarks__/remove.ts"
},

@@ -41,0 +45,0 @@ "devDependencies": {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc