Skip to content

Hexafuchs/what.js

Repository files navigation

A library to get information about variables

Latest Version on NPM GitHub Tests Action Status GitHub Code Style Action Status Monthly Downloads

This package is meant to provide helpers to handle data with unknown or ambiguous types in both Javascript and Typescript, providing both boolean return types and Typescript assertions. It also provides some additional helpers to handle common use cases, like checking if a variable is "empty", has a certain function, has a special meaning, etc.

Installation

You can install the package via npm (or another tool of your choosing):

npm install @hexafuchs/what.js

Usage

Checkout the documentation at https://hexafuchs.github.io/what.js/.

import { isNull } from "@hexafuchs/what.js";

console.log(isNull(null));

Testing

npm run test

Development

Building

npm run build

Dev Server

npm run dev

Run linter

npm run lint:scripts
npm run lint:styles

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.