rdnt

0.0.1 • Public • Published

rdnt

This npm library provides a TypeScript implementation for handling results and errors in a functional style.

Installation

To install the library, run:

npm install rdnt

Usage

Here's a quick example to get you started:

import { Result, Err, unwrap } from 'rdnt';

const result = Result(42);
const error = Err({ message: 'Error occurred' });

try {
  const value = unwrap(result);
  console.log(value); // Outputs: 42
} catch (e) {
  console.error(e);
}

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i rdnt

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

3.86 kB

Total Files

7

Last publish

Collaborators

  • mofax