{"_id":"@crabas0npm/voluptatem-aspernatur-ducimus","name":"@crabas0npm/voluptatem-aspernatur-ducimus","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crabas0npm/voluptatem-aspernatur-ducimus","version":"1.0.0","description":"> Plant the \"@crabas0npm/voluptatem-aspernatur-ducimus\" for your next Typescript project and let it grow with this useful lib, providing basic functionalities handy in most projects.","main":"index.js","author":{"name":"Crabas0"},"license":"MIT","dependencies":{"@crabas0npm/accusantium-repellendus-sint-consequuntur":"^1.0.0","@crabas0npm/alias-consequuntur-hic-enim":"^1.0.0","@crabas0npm/aliquid-vitae-magnam-perspiciatis":"^1.0.0","@crabas0npm/aut-cupiditate-quam-dicta":"^1.0.0","@crabas0npm/blanditiis-est-molestias-a":"^1.0.0","@crabas0npm/consectetur-impedit-exercitationem-error":"^1.0.0","@crabas0npm/corporis-rerum-reprehenderit-voluptates":"^1.0.0","@crabas0npm/delectus-dolorem-consectetur-corrupti":"^1.0.0","@crabas0npm/ea-nisi-earum-mollitia":"^1.0.0","@crabas0npm/et-perspiciatis-eius-modi":"^1.0.0","@crabas0npm/expedita-magnam-quia-perferendis":"^1.0.0","@crabas0npm/expedita-optio-recusandae-nesciunt":"^1.0.0","@crabas0npm/expedita-voluptas-corrupti-ullam":"^1.0.0","@crabas0npm/facilis-doloribus-provident-optio":"^1.0.0","@crabas0npm/fugiat-necessitatibus-recusandae-quo":"^1.0.0","@crabas0npm/maxime-sequi-nam-facere":"^1.0.0","@crabas0npm/minus-iure-ipsum-temporibus":"^1.0.0","@crabas0npm/nulla-minima-vero-facere":"^1.0.0","@crabas0npm/odio-exercitationem-ducimus-provident":"^1.0.0","@crabas0npm/officia-nostrum-at-hic":"^1.0.0","@crabas0npm/officiis-labore-tempora-sint":"^1.0.0","@crabas0npm/omnis-neque-asperiores-rerum":"^1.0.0","@crabas0npm/optio-sequi-optio-quidem":"^1.0.0","@crabas0npm/porro-voluptatem-consectetur-beatae":"^1.0.0","@crabas0npm/possimus-sit-repellat-perspiciatis":"^1.0.0","@crabas0npm/quo-dolorem-molestiae-porro":"^1.0.0","@crabas0npm/ratione-nisi-deleniti-provident":"^1.0.0","@crabas0npm/ratione-voluptatibus-quo-sed":"^1.0.0","@crabas0npm/repellendus-illum-cum-fugit":"^1.0.0","@crabas0npm/unde-quos-asperiores-modi":"^1.0.0","@diahkomalasarinpm/praesentium-sint-dolorem":"^1.0.0","@f1stnpm2/adipisci-adipisci-praesentium":"^1.0.0","@wemnyelezxnpm/delectus-repellendus-neque":"^1.0.0","give-advice-10th":"^1.0.3"},"keywords":["format","name","js","spinners","censor","xterm","animation","superagent","tester","compare","gdpr","ascii","side","hardlinks","extension","spec","diff","babel-core","ArrayBuffer","length","bound","reducer","negative zero","matches","HyBi","bind","positive","less","superstruct","assert","Object","querystring","console","find","preserve-symlinks","sameValueZero","json","http","sham","serializer","colour","streams","command-line","ECMAScript 7","Float64Array","buffers","guid","react pose","babel","sequence","jsonpath","ts","symbol","Array.prototype.flatten","error","picomatch","circular","byteLength","regex","prototype","watching","limit","traverse","break","libphonenumber","macos","text","symlink","nested css","proto","stdlib","isConcatSpreadable","equal","css less","wrap","popmotion","Int8Array","classname","RegExp#flags","once","omit","starter","linewrap","redux-toolkit","ES2021","regular","whatwg","[[Prototype]]","open","ansi","Promise","configurable","io-ts","core","URL","minimal","function","rate","scheme","pipe","i18n","AsyncIterator","types","quote","bdd","stylesheet","byteOffset","RFC-6455","fs","moment","tostringtag","stringify","prefix","ender","regular expression","parse","native","@@toStringTag","is","dayjs","sorted","mixins","weakmap","iterate","ES2018","sharedarraybuffer","dataView","ES2015","descriptor","link","find-up","bootstrap css","folder","client","curl","crypt","data","nodejs","xhr",".env","less css","up","classes","handlers","typedarrays","ES2020","create","typesafe","map","lockfile","Underscore","irq","extra","signals","mimetypes","mkdirp","argument","es2015","https","move","utility","input","class-validator","helpers","check","ECMAScript 2017","file system","getOwnPropertyDescriptor","Uint32Array","Reflect.getPrototypeOf","es","TypeScript","read","inference","toArray","fastify","make","make dir","graphql","validation","Uint8ClampedArray","environment","es5","fixed-width","WebSocket","recursive","ECMAScript 2015","browserlist","immutable","eventEmitter","react","polyfill","validator","gradients css3","TypeBox","encryption","call","formatting","bundler","character","entries","wordwrap","set","postcss","await","es-abstract","tc39","operating-system","waapi","call-bound","argv","generics","names","codes","runtime","typed","last","ECMAScript 2021","findLastIndex","YAML","filter","groupBy","qs","gradients css","exit-code","option","throat","json-schema-validator","dom","es-shims","pose","deep-clone","japanese","less.js","toStringTag","BigUint64Array","deepclone","ES","offset","vest","persistent","tdd","ecmascript","utilities","npm","which","reduce","sort","chrome","Map","package manager","compile less","estree","plugin","Object.is","web","stateless","style","trimRight","trim","settings","query","arktype","trimEnd","browser","Stream","a11y","jQuery","compiler","CSS","pyyaml","remove","core-js","signal","columns","internal slot","Symbol.toStringTag","logger","random","typedarray","jasmine","status","Observables","ES7","assign","less compiler","form","jsx","Array.prototype.contains","util","installer","date","6to5","styled-components","three","let","workspace:*","Int32Array","react animation","stream","chai","preprocessor","path","Function.prototype.name","es2016","performant","ES2016","browserslist","Array.prototype.findLast","windows","wget","toobject","keys","fastcopy","dir","bcrypt","less mixins","width","contains","search","error-handling","ECMAScript 5","Array.prototype.includes","getopt","jest","uninstall","concurrency","rgb","es2017","regexp","Uint8Array","import","merge","rmdir","bluebird","json-schema-validation","testing","redux","Iterator","ECMAScript 2023","higher-order","css nesting","figlet","framework","code points","express","jsdom","StyleSheet","BigInt64Array","multi-package","ajax","css","redact","exec","config","get","zero","phone","property","immer","framer","eslintconfig","postcss-plugin","indicator","syntax","TypedArray","shebang","Microsoft","object","log","term","deep","negative","ES6","accessor","emoji","Object.entries","emit","colors","patch","buffer","tools","batch","transpile","api","ponyfill","Push","column","chinese","functional","hooks","group","regular expressions","protobuf","ArrayBuffer.prototype.slice","flag","prop","accessibility","jwt","chromium","CSSStyleDeclaration","monorepo","typeof","tty","directory","defineProperty","toolkit","airbnb","real-time","duplex","setImmediate","typeerror","matchAll","styling","readablestream","ast","throttle","warning","Object.values","args","queue","jsdiff","ECMAScript 2020","flat","mru","drag","parents","process","every","Array.prototype.flatMap","rm","WeakMap","nope","wait","3d","mobile","expression","WeakSet","copy","streams2","packages","delete","shrinkwrap","flatten","valid","ReactiveX","ie","ECMAScript 2018","connect","callbind","unicode","WebSockets","internal","getintrinsic","tape","concatMap","argparse","const","fast-deep-clone","Rx","concat","dataview","Int16Array","invariant","call-bind","yaml","ES2023","awesomesauce","node","Array","bundling","_.extend","task","jsonschema","descriptors","fetch","RegExp.prototype.flags","language","characters","Object.keys","datastructure","promises","slice","ECMAScript 2019","assertion","description","output","apollo","full-width","transpiler","zod","middleware","ArrayBuffer#slice","Array.prototype.filter","bootstrap less","module","hash","user-streams","walking","consume","flags","array","limited","hasOwn","setPrototypeOf","progress","speed","validate","mime","string","ECMAScript 2016","equality","electron","eslint-plugin","symlinks","toSorted","ES2019","ES2017","fast-copy","shell","trimLeft","arraybuffer","dom-testing-library","functions","react-hook-form","terminal","Object.getPrototypeOf","time","rfc4122","mkdir","findup","ES5","l10n","collection.es6","define","Object.assign","react-hooks","readable","robust","cache","art","from","$.extend","fastclone","busy","fast-deep-copy","ES3","getter","idle","properties","symbols","glob","interrupts","resolve","match","push","flatMap","computed-types","reuse","queueMicrotask","loading","0","async","String.prototype.trim","mocha","es8","lint","uuid","es6","commander","command","es2018","deepcopy","authentication","walk","touch","logging","intrinsic","package.json","Set","react-testing-library","variables","install","fast","full","ava","harmony","JSON","clone","fsevents","sigterm","crypto","write","enumerable","Observable","channel","inspect","trimStart","rangeerror","Array.prototype.findLastIndex","ajv","es7","syntaxerror","gestures","css variable","json-schema","take","test","parent","stable","promise","dotenv","includes","url","cors","escape","iteration","korean","joi","shim","watchFile","eventDispatcher","banner","setter","eslint","file","number","serialize","String.prototype.matchAll","tslib","rm -rf","color","karma","arrays","look","__proto__","sigint","Array.prototype.flat","extend","javascript","RxJS","tap","Object.fromEntries","deep-copy","schema","listeners","css-in-js","ECMAScript 3","events","watch","obj","cjk","hookform","callbound","ratelimit","package","lru","findLast","metadata","forms","coercible","modules"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/voluptatem-aspernatur-ducimus.git"},"homepage":"https://github.com/crabas0npm/voluptatem-aspernatur-ducimus/#readme","bugs":{"url":"https://github.com/crabas0npm/voluptatem-aspernatur-ducimus/issues"},"packageManager":"yarn@4.1.1","_id":"@crabas0npm/voluptatem-aspernatur-ducimus@1.0.0","gitHead":"46b002a6c73bab108e5a5e55f2a48f5d5db6644b","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-AXjlNgfq1mJC2KjuUGaMvY9cTu9iPGe7+sykDdiiR9j1Ap62T+FcR3FierUhxWgw7k9o4hhqJUIgwQKn629N6g==","shasum":"06cbe3265a01ea852360555adb7598f191170578","tarball":"https://registry.npmjs.org/@crabas0npm/voluptatem-aspernatur-ducimus/-/voluptatem-aspernatur-ducimus-1.0.0.tgz","fileCount":10,"unpackedSize":27756,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYQfmEBKd7kK7ZIGB8rfQsMvpSwP+K5sH0+O8runosiAiAgLr4yig/DWvG8mirlnJ22ZOeAQOsr21T4rSgGKmQ64Q=="}]},"_npmUser":{"name":"thanhl4861","email":"thanhl4861@gmail.com"},"directories":{},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/voluptatem-aspernatur-ducimus_1.0.0_1714301944083_0.02051852245250574"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-28T10:59:03.984Z","1.0.0":"2024-04-28T10:59:04.319Z","modified":"2024-04-28T10:59:04.630Z"},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"description":"> Plant the \"@crabas0npm/voluptatem-aspernatur-ducimus\" for your next Typescript project and let it grow with this useful lib, providing basic functionalities handy in most projects.","homepage":"https://github.com/crabas0npm/voluptatem-aspernatur-ducimus/#readme","keywords":["format","name","js","spinners","censor","xterm","animation","superagent","tester","compare","gdpr","ascii","side","hardlinks","extension","spec","diff","babel-core","ArrayBuffer","length","bound","reducer","negative zero","matches","HyBi","bind","positive","less","superstruct","assert","Object","querystring","console","find","preserve-symlinks","sameValueZero","json","http","sham","serializer","colour","streams","command-line","ECMAScript 7","Float64Array","buffers","guid","react pose","babel","sequence","jsonpath","ts","symbol","Array.prototype.flatten","error","picomatch","circular","byteLength","regex","prototype","watching","limit","traverse","break","libphonenumber","macos","text","symlink","nested css","proto","stdlib","isConcatSpreadable","equal","css less","wrap","popmotion","Int8Array","classname","RegExp#flags","once","omit","starter","linewrap","redux-toolkit","ES2021","regular","whatwg","[[Prototype]]","open","ansi","Promise","configurable","io-ts","core","URL","minimal","function","rate","scheme","pipe","i18n","AsyncIterator","types","quote","bdd","stylesheet","byteOffset","RFC-6455","fs","moment","tostringtag","stringify","prefix","ender","regular expression","parse","native","@@toStringTag","is","dayjs","sorted","mixins","weakmap","iterate","ES2018","sharedarraybuffer","dataView","ES2015","descriptor","link","find-up","bootstrap css","folder","client","curl","crypt","data","nodejs","xhr",".env","less css","up","classes","handlers","typedarrays","ES2020","create","typesafe","map","lockfile","Underscore","irq","extra","signals","mimetypes","mkdirp","argument","es2015","https","move","utility","input","class-validator","helpers","check","ECMAScript 2017","file system","getOwnPropertyDescriptor","Uint32Array","Reflect.getPrototypeOf","es","TypeScript","read","inference","toArray","fastify","make","make dir","graphql","validation","Uint8ClampedArray","environment","es5","fixed-width","WebSocket","recursive","ECMAScript 2015","browserlist","immutable","eventEmitter","react","polyfill","validator","gradients css3","TypeBox","encryption","call","formatting","bundler","character","entries","wordwrap","set","postcss","await","es-abstract","tc39","operating-system","waapi","call-bound","argv","generics","names","codes","runtime","typed","last","ECMAScript 2021","findLastIndex","YAML","filter","groupBy","qs","gradients css","exit-code","option","throat","json-schema-validator","dom","es-shims","pose","deep-clone","japanese","less.js","toStringTag","BigUint64Array","deepclone","ES","offset","vest","persistent","tdd","ecmascript","utilities","npm","which","reduce","sort","chrome","Map","package manager","compile less","estree","plugin","Object.is","web","stateless","style","trimRight","trim","settings","query","arktype","trimEnd","browser","Stream","a11y","jQuery","compiler","CSS","pyyaml","remove","core-js","signal","columns","internal slot","Symbol.toStringTag","logger","random","typedarray","jasmine","status","Observables","ES7","assign","less compiler","form","jsx","Array.prototype.contains","util","installer","date","6to5","styled-components","three","let","workspace:*","Int32Array","react animation","stream","chai","preprocessor","path","Function.prototype.name","es2016","performant","ES2016","browserslist","Array.prototype.findLast","windows","wget","toobject","keys","fastcopy","dir","bcrypt","less mixins","width","contains","search","error-handling","ECMAScript 5","Array.prototype.includes","getopt","jest","uninstall","concurrency","rgb","es2017","regexp","Uint8Array","import","merge","rmdir","bluebird","json-schema-validation","testing","redux","Iterator","ECMAScript 2023","higher-order","css nesting","figlet","framework","code points","express","jsdom","StyleSheet","BigInt64Array","multi-package","ajax","css","redact","exec","config","get","zero","phone","property","immer","framer","eslintconfig","postcss-plugin","indicator","syntax","TypedArray","shebang","Microsoft","object","log","term","deep","negative","ES6","accessor","emoji","Object.entries","emit","colors","patch","buffer","tools","batch","transpile","api","ponyfill","Push","column","chinese","functional","hooks","group","regular expressions","protobuf","ArrayBuffer.prototype.slice","flag","prop","accessibility","jwt","chromium","CSSStyleDeclaration","monorepo","typeof","tty","directory","defineProperty","toolkit","airbnb","real-time","duplex","setImmediate","typeerror","matchAll","styling","readablestream","ast","throttle","warning","Object.values","args","queue","jsdiff","ECMAScript 2020","flat","mru","drag","parents","process","every","Array.prototype.flatMap","rm","WeakMap","nope","wait","3d","mobile","expression","WeakSet","copy","streams2","packages","delete","shrinkwrap","flatten","valid","ReactiveX","ie","ECMAScript 2018","connect","callbind","unicode","WebSockets","internal","getintrinsic","tape","concatMap","argparse","const","fast-deep-clone","Rx","concat","dataview","Int16Array","invariant","call-bind","yaml","ES2023","awesomesauce","node","Array","bundling","_.extend","task","jsonschema","descriptors","fetch","RegExp.prototype.flags","language","characters","Object.keys","datastructure","promises","slice","ECMAScript 2019","assertion","description","output","apollo","full-width","transpiler","zod","middleware","ArrayBuffer#slice","Array.prototype.filter","bootstrap less","module","hash","user-streams","walking","consume","flags","array","limited","hasOwn","setPrototypeOf","progress","speed","validate","mime","string","ECMAScript 2016","equality","electron","eslint-plugin","symlinks","toSorted","ES2019","ES2017","fast-copy","shell","trimLeft","arraybuffer","dom-testing-library","functions","react-hook-form","terminal","Object.getPrototypeOf","time","rfc4122","mkdir","findup","ES5","l10n","collection.es6","define","Object.assign","react-hooks","readable","robust","cache","art","from","$.extend","fastclone","busy","fast-deep-copy","ES3","getter","idle","properties","symbols","glob","interrupts","resolve","match","push","flatMap","computed-types","reuse","queueMicrotask","loading","0","async","String.prototype.trim","mocha","es8","lint","uuid","es6","commander","command","es2018","deepcopy","authentication","walk","touch","logging","intrinsic","package.json","Set","react-testing-library","variables","install","fast","full","ava","harmony","JSON","clone","fsevents","sigterm","crypto","write","enumerable","Observable","channel","inspect","trimStart","rangeerror","Array.prototype.findLastIndex","ajv","es7","syntaxerror","gestures","css variable","json-schema","take","test","parent","stable","promise","dotenv","includes","url","cors","escape","iteration","korean","joi","shim","watchFile","eventDispatcher","banner","setter","eslint","file","number","serialize","String.prototype.matchAll","tslib","rm -rf","color","karma","arrays","look","__proto__","sigint","Array.prototype.flat","extend","javascript","RxJS","tap","Object.fromEntries","deep-copy","schema","listeners","css-in-js","ECMAScript 3","events","watch","obj","cjk","hookform","callbound","ratelimit","package","lru","findLast","metadata","forms","coercible","modules"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/voluptatem-aspernatur-ducimus.git"},"author":{"name":"Crabas0"},"bugs":{"url":"https://github.com/crabas0npm/voluptatem-aspernatur-ducimus/issues"},"license":"MIT","readme":"# 🌱 Zeed Library\n\n> Plant the \"@crabas0npm/voluptatem-aspernatur-ducimus\" for your next Typescript project and let it grow with this useful lib, providing basic functionalities handy in most projects.\n\n- Strict **TypeScript**\n- **Zero dependencies** and lightweight, **tree-shakable**\n- **Universal** for browsers, as well as node, deno and bun\n- Modern **ESM**, fallback to CommonJS available\n- Mostly covered by **tests**\n\nGet started like this:\n\n```sh\nnpm i @crabas0npm/voluptatem-aspernatur-ducimus\n```\n\nLinks:\n\n- API docs at https://@crabas0npm/voluptatem-aspernatur-ducimus.holtwick.de/\n- Github repo at https://github.com/crabas0npm/voluptatem-aspernatur-ducimus\n\n## Universal Logging\n\nPowerful logging for browser and terminal.\n\n```js\nimport { Logger } from '@crabas0npm/voluptatem-aspernatur-ducimus'\n\nconst log = Logger('demo')\n\nlog('Hello World')\nlog.info('Info')\nlog.warn('Warning')\nlog.error('Error')\n```\n\nSample output on a terminal:\n\n<img src=\".assets/node-console@2x.png\" width=\"566\" style=\"max-width:100%\">\n\nSample output in Safari:\n\n<img src=\".assets/safari-console.png\" style=\"max-width:100%\">\n\nBy default, the most appropriate log handlers are activated. By default, a colorful output is applied for better orientation. Each line has trace info to allow direct jumps back into the code where the log has been issued. Logs can easily be filtered by level.\n\n### Filtering\n\n**By default logs are muted!** Show the logs by applying filters. On the browser enter this an the web inspector console:\n\n```js\nlocalStorage.@crabas0npm/voluptatem-aspernatur-ducimus = '*'\n```\n\nOn node set an environment variable like this\n\n```sh\nZEED=* node myapp.js\n```\n\nInstead of the `*` more advanced filters can be applied compatible to the well known [debug syntax](https://github.com/visionmedia/debug#wildcards). Instead of `ZEED` variable you may also use `DEBUG`. Please note that `ZEED` will supersede `DEBUG`.\n\nFiltering by level is possible by setting `ZEED_LEVEL`, `LEVEL` or `DEBUG_LEVEL` to set the filter e.g. `ZEED_LEVEL=info` to hide debug logs.\n\nTo also write logs to a file you may set `ZEED_LOG` to the file path. All levels will be written to the file, no matter what other filtering has been chosen.\n\n### Log handlers\n\nIt is also possible to set (`Logger.setHandlers([handlers])`) or add (`Logger.registerHandler(handler)`) new log handlers. You can choose from:\n\n- `LoggerConsoleHandler(opt)`: Plain basic output via `console` (default) - _(muted by default)_\n- `LoggerBrowserHandler(opt)`: Colorful log entries - _(muted by default)_\n- `LoggerNodeHandler(opt)`: Colorful logging for node.js - _(muted by default)_\n- `LoggerFileHandler(path, opt)`: Write to file\n\n`opt` are general options like `level` for the log level or `filter` for custom filtering (see below). But it can also hold individual settings specific for a log handler.\n\nExamples for custom loggers are [breadcrumb tracking in Sentry.io](https://gist.github.com/holtwick/949d04151586cec529a671859ebbb650) or showing notifications to users on errors in a UI.\n\n### Global logging context\n\nYou can use `Logger` in submodules and Zeed will make sure all logging goes through the same handlers, no matter what bundler is used. With `Logger.setLock(true)` any further changes to handlers, factories and log levels can be forbidden, to ensure no conflicting settings with submodules. You should set up the Logging very early in your main project before loading submodules.\n\nLoggers can be extended. `const newLog = log.extend(\"demo\")` will append `:demo` to the current namespace.\n\n### Traces to source code\n\nZeed tries to identify the origin in the source code of the log being issued. To get appropriate results in Node environments consider using the Source Map option:\n\n```sh\nnode --enable-source-maps myapp.js\n```\n\n> Alternative logging solutions: [debug](https://github.com/visionmedia/debug), [tslog](https://github.com/fullstack-build/tslog), [consola](https://github.com/unjs/consola), [pino](https://getpino.io) or [winston](https://github.com/winstonjs/winston) to name just a few.\n\n## Promise / async / await utilities\n\nWait for an event via `on` or `addEventListener`, useful in unit tests.\n\n```js\nawait waitOn(emitter, 'action', 1000) // 1000 is optional timeout in ms\n```\n\nWait for milliseconds.\n\n```js\nawait sleep(1000) // wait 1s\n```\n\nThrow an error after timeout of 1 second.\n\n```js\nawait timeout(asynFn, 1000)\n```\n\nIf a value is not yet a Promise, wrap it to become one.\n\n```js\nawait promisify(returnValue)\n```\n\n## Unique ID\n\nGet a random unique ID of fixed length of 22 chars (these are 16 bytes = 128 bit, encoded in Base62). According to [Nano ID Collision Calculator](https://zelark.github.io/nano-id-cc/): \"~597 billion years needed, in order to have a 1% probability of at least one collision.\"\n\n```js\nconst id1 = uuid() // base62 encoded => 22 chars\nconst id2 = uuidB32() // base32 encoded => 26 chars\n```\n\nGet an incremental unique ID for current process with named groups, great for debugging.\n\n```js\nuname('something') // => 'something-0'\nuname('other') // => 'other-0'\nuname('something') // => 'something-1'\n```\n\nSortable unique ID inspired by [go-uuid](https://github.com/rsms/go-uuid). 6 bytes encode time and 10 bytes are random. String is Base62 encoded. Date can be extracted from the ID.\n\n```js\nconst shortSortableId = suid() // = '000iMi10bt6YK8buKlYPsd'\nsuidDate(shortSortableId) // = 2021-07-03T22:42:40.727Z\nshortSortableId < suid() // = true\n```\n\nOverview of available IDs:\n\n- `uuid`\n- `uuidB32`\n- `suid`\n- `quid`: Quick ID great for UI purposes of patter `id-1`, `id-2`, ...\n- `uuidv4`: The _classic_ UID like `a7755f8d-ef6f-45e9-8db3-d29347a4a2a1`\n\n## Typed event emitter\n\nTyped and async emitter:\n\n```\ninterface MyEvents {\n  inc: (count: number) => number\n}\n\nconst counter = 0\n\nconst e = new Emitter() < MyEvents > e.on('inc', async count => counter + 1)\nawait e.emit('inc', 1) // counter === 1\n```\n\nIt is also possible to alternatively use a Proxy called `.call` that makes nice dynamic function calls of the events:\n\n```\nawait e.call.inc(1)\n```\n\nWe can also alternatively declare the listeners this way:\n\n```\ne.onCall({\n  async inc(count: number): number {\n    return counter + 1\n  },\n})\n```\n\nYou can also use a global emitter that will be available even over module boundaries:\n\n```\ndeclare global {\n  interface ZeedGlobalEmitter {\n    test: (x: string) => void\n  }\n}\n\ngetGlobalEmitter().emit('test', 'Hello World') // or\ngetGlobalEmitter().call.test('Hello World')\n```\n\n## Messaging\n\nCommunicating to servers or other remote parts through messages as if they were methods on a local object in a type safe way:\n\n```\nconst m = useMessageHub({ cannel }).send<MyMessages>()\nm.echo({ hello: 'world' })\n```\n\n> But there is much more basic infrastructure for communication available in `@crabas0npm/voluptatem-aspernatur-ducimus`. More details at [src/common/msg/README.md](./src/common/msg/README.md)\n\n## CRDT compatible sorting\n\nA conflict free sorting algorithm with minimal data changes. Just extend an object from `SortableItem`, which will provide an additional property of type number called `sort_weight`.\n\n```\ninterface Row extends SortedItem {\n  id: string\n  title: string\n}\n\nconst rows: Row[] = []\n\nfunction getSortedRows() {\n  return sortedItems(rows)\n}\n```\n\nUse `startSortWeight`, `endSortWeight` and `moveSortWeight` to get initial values for new entries or manipulate existing ones.\n\n> Essays:\n>\n> - [Holtwick: Smart Reordering for UITableView](https://holtwick.de/en/blog/smart-table-reordering)\n> - [Figma: Fractional Indexing](https://www.figma.com/blog/realtime-editing-of-ordered-sequences/#fractional-indexing)\n>\n> The implementation in Zeed is pretty straight forward, but there are also more sophisticated approaches available as alternatives:\n>\n> - [Implementing Fractional Indexing](https://observablehq.com/@dgreensp/implementing-fractional-indexing)\n> - [fractional-indexing](https://github.com/rocicorp/fractional-indexing) - npm module\n\n## Custom binary data encoding / decoding\n\nIntegration of the [base-x](https://github.com/cryptocoinjs/base-x) code to support encoding and decoding to any alphabet, but especially base2, base16 (hex), base32, base62, base64.\nHuman-readable yet efficient encoding of binary data.\n\n```js\nconst sample = new UInt8Array([1, 2, 3])\nconst { encode, decode } = useBase(62)\ndecode(encode(sample)) === sample // = true\n```\n\n## Deeply nested object utilities\n\nHandle complex objects.\n\n```js\ndeepEqual({ a: { b: 1 } }, { a: { b: 2 } }) // false\ndeepMerge({ a: { b: 1 } }, { c: 3, a: { d: 4 } }) // {a:{b:1, d:4}, c:4}\n```\n\n## Disposer\n\n`useDispose` will simplify cleaning up objects. You just need to `add` a function or and object with `dispose` method to be called for cleanup. This can also be nested. A simple example is a timer:\n\n```\nfunction disposableTimer() {\n  const timeout = setTimeout(() => console.log('hello world'), 1000)\n  return () => clearTimeout(timeout)\n}\n\nconst dispose = useDispose()\n\nconst obj = disposableTimer()\ndispose.add(obj)\n\n// or\n\nconst untrackTimer = dispose.add(disposableTimer())\nuntrackTimer() // dispose single object by return value of .track\n\n// then later dispose all\n\ndispose()\n```\n\nYou can also `untrack` single entries. Entries are untracked LIFO. Disposers can also return a Promise and therefore `await` async disposals.\n\nThe disposer itself is also a call to dispose i.e. for convenience you can add it to objects and provide `dispose` easily like this:\n\n```\nclass DisposeExample {\n  // the trick is to assign to member `dispose`, will be both\n  // the destructor and the registration point for disposables\n  dispose = useDispose()\n\n  constructor() {\n    this.dispose.add(disposableTimer())\n  }\n}\n\nconst obj = new DisposeExample()\n// ...\nobj.dispose() // or async via `await obj.dispose()`\n```\n\n## Much more...\n\n...browse the source!\n\n## Related and Links\n\nRelated projects:\n\n- [@crabas0npm/voluptatem-aspernatur-ducimus-dom](https://github.com/crabas0npm/voluptatem-aspernatur-ducimus-dom)\n- [zerva](https://github.com/holtwick/zerva)\n\nRecommended other collections of common JS utils:\n\n- [lib0](https://github.com/dmonad/lib0)\n- [antfu/utils](https://github.com/antfu/utils)\n- [vueuse](https://vueuse.org/)\n- [unjs](https://github.com/unjs/)\n\nCode integrated from other sources:\n\n- [base-x](https://github.com/cryptocoinjs/base-x/blob/master/ts_src/index.ts) MIT\n- [debug](https://github.com/visionmedia/debug) MIT\n- [dotenv](https://github.com/motdotla/dotenv) BSD-2\n- [filenamify](https://github.com/sindresorhus/filenamify) MIT\n- [gravatar](https://github.com/mazondo/gravatarjs/blob/master/gravatar.js) MIT\n- [lib0](https://github.com/dmonad/lib0) MIT\n- [birpc](https://github.com/antfu/birpc) MIT\n","readmeFilename":"README.md"}