{"_id":"@crabas0npm/ullam-voluptatum-expedita","name":"@crabas0npm/ullam-voluptatum-expedita","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crabas0npm/ullam-voluptatum-expedita","version":"1.0.0","description":"![CI](https://github.com/crabas0npm/ullam-voluptatum-expedita/workflows/CI/badge.svg) [![NPM version](https://img.shields.io/npm/v/@crabas0npm/ullam-voluptatum-expedita.svg?style=flat)](https://www.npmjs.com/package/@crabas0npm/ullam-voluptatum-expedita) ","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"},"keywords":["postcss-plugin","call-bind","CSSStyleDeclaration","telephone","lru","up","yup","process","Int32Array","browserslist","setImmediate","css variable","ES","spawn","asserts","Microsoft","accessor","require","inference","WeakMap","framework","pnpm9","korean","glob","intrinsic","serialize","name","fs","crypt","iterate","css less","debug","lesscss","sort","define","term","estree","superstruct","RFC-6455","sharedarraybuffer","String.prototype.matchAll","packages","transpile","progress","pipe","JSON","hooks","ECMAScript 6","consume","react","bound","output","xdg","column","lazy","regular expressions","css nesting","setter","log","crypto","ES2019","task","descriptor","installer","package","ECMAScript 2019","error-handling","javascript","copy","deep-copy","types","dom","utils","utility","inspect","file system","async","number","install","make","Object.defineProperty","group","compare","performant","ie","ESnext","website","internal","shim","sequence","args","ECMAScript 2016","match","accessibility","worker","es5","ES2020","pretty","code points","Object.fromEntries","getter","classnames","es2017","concatMap","flatten","deep-clone","Map","wordwrap","URLSearchParams","Function.prototype.name","hash","indicator","bundling","Array.prototype.includes","less mixins","256","equal","moment","walk","dataView","exec","ascii","css-in-js","Array.prototype.flatten","urls","class-validator","BigInt64Array","toSorted","cors","environment","higher-order","ECMAScript 2023","clone","fp","testing","make dir","trimStart","take","point-free","flag","setPrototypeOf","Observable","Object.entries","slot","diff","forEach","art","deterministic","argparse","typed","preserve-symlinks","jest","format","lint","censor","watching","queue","arrays","scheme","descriptors","readablestream","figlet","compile less","polyfill","Array.prototype.findLastIndex","buffers","stringifier","xdg-open","rm -rf","apollo","bind","eslint-plugin","api","encryption","redux-toolkit","RxJS","writable","escape","idle","zod","call-bound","throat","eventEmitter","cache","jQuery","Float32Array","phone","immer","ECMAScript 2020","env","Array.prototype.filter","byteOffset","ECMAScript 2017","autoprefixer","ES2023","stateless","core-js","getopt","optimist","gradients css3","fast-copy","tacit","transpiler","negative zero","folder","karma","bdd","ECMAScript 2018","multi-package","hardlinks","arguments","array","batch","typanion","react pose","util","Promise","dom-testing-library","rate","language","link","structuredClone","command","npm","es-abstract","create","ES2022","framer","banner","functional","value","hasOwn","validation","eslintconfig","popmotion","modules","interrupts","parents","ArrayBuffer.prototype.slice","bootstrap css","airbnb","ES2021","functions","ansi","linewrap","0","weakmap","js","middleware","entries","keys","walking","es-shims","browserlist","matches","mocha","prefix","properties","helpers","random","watchFile","iterator","syntaxerror","weakset","protobuf","view","error","joi","Underscore","sorted","String.prototype.trim","gradients css","date","deepcopy","ratelimit","module","Array.prototype.flatMap","react-hooks","[[Prototype]]","libphonenumber","id","sameValueZero","xterm","uninstall","input","operating-system","get","less css","sigint","exit","command-line","@@toStringTag","monorepo","spring","ts","validator","is","reuse","internal slot","Uint16Array","typedarrays","remove","trimLeft","symbols","dotenv","coercible","cli","lockfile","symlinks","mime-db","Stream","dayjs","callbound","events","byteLength","data","stylesheet","ES2016","formatting","look","Int8Array","scheme-validation","-0","start","sigterm","ES2017","mkdirs","variables","which","recursive","trimEnd","request","waapi","RegExp.prototype.flags","last","concurrency","mru","symlink","6to5","user-streams","Streams","spec","test","signals","WeakSet","isConcatSpreadable","less","app","protocol-buffers","mkdir","animation","listeners","let","CSS","json-schema","var","sanitization","terminal","argument","flatMap","filter","codes","native","3d","eslint","babel","ajax","function","json-schema-validator","groupBy","symbol","streams2","text","xss","mobile","json-schema-validation","fixed-width","shell",".env","path","schema","shrinkwrap","assert","mime","mkdirp","circular","auth","ES7","wordbreak","findLastIndex","extension","stable","serialization","serializer","launch","l10n","file","Array.prototype.flat","collection","pose","regex","chai","WebSockets","curried","ajv","starter","ES2018","side","status","unicode","forms","bootstrap less","jwt","toobject","matchAll","type","password","Symbol","tty","reduce","style","wait","ES8","includes","loading","flat","argv","https","read","less.js","string","URL","shebang","minimal","TypedArray"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/ullam-voluptatum-expedita.git"},"homepage":"https://github.com/crabas0npm/ullam-voluptatum-expedita/#readme","bugs":{"url":"https://github.com/crabas0npm/ullam-voluptatum-expedita/issues"},"packageManager":"yarn@4.1.1","_id":"@crabas0npm/ullam-voluptatum-expedita@1.0.0","gitHead":"613bdc49033d0a0a61dff87ca8a10107a2c52a36","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-wooakus7aTNjJu7yoYe7+JjXtTjn6hLgzeQfMktqPoMZwDrzd/jVREJXqhDLDshIJzat67wsK+vRxx9NAytssw==","shasum":"98284e11c2edc3264c86007997bb2580049bfa45","tarball":"https://registry.npmjs.org/@crabas0npm/ullam-voluptatum-expedita/-/ullam-voluptatum-expedita-1.0.0.tgz","fileCount":10,"unpackedSize":17888,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIVVoObQf+NsXL8na2vrLF140fWTlfamCcltehnHdyYgIgPpN3H0yfrK1WowmZ7hJXjk4LbQ8yzo/PII6EXoh4de8="}]},"_npmUser":{"name":"thanhl4861","email":"thanhl4861@gmail.com"},"directories":{},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ullam-voluptatum-expedita_1.0.0_1714030152367_0.7351382898344125"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-25T07:29:12.206Z","1.0.0":"2024-04-25T07:29:12.518Z","modified":"2024-04-25T07:29:12.833Z"},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"description":"![CI](https://github.com/crabas0npm/ullam-voluptatum-expedita/workflows/CI/badge.svg) [![NPM version](https://img.shields.io/npm/v/@crabas0npm/ullam-voluptatum-expedita.svg?style=flat)](https://www.npmjs.com/package/@crabas0npm/ullam-voluptatum-expedita) ","homepage":"https://github.com/crabas0npm/ullam-voluptatum-expedita/#readme","keywords":["postcss-plugin","call-bind","CSSStyleDeclaration","telephone","lru","up","yup","process","Int32Array","browserslist","setImmediate","css variable","ES","spawn","asserts","Microsoft","accessor","require","inference","WeakMap","framework","pnpm9","korean","glob","intrinsic","serialize","name","fs","crypt","iterate","css less","debug","lesscss","sort","define","term","estree","superstruct","RFC-6455","sharedarraybuffer","String.prototype.matchAll","packages","transpile","progress","pipe","JSON","hooks","ECMAScript 6","consume","react","bound","output","xdg","column","lazy","regular expressions","css nesting","setter","log","crypto","ES2019","task","descriptor","installer","package","ECMAScript 2019","error-handling","javascript","copy","deep-copy","types","dom","utils","utility","inspect","file system","async","number","install","make","Object.defineProperty","group","compare","performant","ie","ESnext","website","internal","shim","sequence","args","ECMAScript 2016","match","accessibility","worker","es5","ES2020","pretty","code points","Object.fromEntries","getter","classnames","es2017","concatMap","flatten","deep-clone","Map","wordwrap","URLSearchParams","Function.prototype.name","hash","indicator","bundling","Array.prototype.includes","less mixins","256","equal","moment","walk","dataView","exec","ascii","css-in-js","Array.prototype.flatten","urls","class-validator","BigInt64Array","toSorted","cors","environment","higher-order","ECMAScript 2023","clone","fp","testing","make dir","trimStart","take","point-free","flag","setPrototypeOf","Observable","Object.entries","slot","diff","forEach","art","deterministic","argparse","typed","preserve-symlinks","jest","format","lint","censor","watching","queue","arrays","scheme","descriptors","readablestream","figlet","compile less","polyfill","Array.prototype.findLastIndex","buffers","stringifier","xdg-open","rm -rf","apollo","bind","eslint-plugin","api","encryption","redux-toolkit","RxJS","writable","escape","idle","zod","call-bound","throat","eventEmitter","cache","jQuery","Float32Array","phone","immer","ECMAScript 2020","env","Array.prototype.filter","byteOffset","ECMAScript 2017","autoprefixer","ES2023","stateless","core-js","getopt","optimist","gradients css3","fast-copy","tacit","transpiler","negative zero","folder","karma","bdd","ECMAScript 2018","multi-package","hardlinks","arguments","array","batch","typanion","react pose","util","Promise","dom-testing-library","rate","language","link","structuredClone","command","npm","es-abstract","create","ES2022","framer","banner","functional","value","hasOwn","validation","eslintconfig","popmotion","modules","interrupts","parents","ArrayBuffer.prototype.slice","bootstrap css","airbnb","ES2021","functions","ansi","linewrap","0","weakmap","js","middleware","entries","keys","walking","es-shims","browserlist","matches","mocha","prefix","properties","helpers","random","watchFile","iterator","syntaxerror","weakset","protobuf","view","error","joi","Underscore","sorted","String.prototype.trim","gradients css","date","deepcopy","ratelimit","module","Array.prototype.flatMap","react-hooks","[[Prototype]]","libphonenumber","id","sameValueZero","xterm","uninstall","input","operating-system","get","less css","sigint","exit","command-line","@@toStringTag","monorepo","spring","ts","validator","is","reuse","internal slot","Uint16Array","typedarrays","remove","trimLeft","symbols","dotenv","coercible","cli","lockfile","symlinks","mime-db","Stream","dayjs","callbound","events","byteLength","data","stylesheet","ES2016","formatting","look","Int8Array","scheme-validation","-0","start","sigterm","ES2017","mkdirs","variables","which","recursive","trimEnd","request","waapi","RegExp.prototype.flags","last","concurrency","mru","symlink","6to5","user-streams","Streams","spec","test","signals","WeakSet","isConcatSpreadable","less","app","protocol-buffers","mkdir","animation","listeners","let","CSS","json-schema","var","sanitization","terminal","argument","flatMap","filter","codes","native","3d","eslint","babel","ajax","function","json-schema-validator","groupBy","symbol","streams2","text","xss","mobile","json-schema-validation","fixed-width","shell",".env","path","schema","shrinkwrap","assert","mime","mkdirp","circular","auth","ES7","wordbreak","findLastIndex","extension","stable","serialization","serializer","launch","l10n","file","Array.prototype.flat","collection","pose","regex","chai","WebSockets","curried","ajv","starter","ES2018","side","status","unicode","forms","bootstrap less","jwt","toobject","matchAll","type","password","Symbol","tty","reduce","style","wait","ES8","includes","loading","flat","argv","https","read","less.js","string","URL","shebang","minimal","TypedArray"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/ullam-voluptatum-expedita.git"},"author":{"name":"Crabas0"},"bugs":{"url":"https://github.com/crabas0npm/ullam-voluptatum-expedita/issues"},"license":"MIT","readme":"# @crabas0npm/ullam-voluptatum-expedita\n\n![CI](https://github.com/crabas0npm/ullam-voluptatum-expedita/workflows/CI/badge.svg)\n[![NPM version](https://img.shields.io/npm/v/@crabas0npm/ullam-voluptatum-expedita.svg?style=flat)](https://www.npmjs.com/package/@crabas0npm/ullam-voluptatum-expedita)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)\n\nA small utility for generating consistent warning objects across your codebase.\nIt also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise).\n\n_This module is used by the [Fastify](https://fastify.dev) framework and it was called `fastify-warning` prior to version 1.0.0._\n\n### Install\n\n```\nnpm i @crabas0npm/ullam-voluptatum-expedita\n```\n\n### Usage\n\nThe module exports two builder functions for creating warnings.\n\n```js\nconst {\n  createWarning,\n  createDeprecation\n} = require('@crabas0npm/ullam-voluptatum-expedita')\n\nconst warning = createWarning({\n  name: 'ExampleWarning',\n  code: 'EXP_WRN_001',\n  message: 'Hello %s',\n  unlimited: true\n})\nwarning('world')\n```\n\n#### Methods\n\n##### `createWarning({ name, code, message[, unlimited] })`\n\n- `name` (`string`, required) - The error name, you can access it later with\n`error.name`. For consistency, we recommend prefixing module error names\nwith `{YourModule}Warning`\n- `code` (`string`, required) - The warning code, you can access it later with\n`error.code`. For consistency, we recommend prefixing plugin error codes with\n`{ThreeLetterModuleName}_`, e.g. `FST_`. NOTE: codes should be all uppercase.\n- `message` (`string`, required) - The warning message. You can also use\ninterpolated strings for formatting the message.\n- `options` (`object`, optional) - Optional options with the following\nproperties:\n  + `unlimited` (`boolean`, optional) - Should the warning be emitted more than\n  once? Defaults to `false`.\n\n\n##### `createDeprecation({code, message[, options]})`\n\nThis is a wrapper for `createWarning`. It is equivalent to invoking\n`createWarning` with the `name` parameter set to \"DeprecationWarning\".\n\nDeprecation warnings have extended support for the Node.js CLI options:\n`--throw-deprecation`, `--no-deprecation`, and `--trace-deprecation`.\n\n##### `warning([, a [, b [, c]]])`\n\nThe returned `warning` function can used for emitting warnings.\nA warning is guaranteed to be emitted at least once.\n\n- `[, a [, b [, c]]]` (`any`, optional) - Parameters for string interpolation.\n\n```js\nconst { createWarning } = require('@crabas0npm/ullam-voluptatum-expedita')\nconst FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'message' })\nFST_ERROR_CODE()\n```\n\nHow to use an interpolated string:\n```js\nconst { createWarning } = require('@crabas0npm/ullam-voluptatum-expedita')\nconst FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s'})\nFST_ERROR_CODE('world')\n```\n\nThe `warning` object has methods and properties for managing the warning's state. Useful for testing.\n```js\nconst { createWarning } = require('@crabas0npm/ullam-voluptatum-expedita')\nconst FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s'})\nconsole.log(FST_ERROR_CODE.emitted) // false\nFST_ERROR_CODE('world')\nconsole.log(FST_ERROR_CODE.emitted) // true\n\nconst FST_ERROR_CODE_2 = createWarning('MyAppWarning', 'FST_ERROR_CODE_2', 'Hello %s')\nFST_ERROR_CODE_2.emitted = true\nFST_ERROR_CODE_2('world') // will not be emitted because it is not unlimited\n```\n\nHow to use an unlimited warning:\n```js\nconst { createWarning } = require('@crabas0npm/ullam-voluptatum-expedita')\nconst FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s', unlimited: true })\nFST_ERROR_CODE('world') // will be emitted\nFST_ERROR_CODE('world') // will be emitted again\n```\n\n#### Suppressing warnings\n\nIt is possible to suppress warnings by utilizing one of node's built-in warning suppression mechanisms.\n\nWarnings can be suppressed:\n\n- by setting the `NODE_NO_WARNINGS` environment variable to `1`\n- by passing the `--no-warnings` flag to the node process\n- by setting '--no-warnings' in the `NODE_OPTIONS` environment variable\n\nFor more information see [node's documentation](https://nodejs.org/api/cli.html).\n\n## License\n\nLicensed under [MIT](./LICENSE).\n","readmeFilename":"README.md"}