dozy 1.0.50 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dozy",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "description": "My shared typescript utilities.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -10,9 +10,9 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.js"
12
12
  },
13
- "./*": {
14
- "types": "./dist/*.d.ts",
15
- "import": "./dist/*.js"
13
+ "./zod": {
14
+ "types": "./dist/zod.d.ts",
15
+ "import": "./dist/zod.js"
16
16
  },
17
17
  "./package.json": "./package.json",
18
18
  "./reset": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "files": [
24
24
  "dist",
25
- "assets",
26
- "README.md"
25
+ "README.md",
26
+ "README-COLOR.md"
27
27
  ],
28
28
  "scripts": {
29
29
  "clean": "tsup --clean",
@@ -1,2 +0,0 @@
1
- var x=Object.create;var i=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var h=t=>{throw TypeError(t)};var U=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),E=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},L=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of R(e))!I.call(t,l)&&l!==o&&i(t,l,{get:()=>e[l],enumerable:!(r=A(e,l))||r.enumerable});return t};var V=(t,e,o)=>(o=t!=null?x(w(t)):{},L(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t));var m=(t,e,o)=>e.has(t)||h("Cannot "+o);var _=(t,e,o)=>(m(t,e,"read from private field"),o?o.call(t):e.get(t)),k=(t,e,o)=>e.has(t)?h("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),B=(t,e,o,r)=>(m(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var p="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";import{webcrypto as s}from"crypto";var M=128,n,u;function d(t){!n||n.length<t?(n=Buffer.allocUnsafe(t*M),s.getRandomValues(n),u=0):u+t>n.length&&(s.getRandomValues(n),u=0),u+=t}function O(t){return d(t|=0),n.subarray(u-t,u)}function P(t,e,o){let r=(2<<31-Math.clz32(t.length-1|1))-1,l=Math.ceil(1.6*r*e/t.length);return(a=e)=>{if(!a)return"";let f="";for(;;){let g=o(l),c=l;for(;c--;)if(f+=t[g[c]&r]||"",f.length>=a)return f}}}function v(t,e=21){return P(t,e,O)}function y(t=21){d(t|=0);let e="";for(let o=u-t;o<u;o++)e+=p[n[o]&63];return e}export{U as a,b,E as c,V as d,_ as e,k as f,B as g,p as h,v as i,y as j};
2
- //# sourceMappingURL=chunk-UIXT2MYS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../node_modules/nanoid/url-alphabet/index.js","../node_modules/nanoid/index.js"],"sourcesContent":["export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n","import { webcrypto as crypto } from 'node:crypto'\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nconst POOL_SIZE_MULTIPLIER = 128\nlet pool, poolOffset\nfunction fillPool(bytes) {\n if (!pool || pool.length < bytes) {\n pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)\n crypto.getRandomValues(pool)\n poolOffset = 0\n } else if (poolOffset + bytes > pool.length) {\n crypto.getRandomValues(pool)\n poolOffset = 0\n }\n poolOffset += bytes\n}\nexport function random(bytes) {\n fillPool((bytes |= 0))\n return pool.subarray(poolOffset - bytes, poolOffset)\n}\nexport function customRandom(alphabet, defaultSize, getRandom) {\n let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1\n let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n if (!size) return ''\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let i = step\n while (i--) {\n id += alphabet[bytes[i] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport function customAlphabet(alphabet, size = 21) {\n return customRandom(alphabet, size, random)\n}\nexport function nanoid(size = 21) {\n fillPool((size |= 0))\n let id = ''\n for (let i = poolOffset - size; i < poolOffset; i++) {\n id += scopedUrlAlphabet[pool[i] & 63]\n }\n return id\n}\n"],"mappings":"moCAAO,IAAMA,EACX,mECDF,OAAS,aAAaC,MAAc,SAGpC,IAAMC,EAAuB,IACzBC,EAAMC,EACV,SAASC,EAASC,EAAO,CACnB,CAACH,GAAQA,EAAK,OAASG,GACzBH,EAAO,OAAO,YAAYG,EAAQJ,CAAoB,EACtDK,EAAO,gBAAgBJ,CAAI,EAC3BC,EAAa,GACJA,EAAaE,EAAQH,EAAK,SACnCI,EAAO,gBAAgBJ,CAAI,EAC3BC,EAAa,GAEfA,GAAcE,CAChB,CACO,SAASE,EAAOF,EAAO,CAC5B,OAAAD,EAAUC,GAAS,CAAE,EACdH,EAAK,SAASC,EAAaE,EAAOF,CAAU,CACrD,CACO,SAASK,EAAaC,EAAUC,EAAaC,EAAW,CAC7D,IAAIC,GAAQ,GAAM,GAAK,KAAK,MAAOH,EAAS,OAAS,EAAK,CAAC,GAAM,EAC7DI,EAAO,KAAK,KAAM,IAAMD,EAAOF,EAAeD,EAAS,MAAM,EACjE,MAAO,CAACK,EAAOJ,IAAgB,CAC7B,GAAI,CAACI,EAAM,MAAO,GAClB,IAAIC,EAAK,GACT,OAAa,CACX,IAAIV,EAAQM,EAAUE,CAAI,EACtBG,EAAIH,EACR,KAAOG,KAEL,GADAD,GAAMN,EAASJ,EAAMW,CAAC,EAAIJ,CAAI,GAAK,GAC/BG,EAAG,QAAUD,EAAM,OAAOC,CAElC,CACF,CACF,CACO,SAASE,EAAeR,EAAUK,EAAO,GAAI,CAClD,OAAON,EAAaC,EAAUK,EAAMP,CAAM,CAC5C,CACO,SAASW,EAAOJ,EAAO,GAAI,CAChCV,EAAUU,GAAQ,CAAE,EACpB,IAAIC,EAAK,GACT,QAASC,EAAIb,EAAaW,EAAME,EAAIb,EAAYa,IAC9CD,GAAMI,EAAkBjB,EAAKc,CAAC,EAAI,EAAE,EAEtC,OAAOD,CACT","names":["urlAlphabet","crypto","POOL_SIZE_MULTIPLIER","pool","poolOffset","fillPool","bytes","crypto","random","customRandom","alphabet","defaultSize","getRandom","mask","step","size","id","i","customAlphabet","nanoid","urlAlphabet"]}
package/dist/nanoid.d.ts DELETED
@@ -1 +0,0 @@
1
- export { customAlphabet, nanoid, urlAlphabet } from 'nanoid';
package/dist/nanoid.js DELETED
@@ -1,2 +0,0 @@
1
- import{h as o,i as t,j as a}from"./chunk-UIXT2MYS.js";export{t as customAlphabet,a as nanoid,o as urlAlphabet};
2
- //# sourceMappingURL=nanoid.js.map
File without changes