🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

checkmight

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkmight

Type checking library

0.1.0
latest
npm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

[Work in progress, do not use]

checkmight

The mighty type checking and validation library. Use it in your code for method guarding or in your test library as an assert library.

Why?

Chai is dead Inspect.js is dead TypeScript is only static validation, requires compilation, and isn't compatible with all the things yet

The Mental Model

  • is* - is a "type" of a thing: isString, isObject, isFunction, isPromise, etc.
  • has* - has an "attribute": hasLength, hasProperty, etc.
  • does* - is executible and performs some action: doesReturn, doesResolve, doesYield, etc.
  • each* - is a collection of things that all have some common type: eachIsString, eachIsObject, etc.

See the docs for a full list of APIs.

Other Stuff

  • config
    • config.plugin(plugin) - takes a plugin function or the name of module to require()

Keywords

validation

FAQs

Package last updated on 22 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts