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

@crabas0npm2/quis-possimus-harum

v1.0.0

Published

Type checking utils.

Downloads

72

Maintainers

thanhl4861thanhl4861

Keywords

entriesexitreal-timethroatstylequerystringstreams2descriptorcoercibleurlterminalcheckfunctionpromisesredactECMAScript 2016somejsdiffFloat64ArraymodulesdataHyBieverydataviewhigher-ordercss-in-jshotfastcopysimpledbreactsafevalueStreamsstructuredClonereduceURLmimetypestoArraybindspeedaccessibilitynopecommand-lineString.prototype.trimoperating-systemtestRxJSajaxform-validationglobqueueMicrotaskbyteOffsetUint32ArraygettercolumnstypeerroreventEmittertermTypeBoxsyntaxtoobjectviewfluxshamintrinsiccollection.es6frameworkschemapersistentbddsignalspluginReflect.getPrototypeOfdotenvdeepcopyyamlstylingmimeshebangbatchlengthbrowserbeanstalktsoutputarraysgetPrototypeOftoolskeysmonorepoparentsbootstrap csspropertyargumentprotobufpostcssfixed-widthredux-toolkitvariablesbootstrap lesswaitchaimime-dbavanodeESES2020serializercurlarthasOwnCSSStyleDeclarationReactiveExtensionseventsArrayBufferES6pruneMicrosoftmakedefinetrimEndcharactersutilitiesmkdirscommandgradients css3uuidwatchingdebuggertap$.extendES7lessESnextautoprefixertypescriptES5shrinkwrapvalidreact-testing-librarytestingec2iamObjectnegative_.extendutilbrowserlistxhrargvrobustisConcatSpreadablefullECMAScript 2019find-upoffsetbundlingObservablecallbindstatelessfunctionalWeakMapECMAScript 2018Uint8ClampedArrayconfigfile systemObject.definePropertyfindLastIndexreact-hook-formgroupBymatchAllObservableses5stylesxtermdeep-cloneUint16ArrayindicatorSymbolrestfulflattenstreamfast-deep-clonecloudformationsideRegExp.prototype.flagsformses6bannertyped arrayReactiveXsharedarraybufferfpssymlinkfsworkspace:*regularlinuxES8sliceasyncSymbol.toStringTagobjsignalMapcallbacktouchs3npmemitsharedloggingES2023nameauthPushruntimeinternal slotmacostimeerror-handlingtypedarraysmodulehashpredictableconfigurablemapreduceelbsetzodInt8ArrayJSONslotassignenvironmentincludesmatchesWeakSetwrapes2018Int32ArrayprocessiterateimmerparserdsfastifytrimRightarraybufferttyhas-ownpackage.jsonpropa11yreplaysearchloadbalancingrm -frspinneremrECMAScript 6call-bindserializeopenArraytddoptimistresolvel10nsetImmediatedeep-copywalkingmobile256lruArray.prototype.flatcore-jscloudwatchtypesafegroupstringdeterministicECMAScript 5polyfillspinnersstatusgetoptpatchjapaneseArrayBuffer.prototype.slicetapeprefixfunctionsexpressajvcommanderECMAScript 2022performantes2017eslintpluginjsonpreserve-symlinksconnectpipeTypedArraycodesiniterationstableregular expressiontoStringTaghasstdlibmomentchromiumflatfastclonewgetassertioncallrequestissigtermECMAScript 3classesdiffcss variablenodejscensorvaluesjsdomtoSortedloggerimportexportregular expressionspretty-0es-shimsmergeprotocol-buffersponyfilleslint-pluginsortediewindowstypedECMAScript 2020formpackagesregexpelmsameValueZerotelephonemiddlewarelimitedBigUint64ArraylookyupjsxhookspreprocessorlistenersrequiresettingsECMAScript 7validationworkercallboundwalkSetlognativefindupdescriptorstakeObject.keysformatless cssquoteconsumeclass-validatorhttpnested cssautoscalingreadablestreamlanguagees-shim APIWebSocketCSSES2016private datacorsbrowserslistescapeObject.getPrototypeOfminimalargparsergbhelpersemojiFunction.prototype.nameclijestinvariantvariables in cssrangeerrormake dirbundlerwriteinterruptsarraystylesheetassertsymbolsjoishimprotoRegExp#flagsflagscomparepathArray.prototype.filterwritableextratraverseownfileparentexpressionreusefilterlimitflatMapObject.valuesvestpackage managerelasticacheclassnamelook-upzerodependency managerlesscsspromisegetOwnPropertyDescriptorexit-codestyled-componentsappconcurrencytaskimportinspectcloudfrontlazydescriptionfindfigletlockfilebusycolumntrimLeftcloudsearchrmduplexoptionconsolevalidatecolorsmatchgetefficientfastcolorgetintrinsicroutingYAMLpackageeslintwaftypeofwatcherhookformsetterenderwhichprivatereadECMAScript 2017aws0rfc4122east-asian-widthIteratorjsonpathjwtoptimizersigintsqsstreamscss nestingasciiguidStyleSheetsinatraFloat32ArrayObject.iscall-boundinputextensionunicoderoute53fetchassertsfullwidthtypestateweaksetsuperstructES2021breakwebES3typesobjectconcataccessorArray.prototype.findLastIndex.envchromeextendgenericspasswordcreateAsyncIteratortextstarterwarningcjkcryptocss lesscontainsansieslintconfigutil.inspectfindLastfull-widthidlepyyamldependencieskeyECMAScript 2023readablestyleguidelasthasOwnPropertyschemeES2019__proto__pushparseri18nmoveoncebufferserrorless mixinsstoragegatewayawaitperformanceswfclassnamesamazonArray.prototype.flattendynamodbirqformattingmetadataratedeeptrimspecmapcopypicomatchwatchPromisebyteLengthRFC-6455handlerscomputed-typesBigInt64Arrayless compilerphonechinesemru[[Prototype]]tslibStream

Readme

@crabas0npm2/quis-possimus-harum · GitHub license npm Package Status Test Status

Type checking utils.

Installation

npm install @crabas0npm2/quis-possimus-harum --save

Usage

const t = require('@crabas0npm2/quis-possimus-harum')

const objConstraint = t.object.is({
  num: t.number.gte(0).required,
  str: t.string.match(/\d+/).required
}).required

const result = objConstraint.validate({ num: 1, str: '1' })
// result = { valid: true, errors: [] }

const result = objConstraint.validate({ num: 0, str: '1' })
// result = {
//  valid: false,
//  errors: [{ name: 'num', expected: 'gte(0)', actual: 0 }]
// }

Built-in constraints

  • bool
    • bool.required
    • bool.truthy
    • bool.falsy
  • number
    • number.required
    • number.eq(<number>)
    • number.neq(<number>)
    • number.gt(<number>)
    • number.gte(<number>)
    • number.lt(<number>)
    • number.lte(<number>)
  • decimal
    • decimal.required
    • decimal.eq(<number|string>)
    • decimal.neq(<number|string>)
    • decimal.gt(<number|string>)
    • decimal.gte(<number|string>)
    • decimal.lt(<number|string>)
    • decimal.lte(<number|string>)
  • string
    • string.required
    • string.lenEq(<number>)
    • string.empty
    • string.notEmpty
    • string.match(<regexp>)
  • time
    • time.required
    • time.eq(<number|string|Date>)
    • time.neq(<number|string|Date>)
    • time.gt(<number|string|Date>)
    • time.gte(<number|string|Date>)
    • time.lt(<number|string|Date>)
    • time.lte(<number|string|Date>)
  • array
    • array.required
    • array.lenEq(<number>)
    • array.empty
    • array.notEmpty
    • array.of(<itemConstraint>)
    • array.is([<itemConstraint>, ...])
  • object
    • object.required
    • object.eq(<object>)
    • object.match(<object>)
    • object.is({ key: <constraint>, ... })
    • object.like({ key: <constraint>, ... })
  • nil
  • eq(<any>)
    • eq(<any>).required
  • neq(<any>)
    • neq(<any>).required
  • oneOf([<any>, ...])
    • oneOf([<any>, ...]).required
  • valueOf({ key: <any>, ... })
    • valueOf({ key: <any>, ... }).required
  • use
    • use(({ parent, value }) => constraint).required

License

MIT