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

@emiplegiaqmnpm/quo-distinctio-quas

v1.0.0

Published

```text @emiplegiaqmnpm/quo-distinctio-quas(<value>) => <type_name> ``` Returns type of value or object instance. This is an alternative to `typeof` that actually allows to avoid confusion between the type name and the class name. Returns the name of Clas

Downloads

5

Maintainers

hn413381hn413381

Keywords

typed arrayieajaxbindprototypeurlarktypeoptimisttypedarraymulti-packagenamesfast-copyjsonmatchAlldayjsdescriptorcss variablebyteobjectcoercibleES3keynativeargparsematchargvweakmapdeepcloneawesomesauceECMAScript 2020internaldebuggerrm -rfpasswordconsolefseventsarraybufferlibphonenumberwidthwritewalkingwordbreaksomebatchconnectECMAScript 2021javascriptflagECMAScript 2023Object.fromEntriesObservablesetPrototypeOfpyyamlstreamsebsclientECMAScript 2015japanesepipebrowserlistfastclonehookformnodeflagsES2018cloudtrailquerystructuredCloneinputindicatorpreprocessorownES8loadbalancingwatchingES2021rmdirastES20170speedsortedmkdirslotdescriptioncss nestingprogressfullwidthInt16ArrayapolloformES2016IteratorponyfillInt8ArrayvariablesURLSearchParamsBigUint64Arrayenvironmentfull-widthlocationclassnameperformantStyleSheetcloudformationeast-asian-widthframeworkwritablecolorsArray.prototype.findLastIndexroute53predictablereact-hook-formECMAScript 2018finduploggerthroatinbootstrap lessreplaytestingemojiutilityec2karmabootstrap cssserializerfixed-widthhooksvestmapserializationsafesetImmediatetrimRightsyntaxerroruninstallmrudeleteoptimizerpnpm9less mixinsxtermArray.prototype.flatPushes2016stylesArray.prototype.flattenroutingregexphasOwnPropertyswfreact-hooksbrowserArray.prototype.includesiterationdrophigher-orderlistenerstddresolvewatchinspectpackage managertoArrayloggingrecursive$.extendisconcatrm -frstylingcensorutilitiesjsdiffwatcheramazonrequestnodejsFloat64ArrayUnderscoreECMAScript 6packagesObject.entriesJSON-SchemaECMAScript 2019tc39parentsnested cssrfc4122waityamltssearchstreamcommandereslint-pluginhardlinkslinkarraysairbnbcalltypeerrordatezodlengthasyncgetfast-deep-copytrimMicrosoftbyteOffsetjestsqsinternal slotquerystringes8bannerfindLastcloudsearchtrimStartelasticachecreateObject.definePropertycolumnmimepreserve-symlinkscommandpackage.jsontoolkitshimfolderconcurrencytoobjectthrottlelastregexforEachextensionloadingi18ncloudfrontSetformattingspecautoscalingObservablesshebangnamehotidleio-tsmatchesnegativeinstallpicomatchdeterministicinstallerpropeslintregular expressionclass-validatorequalwhatwgavacopyespreedebugESnext__proto__consumeratescheme-validationcommand-linefile systemPromisestylesheetfastJSONstringifierweaksetObject.getPrototypeOf.envbufferSymbol.toStringTagstarterwhichreducerpromisetypeoffunctionlookclassesauthtrimLeftbeanstalkstoragegatewayiamtraverseWebSocketsmochatakeES2022ansitextECMAScript 2017find-upless cssobjecmascriptstyleguideexpressionsharedarraybufferpropertiesimportexportES7bcryptconfigurableargumentfromsliceenumerableObject.valuesprivate datasnsgetintrinsicpersistentbufferscharacterfilterlimitedmake dirsesshellsuperstructtypanionsettingsclinumberpackageRegExp.prototype.flagsunicodegdpres7touchRxes6

Readme

@emiplegiaqmnpm/quo-distinctio-quas

@emiplegiaqmnpm/quo-distinctio-quas(<value>) => <type_name>

Returns type of value or object instance. This is an alternative to typeof that actually allows to avoid confusion between the type name and the class name. Returns the name of Class (or constructor function, or reserved type name), for example: 'Object', 'Number', 'String', 'NotNumber', 'Global', 'Dictionary', 'Null', 'Array', etc.

Usage

const @emiplegiaqmnpm/quo-distinctio-quas = require('@emiplegiaqmnpm/quo-distinctio-quas')

@emiplegiaqmnpm/quo-distinctio-quas(undefined) //=> 'Undefined'

@emiplegiaqmnpm/quo-distinctio-quas(null) //=> 'Null' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(true) //=> 'Boolean'

@emiplegiaqmnpm/quo-distinctio-quas(false) //=> 'Boolean'

@emiplegiaqmnpm/quo-distinctio-quas(new Boolean(true)) //=> 'Boolean' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(new MyClass()) //=> 'MyClass' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(42) //=> 'Number'

@emiplegiaqmnpm/quo-distinctio-quas(new Number(42)) //=> 'Number' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(1/0) //=> 'InfiniteNumber' but not 'number'

@emiplegiaqmnpm/quo-distinctio-quas(-Infinity) //=> 'InfiniteNumber' but not 'number'

@emiplegiaqmnpm/quo-distinctio-quas(NaN) //=> 'NotNumber' but not 'number'

@emiplegiaqmnpm/quo-distinctio-quas('str') //=> 'String'

@emiplegiaqmnpm/quo-distinctio-quas(new String('str')) //=> 'String' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas({}) //=> 'Object'

@emiplegiaqmnpm/quo-distinctio-quas(Object.create(null)) //=> 'Dictionary' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(new Object()) //=> 'Object'

@emiplegiaqmnpm/quo-distinctio-quas(new Date()) //=> 'Date'

@emiplegiaqmnpm/quo-distinctio-quas([1, 2, 3]) //=> 'Array'

@emiplegiaqmnpm/quo-distinctio-quas(/a-z/) //=> 'RegExp' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(new RegExp('foo')) //=> 'RegExp' but not 'object'

@emiplegiaqmnpm/quo-distinctio-quas(new Error('error')) //=> 'Error'

@emiplegiaqmnpm/quo-distinctio-quas(new ReferenceError('')) //=> 'ReferenceError'

@emiplegiaqmnpm/quo-distinctio-quas(function () {}) //=> 'Function'

@emiplegiaqmnpm/quo-distinctio-quas(async function () {}) //=> 'AsyncFunction'

@emiplegiaqmnpm/quo-distinctio-quas(() => {}) //=> 'Function'

@emiplegiaqmnpm/quo-distinctio-quas(function * () {}) //=> 'GeneratorFunction'

@emiplegiaqmnpm/quo-distinctio-quas(Symbol('str')) //=> 'Symbol'

@emiplegiaqmnpm/quo-distinctio-quas(new Map()) //=> 'Map'

@emiplegiaqmnpm/quo-distinctio-quas(new Int8Array()) //=> 'Int8Array'

@emiplegiaqmnpm/quo-distinctio-quas(window) //=> 'Global' but not 'object'

Reserved type names

Reserved type names make possible to distinguish type of some special values from values with the real type. Historically, accessing the global object has required different syntax in different JavaScript environments. On the web you can use window, self, frames, in Node.js you must instead use global and type of this global value is 'object'. Also there are not straightforward situations with null, NaN and Infinity values. To determine the type of such values the @emiplegiaqmnpm/quo-distinctio-quas function returns the following type names:

  • 'Undefined' for undefined (typeof(undefined) -> 'undefined')
  • 'Null' for null (typeof(null) -> 'object')
  • 'Global' for global, window, etc. (typeof(global) -> 'object')
  • 'NotNumber' for NaN (typeof(NaN) -> 'number')
  • 'InfiniteNumber' for Infinity or -Infinity (typeof(Infinity) -> 'number')
  • 'Dictionary' for object without prototype (typeof(Object.create(null)) -> 'object') that was created by Object.create(null)

Install

Install on Node.JS with npm

npm install @emiplegiaqmnpm/quo-distinctio-quas

License

MIT © Taras Panasyuk