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

@rabiepenpm/corrupti-illo-voluptatum

v1.0.0

Published

<!-- omit in toc --> # @rabiepenpm/corrupti-illo-voluptatum

Downloads

10

Maintainers

cungkhai1992cungkhai1992

Keywords

telephonerequestObject.assignnameemitponyfill6to5weaksetreadformsassertsastfastclonecss lessbrowserArray.prototype.findLastIndexYAMLECMAScript 2023superagentinternaltextcss variablecore-jses2018exeECMAScript 2015mkdirpdebugURLxdgarraysspinnerBigUint64ArrayvaluexsshasInt16ArraylistenersexecgetgdprequalES6es5prefixwatchFilesymlinksawaitArrayBuffer#slicecomputed-typesObject.isserializeerror-handlingperformancelastcallboundlimitslotdefineappairbnbless mixinsObject.fromEntriesparsesetImmediatetypesafenodelruindicatorES8xdg-openargstypedarrayvalidatorconcatequalityRxJSinterruptsphone.envflagSymbol.toStringTaghigher-ordercharacterwalkingcompareclientgesturesuser-streamsES2019moduleinferenceschemeinstalltapjsRegExp#flagswebsitesanitizeECMAScript 2016termbootstrap csseventEmitterlookECMAScript 2020namesinternal slotless compilerlimiteddotenvlibphonenumberjson-schema3dexpressionfigletbyteOffsetclass-validatorbootstrap lesspropertyprogressoptionunicodestringfullprotoreducerschemadatastructuretrimkeysduplexwordbreakfile systemSetECMAScript 7make dirPromiselesspackage.jsoniewatchingrapidartzodlintletObject.valuesreact poseAsyncIteratorscheme-validationurlbyteLengthprotobuftoolkitFloat64Arrayes2017sanitizationframeworkoffsetdateassigncurlassertString.prototype.trimrecursiveCSSStyleDeclarationpluginpreserve-symlinksstylesheetes-shim APItoolspolyfilldatatimecolumnssetPrototypeOfutil.inspectwatcheslintpluginconsumeIteratorinspectsorthelpersconsolewaapicliworkerquerystringcall@@toStringTagnegativewatchertestercollectionrgbsortedvaluesbindcallbackhardlinksmimeInt8Arrayjavascriptauthpnpm9WebSocketsjsonschemaconcurrencymiddlewarepropertiesArray.prototype.flattenWebSocketfromhooksprivate datashamrandomreal-timestartclassnamesdropansiratebabel-coretypeofdescriptorform-validationwarningcontainsutilswindowsStreamscall-bindintrinsicxhrECMAScript 2021tddflattenstreams2getterregexpcopycall-boundeditordayjsdeep-copyESnextparserObject.keysmatchAllforEachprocesshasOwncompile lessajaxthreeeslint-pluginopenerES5getOwnPropertyDescriptorserializationTypeScriptparentsdependencieskarmacensorArrayBufferbannerreactclassesyupbluebirdfunctionalpatchnodejsInt32Arraytyped arrayJSONBigInt64ArraycreateclonenumbercommanderminimalspecparentvariablesenumerabledragttyES2017callbindrmdirString.prototype.matchAllconfigurablestyleeslintconfigdependency managerisConcatSpreadableeventDispatcherreact-testing-librarypicomatchlaunchcssUnderscorei18nbreakuuidloadingArraycharactersStyleSheethandlersutilityutilECMAScript 2022Array.prototype.containsstylingxtermhashfindLastIndexextensionfullwidtharraybufferchaiObservablewalkemojisignalelectronstreambundlingutilitiesjsonpathcmdjasminecorevariables in csscolumnobjectjwtstructuredClonefixed-width[[Prototype]]nativekoreanthrottletyped_.extendconstgradients css3mkdirsdeepclonefastcopyregular expressionsmimetypesenderrm -rfencryptionupspringramdaspeedcommandsomermfast-copyproptranspilehookformreuseReactiveXwaitbufferoperating-systemUint32ArrayecmascriptzeroRxposeextraES3webloggergenericschecktc39symbolsymlinktraverseESReflect.getPrototypeOfsetterenvfind-upcommand-linejsxdataviewnegative zerofpes-shimsnested cssjson-schema-validatormime-dbArray.prototype.findLastMicrosoftless.jseslintstyleguidecryptmacosyamlRegExp.prototype.flagsoptimizertoStringTagpromisesstablereact-hook-formstringifyestreeES2016logwritereact animationrm -frfast-deep-cloneArray.prototype.includessignalsshimimmerchromeArray.prototype.filterObjectsearchfull-widthsettingstesturlsrfc4122descriptorswhatwgtrimLefteast-asian-widthcjkconfigtrimStartqsthroatstringifierformatmetadatavalidatelengthflagsmulti-packageredux-toolkitwidthWeakMaprequirebddES2015dataViewawesomesauceRFC-6455Uint8ArrayflatMapfindmodulesqueuemomentTypedArrayCSSterminalstreamssyntaxinputes7styled-componentspipepopmotionopenescapetypescircularlazygetPrototypeOfes8linkreduxes6ECMAScript 3Object.definePropertyES2022jsdifftypescriptredacttakecompilergetoptstatelessirqauthenticationPushmochachanneloptimisterrorreadabledeeptypeerrorpoint-freefolderdeleteratelimitserializerbcryptdebuggerfast-cloneArray.prototype.flatavafantasy-land0__proto__fseventsgrouplesscssapolloentriesfastifyES2020package managerquoteregularchildsiginttaska11yconnectio-tsruntimelanguageshebangargumentsmakefunctionsgraphqlarktyperesolvefsargparsenpmjoibabelFloat32ArrayimmutablesequencemoveimportURLSearchParamsReactiveExtensionsrangeerrorFunction.prototype.namegroupBycorsreadablestreamjestfetchqueueMicrotaskqueryguidES2018trimEnddescriptionefficienttouchassertionstatusanimationiteratesigtermloggingbatchsetjapaneseprunetostringtagObject.getPrototypeOffasttranspilercolourECMAScript 2018chinesedefaultlinewrapopenspromise

Readme

@rabiepenpm/corrupti-illo-voluptatum

ts Npm package yearly downloads Quality Gate Status Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Reliability Rating Security Rating

@rabiepenpm/corrupti-illo-voluptatum is a versatile utility library that simplifies sorting arrays of objects by one or multiple object keys. It allows you to specify the sort direction for each key, providing fine-grained control over the sorting process.

Table of Contents

Installation

You can install @rabiepenpm/corrupti-illo-voluptatum via yarn or npm:

Using yarn

yarn add @rabiepenpm/corrupti-illo-voluptatum

Using npm

npm install @rabiepenpm/corrupti-illo-voluptatum

Usage

Here's how you can use @rabiepenpm/corrupti-illo-voluptatum:

import { compareBy } from '@rabiepenpm/corrupti-illo-voluptatum';
const arr = [{
    name: {
      first: 'John',
      last: 'Doe'
    },
    birthday: new Date(1998, 10, 20),
    profileConfirmed: true,
    age: 24
  },
  /* ... */
];

// sort by single key
arr.sort(compareBy({
  key: 'age',
  dir: 'desc', // 'asc' | 'desc', default: 'asc'
}));

// sort by nested key
arr.sort(compareBy({
  key: (obj) => obj.name.first,
}));

// sort by multiple keys
arr.sort(compareBy([
  { key: 'profileCreated' },
  { key: (obj) => obj.name.last, dir: 'desc' }
]));

Examples

Sort by a Single Object Key

Ascending Order

const arr = [{ x: 'b' }, { x: 'a' }, { x: 'c' }];
arr.sort(compareBy({ key: 'x' }));
console.log(arr); // [{ x: 'a' }, { x: 'b' }, { x: 'c' }]

Descending Order

const arr = [{ x: 'b' }, { x: 'a' }, { x: 'c' }];
arr.sort(compareBy({ key: 'x', dir: 'desc' }));
console.log(arr); // [{ x: 'c' }, { x: 'b' }, { x: 'a' }]

Sort by a Nested Object Key

Ascending Order

const arr = [{ x: { y: 'b' } }, { x: { y: 'a' } }];
arr.sort(compareBy({ key: (el) => el.x.y }));
console.log(arr); // [{ x: { y: 'a' } }, { x: { y: 'b' } }]

Descending Order

const arr = [{ x: { y: 'a' } }, { x: { y: 'b' } }];
arr.sort(compareBy({ key: (el) => el.x.y, dir: 'desc' }));
console.log(arr); // [{ x: { y: 'b' } }, { x: { y: 'a' } }]

Sort by Multiple Keys

const arr = [
	{ x: 'c', y: 'c' },
	{ x: 'b', y: 'a' },
	{ x: 'b', y: 'b' },
];
arr.sort(compareBy([
  { key: 'x' }, // sort by 'x' in ascending order
  { key: 'y', dir: 'desc' } // sort by 'y' in descending order
]));

console.log(arr);
/**
 * [
 *   { x: 'b', y: 'b' },
 *   { x: 'b', y: 'a' },
 *   { x: 'c', y: 'c' },
 * ]
 */

Project Badges

  • Npm Package Version: The current version of the npm package.
  • Quality Gate Status: Measures the quality of the code using SonarQube.
  • Coverage: Shows the code coverage of your project.
  • Duplicated Lines (%): Indicates the percentage of duplicated lines in your code.
  • Lines of Code: Displays the total lines of code in your project.
  • Maintainability Rating: Rates the maintainability of your code.
  • Reliability Rating: Rates the reliability of your code.
  • Security Rating: Rates the security of your code.

License

This project is licensed under the MIT License.

Author

Tobias Wälde

Acknowledgments

If your project is inspired by or uses other open-source projects, acknowledge them here. It's a good practice and shows respect to the open-source community.

Feel free to customize the author's name, website, license, contribution guidelines, and code of conduct links according to your project's specifics. This improved README provides more context and is well-structured to help users understand, install, and use your library effectively.