@vangware/parsers

Vangware's Parsers

Coverage License NPM Version Open Issues

👁️‍🗨️ Parsers without nonsense.

Instead of throwing or returning values like NaN, the parsers in this library either return the expected parsed value or undefined (making use of the Maybe type).

Usage

📦 Node

First:

# If you use npm
npm install @vangware/parsers
# If you use pnpm
pnpm add @vangware/parsers
# If you use yarn
yarn add @vangware/parsers

And then:

import { parseDecimal } from "@vangware/parsers";

parseDecimal("101"); // 101
parseDecimal("nope"); // undefined

🦕 Deno

import { parseDecimal } from "https://cdn.skypack.dev/@vangware/parsers?dts";

parseDecimal("101"); // 101
parseDecimal("nope"); // undefined

Documentation

Documentation is available HERE. It is auto-generated with typedoc based on the JSDocs and the types in the source. It shouldn't be necessary to read this. Code editors like VS Code integrate the documentation in the UI.

Changelog

Changelog can be found HERE.

Test coverage

Test coverage can be found HERE.