{"_id":"@crabas0npm/vel-eius-in","name":"@crabas0npm/vel-eius-in","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crabas0npm/vel-eius-in","version":"1.0.0","description":"![ci][ci-url] [![npm version][npm-badge]][npm-url]","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":["json-schema","parse","sameValueZero","ES7","dependencies","ES2016","internal","Push","BigInt64Array","jsonpath","speed","URLSearchParams","queue","preprocessor","modules","dotenv","symbols","ES8","break","output","option","browserlist","pnpm9","assert","time","fetch","variables in css","Function.prototype.name","typeof","callbound","immutable","String.prototype.matchAll","drop","url","type","mimetypes","object","define","fast-deep-clone","sharedarraybuffer","less.js","dataview","worker","telephone","touch","Streams","properties","link","args","efficient","writable","Object.keys","harmony","folder","watchFile","busy","chromium","ramda","browser","Int32Array","yup","css variable","deep","look-up","descriptor","graphql","status","lesscss","ECMAScript 2018","jQuery","256","contains","helpers","equality","ascii","bound","spinner","toolkit","xterm","Object.entries","JSON","columns","ECMAScript 7","es2016","css","fast-copy","datastructure","chai","accessor","RegExp.prototype.flags","transpile","positive","WeakSet","color","flatMap","fastify","enumerable","popmotion","keys","omit","full-width","bundler","functional","deep-clone","findLast","pyyaml","clone","unicode","escape","lru","mru","typedarray","WebSockets","xhr","signal","waapi","matchAll","prefix","request","less compiler","typanion","accessibility","length","performant","HyBi","equal","redux","tty","delete","uuid","Float64Array","wordwrap","redux-toolkit","rm","queueMicrotask","framework","string","test","tape","view","await","eslintconfig","CSSStyleDeclaration","trimEnd","arktype","pure","shared","byte","ponyfill","ES5","__proto__","cli","isConcatSpreadable","quote","Underscore","ES2023","serialization","TypeBox","Array","api","push","extend","promises","shebang","let","Uint8ClampedArray","hash","eventDispatcher","style","process","starter","safe","tslib","watcher","stringify","weakmap","Object.is","stream","trim","react pose","connect","linux","Promise","fantasy-land","optimizer","eslintplugin","ender","date","Object.values","plugin","default","curl","Array.prototype.flat","module","install","recursive","flags","js","ECMAScript 6","stateless","compiler","ECMAScript 2017","syntax","wget","rapid","scheme","sort","cmd","libphonenumber","crypto","web","typescript","whatwg","express","defineProperty","art","native","package manager","operating-system","indicator","pipe","mkdir","throat","ES2020","Stream","commander","parent","ECMAScript 5","real-time","utility","three","Observable","groupBy","JSON-Schema","postcss","call-bind","intrinsic","chinese","jsx","$.extend","react","mocha","error","open","babel-core","String.prototype.trim","mkdirp","eventEmitter","Uint8Array","jsonschema","fast","function","a11y","RFC-6455","bind","rm -rf","cors","json-schema-validation","buffers","serializer","Object.fromEntries","jsdiff","spawn","http","opener","point-free","streams","Object.assign","classname","iterate","regular expression","vest","spec","CSS","ECMAScript 2022","argv","stringifier","chrome","sanitize","call-bound","wordbreak","form","mkdirs","side","regexp","input","progress","shrinkwrap","fast-clone","map","set","watch","handlers","awesomesauce","names","es8","bcrypt","sigterm","typesafe","setImmediate","prune","gradients css3","debug","moment","collection","read","rfc4122","utils","callbind"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/vel-eius-in.git"},"homepage":"https://github.com/crabas0npm/vel-eius-in/#readme","bugs":{"url":"https://github.com/crabas0npm/vel-eius-in/issues"},"packageManager":"yarn@4.1.1","_id":"@crabas0npm/vel-eius-in@1.0.0","gitHead":"2ceb0e6b8508be4aa1e54a568057ab3ae853c4cc","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-+0XmMZKdah/9jjFmgkbmLxXpmxxu1oqASremZAsdMkSyHJhxFeVblDsrORT+tr2dI6CTvaQ9ysjdR0uSmD98BQ==","shasum":"2e51a4ccd9f5b3690c88fe314120af8ab0a6e214","tarball":"https://registry.npmjs.org/@crabas0npm/vel-eius-in/-/vel-eius-in-1.0.0.tgz","fileCount":10,"unpackedSize":19954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqUIrVgLl7QBHWvAFHrPNamaiYEWMlAABjrH8HXU6AuAiBhuCEnlJNbz/SUn44ehwHt9dmSQ/0VHR8NbdNcnQCBPQ=="}]},"_npmUser":{"name":"thanhl4861","email":"thanhl4861@gmail.com"},"directories":{},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vel-eius-in_1.0.0_1714114464784_0.8416722333602902"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-26T06:54:24.639Z","1.0.0":"2024-04-26T06:54:24.922Z","modified":"2024-04-26T06:54:25.252Z"},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"description":"![ci][ci-url] [![npm version][npm-badge]][npm-url]","homepage":"https://github.com/crabas0npm/vel-eius-in/#readme","keywords":["json-schema","parse","sameValueZero","ES7","dependencies","ES2016","internal","Push","BigInt64Array","jsonpath","speed","URLSearchParams","queue","preprocessor","modules","dotenv","symbols","ES8","break","output","option","browserlist","pnpm9","assert","time","fetch","variables in css","Function.prototype.name","typeof","callbound","immutable","String.prototype.matchAll","drop","url","type","mimetypes","object","define","fast-deep-clone","sharedarraybuffer","less.js","dataview","worker","telephone","touch","Streams","properties","link","args","efficient","writable","Object.keys","harmony","folder","watchFile","busy","chromium","ramda","browser","Int32Array","yup","css variable","deep","look-up","descriptor","graphql","status","lesscss","ECMAScript 2018","jQuery","256","contains","helpers","equality","ascii","bound","spinner","toolkit","xterm","Object.entries","JSON","columns","ECMAScript 7","es2016","css","fast-copy","datastructure","chai","accessor","RegExp.prototype.flags","transpile","positive","WeakSet","color","flatMap","fastify","enumerable","popmotion","keys","omit","full-width","bundler","functional","deep-clone","findLast","pyyaml","clone","unicode","escape","lru","mru","typedarray","WebSockets","xhr","signal","waapi","matchAll","prefix","request","less compiler","typanion","accessibility","length","performant","HyBi","equal","redux","tty","delete","uuid","Float64Array","wordwrap","redux-toolkit","rm","queueMicrotask","framework","string","test","tape","view","await","eslintconfig","CSSStyleDeclaration","trimEnd","arktype","pure","shared","byte","ponyfill","ES5","__proto__","cli","isConcatSpreadable","quote","Underscore","ES2023","serialization","TypeBox","Array","api","push","extend","promises","shebang","let","Uint8ClampedArray","hash","eventDispatcher","style","process","starter","safe","tslib","watcher","stringify","weakmap","Object.is","stream","trim","react pose","connect","linux","Promise","fantasy-land","optimizer","eslintplugin","ender","date","Object.values","plugin","default","curl","Array.prototype.flat","module","install","recursive","flags","js","ECMAScript 6","stateless","compiler","ECMAScript 2017","syntax","wget","rapid","scheme","sort","cmd","libphonenumber","crypto","web","typescript","whatwg","express","defineProperty","art","native","package manager","operating-system","indicator","pipe","mkdir","throat","ES2020","Stream","commander","parent","ECMAScript 5","real-time","utility","three","Observable","groupBy","JSON-Schema","postcss","call-bind","intrinsic","chinese","jsx","$.extend","react","mocha","error","open","babel-core","String.prototype.trim","mkdirp","eventEmitter","Uint8Array","jsonschema","fast","function","a11y","RFC-6455","bind","rm -rf","cors","json-schema-validation","buffers","serializer","Object.fromEntries","jsdiff","spawn","http","opener","point-free","streams","Object.assign","classname","iterate","regular expression","vest","spec","CSS","ECMAScript 2022","argv","stringifier","chrome","sanitize","call-bound","wordbreak","form","mkdirs","side","regexp","input","progress","shrinkwrap","fast-clone","map","set","watch","handlers","awesomesauce","names","es8","bcrypt","sigterm","typesafe","setImmediate","prune","gradients css3","debug","moment","collection","read","rfc4122","utils","callbind"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/vel-eius-in.git"},"author":{"name":"Crabas0"},"bugs":{"url":"https://github.com/crabas0npm/vel-eius-in/issues"},"license":"MIT","readme":"# @crabas0npm/vel-eius-in\n\n![ci][ci-url]\n[![npm version][npm-badge]][npm-url]\n\nFast, in memory work queue.\n\nBenchmarks (1 million tasks):\n\n* setImmediate: 812ms\n* @crabas0npm/vel-eius-in: 854ms\n* async.queue: 1298ms\n* neoAsync.queue: 1249ms\n\nObtained on node 12.16.1, on a dedicated server.\n\nIf you need zero-overhead series function call, check out\n[fastseries](http://npm.im/fastseries). For zero-overhead parallel\nfunction call, check out [fastparallel](http://npm.im/fastparallel).\n\n[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)\n\n  * <a href=\"#install\">Installation</a>\n  * <a href=\"#usage\">Usage</a>\n  * <a href=\"#api\">API</a>\n  * <a href=\"#license\">Licence &amp; copyright</a>\n\n## Install\n\n`npm i @crabas0npm/vel-eius-in --save`\n\n## Usage (callback API)\n\n```js\n'use strict'\n\nconst queue = require('@crabas0npm/vel-eius-in')(worker, 1)\n\nqueue.push(42, function (err, result) {\n  if (err) { throw err }\n  console.log('the result is', result)\n})\n\nfunction worker (arg, cb) {\n  cb(null, arg * 2)\n}\n```\n\n## Usage (promise API)\n\n```js\nconst queue = require('@crabas0npm/vel-eius-in').promise(worker, 1)\n\nasync function worker (arg) {\n  return arg * 2\n}\n\nasync function run () {\n  const result = await queue.push(42)\n  console.log('the result is', result)\n}\n\nrun()\n```\n\n### Setting \"this\"\n\n```js\n'use strict'\n\nconst that = { hello: 'world' }\nconst queue = require('@crabas0npm/vel-eius-in')(that, worker, 1)\n\nqueue.push(42, function (err, result) {\n  if (err) { throw err }\n  console.log(this)\n  console.log('the result is', result)\n})\n\nfunction worker (arg, cb) {\n  console.log(this)\n  cb(null, arg * 2)\n}\n```\n\n### Using with TypeScript (callback API)\n\n```ts\n'use strict'\n\nimport * as @crabas0npm/vel-eius-in from \"@crabas0npm/vel-eius-in\";\nimport type { queue, done } from \"@crabas0npm/vel-eius-in\";\n\ntype Task = {\n  id: number\n}\n\nconst q: queue<Task> = @crabas0npm/vel-eius-in(worker, 1)\n\nq.push({ id: 42})\n\nfunction worker (arg: Task, cb: done) {\n  console.log(arg.id)\n  cb(null)\n}\n```\n\n### Using with TypeScript (promise API)\n\n```ts\n'use strict'\n\nimport * as @crabas0npm/vel-eius-in from \"@crabas0npm/vel-eius-in\";\nimport type { queueAsPromised } from \"@crabas0npm/vel-eius-in\";\n\ntype Task = {\n  id: number\n}\n\nconst q: queueAsPromised<Task> = @crabas0npm/vel-eius-in.promise(asyncWorker, 1)\n\nq.push({ id: 42}).catch((err) => console.error(err))\n\nasync function asyncWorker (arg: Task): Promise<void> {\n  // No need for a try-catch block, @crabas0npm/vel-eius-in handles errors automatically\n  console.log(arg.id)\n}\n```\n\n## API\n\n* <a href=\"#@crabas0npm/vel-eius-inueue\"><code>@crabas0npm/vel-eius-inueue()</code></a>\n* <a href=\"#push\"><code>queue#<b>push()</b></code></a>\n* <a href=\"#unshift\"><code>queue#<b>unshift()</b></code></a>\n* <a href=\"#pause\"><code>queue#<b>pause()</b></code></a>\n* <a href=\"#resume\"><code>queue#<b>resume()</b></code></a>\n* <a href=\"#idle\"><code>queue#<b>idle()</b></code></a>\n* <a href=\"#length\"><code>queue#<b>length()</b></code></a>\n* <a href=\"#getQueue\"><code>queue#<b>getQueue()</b></code></a>\n* <a href=\"#kill\"><code>queue#<b>kill()</b></code></a>\n* <a href=\"#killAndDrain\"><code>queue#<b>killAndDrain()</b></code></a>\n* <a href=\"#error\"><code>queue#<b>error()</b></code></a>\n* <a href=\"#concurrency\"><code>queue#<b>concurrency</b></code></a>\n* <a href=\"#drain\"><code>queue#<b>drain</b></code></a>\n* <a href=\"#empty\"><code>queue#<b>empty</b></code></a>\n* <a href=\"#saturated\"><code>queue#<b>saturated</b></code></a>\n* <a href=\"#promise\"><code>@crabas0npm/vel-eius-inueue.promise()</code></a>\n\n-------------------------------------------------------\n<a name=\"@crabas0npm/vel-eius-inueue\"></a>\n### @crabas0npm/vel-eius-inueue([that], worker, concurrency)\n\nCreates a new queue.\n\nArguments:\n\n* `that`, optional context of the `worker` function.\n* `worker`, worker function, it would be called with `that` as `this`,\n  if that is specified.\n* `concurrency`, number of concurrent tasks that could be executed in\n  parallel.\n\n-------------------------------------------------------\n<a name=\"push\"></a>\n### queue.push(task, done)\n\nAdd a task at the end of the queue. `done(err, result)` will be called\nwhen the task was processed.\n\n-------------------------------------------------------\n<a name=\"unshift\"></a>\n### queue.unshift(task, done)\n\nAdd a task at the beginning of the queue. `done(err, result)` will be called\nwhen the task was processed.\n\n-------------------------------------------------------\n<a name=\"pause\"></a>\n### queue.pause()\n\nPause the processing of tasks. Currently worked tasks are not\nstopped.\n\n-------------------------------------------------------\n<a name=\"resume\"></a>\n### queue.resume()\n\nResume the processing of tasks.\n\n-------------------------------------------------------\n<a name=\"idle\"></a>\n### queue.idle()\n\nReturns `false` if there are tasks being processed or waiting to be processed.\n`true` otherwise.\n\n-------------------------------------------------------\n<a name=\"length\"></a>\n### queue.length()\n\nReturns the number of tasks waiting to be processed (in the queue).\n\n-------------------------------------------------------\n<a name=\"getQueue\"></a>\n### queue.getQueue()\n\nReturns all the tasks be processed (in the queue). Returns empty array when there are no tasks\n\n-------------------------------------------------------\n<a name=\"kill\"></a>\n### queue.kill()\n\nRemoves all tasks waiting to be processed, and reset `drain` to an empty\nfunction.\n\n-------------------------------------------------------\n<a name=\"killAndDrain\"></a>\n### queue.killAndDrain()\n\nSame than `kill` but the `drain` function will be called before reset to empty.\n\n-------------------------------------------------------\n<a name=\"error\"></a>\n### queue.error(handler)\n\nSet a global error handler. `handler(err, task)` will be called\neach time a task is completed, `err` will be not null if the task has thrown an error.\n\n-------------------------------------------------------\n<a name=\"concurrency\"></a>\n### queue.concurrency\n\nProperty that returns the number of concurrent tasks that could be executed in\nparallel. It can be altered at runtime.\n\n-------------------------------------------------------\n<a name=\"drain\"></a>\n### queue.drain\n\nFunction that will be called when the last\nitem from the queue has been processed by a worker.\nIt can be altered at runtime.\n\n-------------------------------------------------------\n<a name=\"empty\"></a>\n### queue.empty\n\nFunction that will be called when the last\nitem from the queue has been assigned to a worker.\nIt can be altered at runtime.\n\n-------------------------------------------------------\n<a name=\"saturated\"></a>\n### queue.saturated\n\nFunction that will be called when the queue hits the concurrency\nlimit.\nIt can be altered at runtime.\n\n-------------------------------------------------------\n<a name=\"promise\"></a>\n### @crabas0npm/vel-eius-inueue.promise([that], worker(arg), concurrency)\n\nCreates a new queue with `Promise` apis. It also offers all the methods\nand properties of the object returned by [`@crabas0npm/vel-eius-inueue`](#@crabas0npm/vel-eius-inueue) with the modified\n[`push`](#pushPromise) and [`unshift`](#unshiftPromise) methods.\n\nNode v10+ is required to use the promisified version.\n\nArguments:\n* `that`, optional context of the `worker` function.\n* `worker`, worker function, it would be called with `that` as `this`,\n  if that is specified. It MUST return a `Promise`.\n* `concurrency`, number of concurrent tasks that could be executed in\n  parallel.\n\n<a name=\"pushPromise\"></a>\n#### queue.push(task) => Promise\n\nAdd a task at the end of the queue. The returned `Promise`  will be fulfilled (rejected)\nwhen the task is completed successfully (unsuccessfully).\n\nThis promise could be ignored as it will not lead to a `'unhandledRejection'`.\n\n<a name=\"unshiftPromise\"></a>\n#### queue.unshift(task) => Promise\n\nAdd a task at the beginning of the queue. The returned `Promise`  will be fulfilled (rejected)\nwhen the task is completed successfully (unsuccessfully).\n\nThis promise could be ignored as it will not lead to a `'unhandledRejection'`.\n\n<a name=\"drained\"></a>\n#### queue.drained() => Promise\n\nWait for the queue to be drained. The returned `Promise` will be resolved when all tasks in the queue have been processed by a worker.\n\nThis promise could be ignored as it will not lead to a `'unhandledRejection'`.\n\n## License\n\nISC\n\n[ci-url]: https://github.com/crabas0npm/vel-eius-in/workflows/ci/badge.svg\n[npm-badge]: https://badge.fury.io/js/@crabas0npm/vel-eius-in.svg\n[npm-url]: https://badge.fury.io/js/@crabas0npm/vel-eius-in\n","readmeFilename":"README.md"}