@thi.ng/defmulti
Advanced tools
Comparing version 1.2.20 to 1.2.21
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.2.21](https://github.com/thi-ng/umbrella/compare/@thi.ng/defmulti@1.2.20...@thi.ng/defmulti@1.2.21) (2020-07-28) | ||
**Note:** Version bump only for package @thi.ng/defmulti | ||
## [1.2.20](https://github.com/thi-ng/umbrella/compare/@thi.ng/defmulti@1.2.19...@thi.ng/defmulti@1.2.20) (2020-07-04) | ||
@@ -8,0 +16,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@thi.ng/api"),require("@thi.ng/errors")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/api","@thi.ng/errors"],t):t(((e=e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.defmulti={}),e.thi.ng.api,e.thi.ng.errors)}(this,(function(e,t,n){"use strict";const r=Symbol();e.LOGGER=t.NULL_LOGGER;function i(t,i){const f={},d=i?s(i):{},a=(...e)=>{const i=t(...e),l=f[i]||o(f,d,i)||f[r];return l?l(...e):n.unsupported(`missing implementation for: "${i.toString()}"`)};return a.add=(t,n)=>(f[t]&&e.LOGGER.warn(`overwriting '${t.toString()}' impl`),f[t]=n,!0),a.addAll=e=>{let t=!0;for(let n in e)t=a.add(n,e[n])&&t;return t},a.remove=e=>!!f[e]&&(delete f[e],!0),a.callable=(...e)=>{const n=t(...e);return!!(f[n]||o(f,d,n)||f[r])},a.isa=(e,t)=>{let n=d[e];!n&&(d[e]=n=new Set),n.add(t)},a.impls=()=>{const e=new Set(Object.keys(f));for(let t in d)o(f,d,t)&&e.add(t);return f[r]&&e.add(r),e},a.rels=()=>d,a.parents=e=>d[e],a.ancestors=e=>new Set(l([],d,e)),a}const o=(e,t,n)=>{const r=t[n];if(r)for(let n of r){let r=e[n]||o(e,t,n);if(r)return r}},l=(e,t,n)=>{const r=t[n];if(r)for(let n of r)e.push(n),l(e,t,n);return e},s=e=>{const t={};for(let n in e){const r=e[n];t[n]=r instanceof Set?r:new Set(r)}return t};e.DEFAULT=r,e.defmulti=i,e.defmultiN=(e,t)=>{const o=i((...e)=>e.length);o.add(r,t||((...e)=>n.illegalArity(e.length)));for(let t in e)o.add(t,e[t]);return o},e.implementations=(e,t,...r)=>{if(1&r.length&&n.illegalArgs("expected an even number of implementation items"),t)for(let n in t)for(let r of t[n])r.isa(e,n);for(let t=0;t<r.length;t+=2)r[t].add(e,r[t+1])},e.setLogger=t=>e.LOGGER=t,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@thi.ng/api"),require("@thi.ng/errors")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/api","@thi.ng/errors"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.defmulti={}),e.thi.ng.api,e.thi.ng.errors)}(this,(function(e,t,n){"use strict";const i=Symbol();e.LOGGER=t.NULL_LOGGER;function r(t,r){const f={},d=r?s(r):{},a=(...e)=>{const r=t(...e),l=f[r]||o(f,d,r)||f[i];return l?l(...e):n.unsupported(`missing implementation for: "${r.toString()}"`)};return a.add=(t,n)=>(f[t]&&e.LOGGER.warn(`overwriting '${t.toString()}' impl`),f[t]=n,!0),a.addAll=e=>{let t=!0;for(let n in e)t=a.add(n,e[n])&&t;return t},a.remove=e=>!!f[e]&&(delete f[e],!0),a.callable=(...e)=>{const n=t(...e);return!!(f[n]||o(f,d,n)||f[i])},a.isa=(e,t)=>{let n=d[e];!n&&(d[e]=n=new Set),n.add(t)},a.impls=()=>{const e=new Set(Object.keys(f));for(let t in d)o(f,d,t)&&e.add(t);return f[i]&&e.add(i),e},a.rels=()=>d,a.parents=e=>d[e],a.ancestors=e=>new Set(l([],d,e)),a}const o=(e,t,n)=>{const i=t[n];if(i)for(let n of i){let i=e[n]||o(e,t,n);if(i)return i}},l=(e,t,n)=>{const i=t[n];if(i)for(let n of i)e.push(n),l(e,t,n);return e},s=e=>{const t={};for(let n in e){const i=e[n];t[n]=i instanceof Set?i:new Set(i)}return t};e.DEFAULT=i,e.defmulti=r,e.defmultiN=(e,t)=>{const o=r((...e)=>e.length);o.add(i,t||((...e)=>n.illegalArity(e.length)));for(let t in e)o.add(t,e[t]);return o},e.implementations=(e,t,...i)=>{if(1&i.length&&n.illegalArgs("expected an even number of implementation items"),t)for(let n in t)for(let i of t[n])i.isa(e,n);for(let t=0;t<i.length;t+=2)i[t].add(e,i[t+1])},e.setLogger=t=>e.LOGGER=t,Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@thi.ng/defmulti", | ||
"version": "1.2.20", | ||
"version": "1.2.21", | ||
"description": "Dynamic, extensible multiple dispatch via user supplied dispatch function.", | ||
@@ -42,5 +42,5 @@ "module": "./index.js", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@microsoft/api-extractor": "^7.8.0", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^14.0.1", | ||
"@microsoft/api-extractor": "^7.9.2", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^14.0.26", | ||
"mocha": "^8.0.1", | ||
@@ -50,7 +50,7 @@ "nyc": "^15.1.0", | ||
"typedoc": "^0.17.6", | ||
"typescript": "^3.9.5" | ||
"typescript": "^3.9.7" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.11.3", | ||
"@thi.ng/errors": "^1.2.16" | ||
"@thi.ng/api": "^6.12.0", | ||
"@thi.ng/errors": "^1.2.17" | ||
}, | ||
@@ -79,3 +79,3 @@ "files": [ | ||
}, | ||
"gitHead": "415fcbd5b35c1041044d9f17d89718faa9999906" | ||
"gitHead": "6a1b929361ede67d425a0dbd12cf4bce56c1f8f8" | ||
} |
@@ -54,3 +54,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (gzipped, pre-treeshake): ESM: 750 bytes / CJS: 811 bytes / UMD: 870 bytes | ||
Package sizes (gzipped, pre-treeshake): ESM: 750 bytes / CJS: 811 bytes / UMD: 885 bytes | ||
@@ -57,0 +57,0 @@ ## Dependencies |
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
65885
Updated@thi.ng/api@^6.12.0
Updated@thi.ng/errors@^1.2.17