1.0.22 ā€¢ Published 11 days ago

@lou.codes/parsers v1.0.22

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

Coverage License NPM Version Open Issues Size

šŸ‘ļøā€šŸ—Øļø 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

Install @lou.codes/parsers as a dependency:

pnpm add @lou.codes/parsers
# or
npm install @lou.codes/parsers
# or
yarn add @lou.codes/parsers

Import it and use it:

import { parseDecimal } from "@lou.codes/parsers";

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

šŸ¦• Deno

Import @lou.codes/parsers using the npm: prefix, and use it directly:

import { parseDecimal } from "npm:@lou.codes/parsers";

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

šŸŒŽ Browser

Import @lou.codes/parsers using esm.sh, and use it directly:

<script type="module">
	import { parseDecimal } from "https://esm.sh/@lou.codes/parsers";

	parseDecimal("101"); // 101
	parseDecimal("nope"); // undefined
</script>

Useful links

1.0.22

11 days ago

1.0.21

24 days ago

1.0.20

26 days ago

1.0.19

1 month ago

1.0.17

1 month ago

1.0.16

1 month ago

1.0.15

1 month ago

1.0.14

1 month ago

1.0.13

2 months ago

1.0.12

2 months ago

1.0.11

4 months ago

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.2

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.1

6 months ago

1.0.0

6 months ago