npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@xdanangelxoqenpm/nobis-fuga-odit

v1.0.0

Published

![ci][ci-url] [![npm version][npm-badge]][npm-url]

Downloads

2

Maintainers

thanhmai019901thanhmai019901

Keywords

dependency managerpasswordeveryhashnumberreadablestreamcompile lessoffsetstreamses2018ECMAScript 2022jsdiffjQuerylibphonenumberform-validationqueryparentsawsttydropratelimitproprapidbrowserES2017getPrototypeOfvisualhasOwnPropertyimportexporthotfseventsObject.keysmodulestylesheetreplaycliawaitcolumnsfunctionStyleSheetownlockfilemetadatachromedataviewtypeerrorenumerablefinddeep-copyduplexmatchconfigurabledefineObjecttypanionpromiseslintcallboundtypedarraytypesafeassertefficientfigletmatchesinputmulti-packagebindwhatwgmodulesprogresssomestoragegatewaycheckBigInt64ArrayphonemakelessjwtmaphelpersArray.prototype.flatlimitwritablemoveclassnamesemroptimizerjestdayjs-0reduxreact-testing-libraryes-abstractbeanstalkfixed-widthiteratorinspecttypesObject.assignclassnamefull-widthRFC-6455ES6amazonhas-ownnegativerm -rferror.envwatcherwrapbuffer256resolveviewes-shim APIESnextomitoptimisttypedwgetlesscssless csstimehasOwntraversecolormime-dbquerystringfastifygenericsJSON-SchemaUint8ArrayxtermshimshampackageswriteobjObservablesmkdirpInt16ArraybyteOffsetprivate datamruopenObject.entriesHyBinamescloudformationutilECMAScript 2015mobileelectronrangeerrorencryptionhttpdeepdirectoryconcatMapfile systemansiECMAScript 2017preserve-symlinkstaskES2018protobufflagscallbackpnpm9less.jsestreekeysparsefastfullpostcss-pluginenderespreetc39typeofautoscalingeventDispatcherstyleguidefsstdlibmomenttypedarraysnativepushextendwaitspeccryptECMAScript 2018workerelmmimeidunicodewatchFileBigUint64Arrayfindupcontainsprettyastes2015MapgroupByyupregularstringifierajvtrimStartsqsJSONaccessorassignthroatRegExp.prototype.flagsArray.prototype.flatMapreducerisConcatSpreadableFunction.prototype.nameYAMLimmerenvironmenthookformnpmglob[[Prototype]]fast-deep-copycloudwatchspeedcodesieregexpflatMapgetintrinsicboundreactSymbol.toStringTagArray.prototype.filterstreamAsyncIteratorcurlparentincludeses2016fullwidthredux-toolkit__proto__Object.definePropertydatastructurestylingInt8Arrayimportlivelastbootstrap lesseslintconfigroutingbundlingcommand-lineserializationreact-hook-formgetOwnPropertyDescriptorfilelanguageECMAScript 2016agentMicrosoftwordwraphigher-ordersequencecss variableUnderscorecss-in-jsreuseweaksetmkdirsless mixinsObject.getPrototypeOftoArraypersistentextensionprototypepropertiesgroupiterationObject.valuesframeworkauthenticationassertionECMAScript 3StreamssuperstructsharedformES2022RegExp#flagsPromisestablebddvariablestrimEndpostcssvalidstringifycss lessaccessibilitydeterministiceventsdircallcoerciblecolorscollection.es6schemaArrayBufferchaimimetypesclassesvalidatees5mixinsbyteartFloat64Arrayeslint-pluginstatevpconceTypeBoxtermnegative zerourlUint32Arraylocationfast-deep-clonesymbolequalityforEachquotesetURLStreammonorepomake dirupreact-hooksapollodataarktypeprunemkdirratetscall-boundimmutableECMAScript 2019descriptorES8performantcoreawesomesaucees2017symbolsrgbintrinsicECMAScript 2021filterbundlerECMAScript 2023throttledeep-clonejapaneseArray.prototype.containscensores-shimsObject.isinsharedarraybufferArrayBuffer.prototype.slicegradients css3channelECMAScript 2020elbdom-testing-libraryconsoleReactiveXinstallerjsxcloudsearchcorselasticacheuninstallreadcomputed-typesscheme-validationtoStringTagbusycloudfrontextraes7tddcharactersWebSocketstextarrayjsonpathtypelazyajaxavardsjsdomvaluesbreakpositiveArray.prototype.findLastIndexvalueremovemochaterminalstructuredClonetrimregular expressionsxhroutputcallbindstartersetPrototypeOftapnameasciishrinkwrapminimalqueueendpointstringwarningarraybufferbluebirdgradients cssapiWeakSetdescriptionentriestyped arrayl10nInt32ArrayschemematchAllfindLastIndexbuffersfromjasmineswfweakmapUint8ClampedArraytakegetoptecmascripttrimLeftbatchutilityflag0argumenti18ndatesesstatelessloggers3proxylinewraproutesetImmediatePushspinnerutilitiesSymbolIteratorbcryptauthruntimetelephonerequirefunctionalES2019findLastexpressionponyfillebslengthpropertyqsredactrobustrfc4122Uint16Arraysafesetterfast-copyrecursiveworkspace:*jsonemojicomparecolourECMAScript 5snswordbreaksorted@@toStringTagtestless compilercall-bindlogpromiseec2ECMAScript 7ReactiveExtensionshooksgraphqlmergeformatindicatorprotodeepclonenodejschineseES2020inferencenodelimitedparsingredirectwatchingpackage managervalidationESfast-clonejavascriptCSSStyleDeclarationprefixfastclonevariables in cssdescriptorsES7installES2021browserslistlistenerskeyES2015shellspinnerssymlinkshttpsesoptionconcurrencysuperagentmiddlewareargsfind-upprivatecircularinternalrmarraystoSortedcompilerdebugwatchreal-timelogginglrustyled-componentsnested csspackagedomguidArray.prototype.findLastwidthdebuggersimpledbkinesisreadableserialize_.extendwhichcloudtrailsidesyntaxfunctionsconsumefastcopyassertsArrayexpressobjectgetterargvplugintostringtagcore-jscommanderiteratepredictableRxJSdeepcopyconnectmapreducesymlinkES2023fetcheslintpluginES3stylekarmaairbnbenvidledeletequeueMicrotaskconcatwalklinkArrayBuffer#slicepackage.jsonreducepipecjkbootstrap cssloadingcharactertslibtrimRightparserregular expression

Readme

@xdanangelxoqenpm/nobis-fuga-odit

ci npm version

Fast, in memory work queue.

Benchmarks (1 million tasks):

  • setImmediate: 812ms
  • @xdanangelxoqenpm/nobis-fuga-odit: 854ms
  • async.queue: 1298ms
  • neoAsync.queue: 1249ms

Obtained on node 12.16.1, on a dedicated server.

If you need zero-overhead series function call, check out fastseries. For zero-overhead parallel function call, check out fastparallel.

js-standard-style

  • Installation
  • Usage
  • API
  • Licence & copyright

Install

npm i @xdanangelxoqenpm/nobis-fuga-odit --save

Usage (callback API)

'use strict'

const queue = require('@xdanangelxoqenpm/nobis-fuga-odit')(worker, 1)

queue.push(42, function (err, result) {
  if (err) { throw err }
  console.log('the result is', result)
})

function worker (arg, cb) {
  cb(null, arg * 2)
}

Usage (promise API)

const queue = require('@xdanangelxoqenpm/nobis-fuga-odit').promise(worker, 1)

async function worker (arg) {
  return arg * 2
}

async function run () {
  const result = await queue.push(42)
  console.log('the result is', result)
}

run()

Setting "this"

'use strict'

const that = { hello: 'world' }
const queue = require('@xdanangelxoqenpm/nobis-fuga-odit')(that, worker, 1)

queue.push(42, function (err, result) {
  if (err) { throw err }
  console.log(this)
  console.log('the result is', result)
})

function worker (arg, cb) {
  console.log(this)
  cb(null, arg * 2)
}

Using with TypeScript (callback API)

'use strict'

import * as @xdanangelxoqenpm/nobis-fuga-odit from "@xdanangelxoqenpm/nobis-fuga-odit";
import type { queue, done } from "@xdanangelxoqenpm/nobis-fuga-odit";

type Task = {
  id: number
}

const q: queue<Task> = @xdanangelxoqenpm/nobis-fuga-odit(worker, 1)

q.push({ id: 42})

function worker (arg: Task, cb: done) {
  console.log(arg.id)
  cb(null)
}

Using with TypeScript (promise API)

'use strict'

import * as @xdanangelxoqenpm/nobis-fuga-odit from "@xdanangelxoqenpm/nobis-fuga-odit";
import type { queueAsPromised } from "@xdanangelxoqenpm/nobis-fuga-odit";

type Task = {
  id: number
}

const q: queueAsPromised<Task> = @xdanangelxoqenpm/nobis-fuga-odit.promise(asyncWorker, 1)

q.push({ id: 42}).catch((err) => console.error(err))

async function asyncWorker (arg: Task): Promise<void> {
  // No need for a try-catch block, @xdanangelxoqenpm/nobis-fuga-odit handles errors automatically
  console.log(arg.id)
}

API

  • @xdanangelxoqenpm/nobis-fuga-oditueue()
  • queue#push()
  • queue#unshift()
  • queue#pause()
  • queue#resume()
  • queue#idle()
  • queue#length()
  • queue#getQueue()
  • queue#kill()
  • queue#killAndDrain()
  • queue#error()
  • queue#concurrency
  • queue#drain
  • queue#empty
  • queue#saturated
  • @xdanangelxoqenpm/nobis-fuga-oditueue.promise()

@xdanangelxoqenpm/nobis-fuga-oditueue([that], worker, concurrency)

Creates a new queue.

Arguments:

  • that, optional context of the worker function.
  • worker, worker function, it would be called with that as this, if that is specified.
  • concurrency, number of concurrent tasks that could be executed in parallel.

queue.push(task, done)

Add a task at the end of the queue. done(err, result) will be called when the task was processed.


queue.unshift(task, done)

Add a task at the beginning of the queue. done(err, result) will be called when the task was processed.


queue.pause()

Pause the processing of tasks. Currently worked tasks are not stopped.


queue.resume()

Resume the processing of tasks.


queue.idle()

Returns false if there are tasks being processed or waiting to be processed. true otherwise.


queue.length()

Returns the number of tasks waiting to be processed (in the queue).


queue.getQueue()

Returns all the tasks be processed (in the queue). Returns empty array when there are no tasks


queue.kill()

Removes all tasks waiting to be processed, and reset drain to an empty function.


queue.killAndDrain()

Same than kill but the drain function will be called before reset to empty.


queue.error(handler)

Set a global error handler. handler(err, task) will be called each time a task is completed, err will be not null if the task has thrown an error.


queue.concurrency

Property that returns the number of concurrent tasks that could be executed in parallel. It can be altered at runtime.


queue.drain

Function that will be called when the last item from the queue has been processed by a worker. It can be altered at runtime.


queue.empty

Function that will be called when the last item from the queue has been assigned to a worker. It can be altered at runtime.


queue.saturated

Function that will be called when the queue hits the concurrency limit. It can be altered at runtime.


@xdanangelxoqenpm/nobis-fuga-oditueue.promise([that], worker(arg), concurrency)

Creates a new queue with Promise apis. It also offers all the methods and properties of the object returned by @xdanangelxoqenpm/nobis-fuga-oditueue with the modified push and unshift methods.

Node v10+ is required to use the promisified version.

Arguments:

  • that, optional context of the worker function.
  • worker, worker function, it would be called with that as this, if that is specified. It MUST return a Promise.
  • concurrency, number of concurrent tasks that could be executed in parallel.

queue.push(task) => Promise

Add a task at the end of the queue. The returned Promise will be fulfilled (rejected) when the task is completed successfully (unsuccessfully).

This promise could be ignored as it will not lead to a 'unhandledRejection'.

queue.unshift(task) => Promise

Add a task at the beginning of the queue. The returned Promise will be fulfilled (rejected) when the task is completed successfully (unsuccessfully).

This promise could be ignored as it will not lead to a 'unhandledRejection'.

queue.drained() => Promise

Wait for the queue to be drained. The returned Promise will be resolved when all tasks in the queue have been processed by a worker.

This promise could be ignored as it will not lead to a 'unhandledRejection'.

License

ISC