-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Vitali Haradkou edited this page Aug 9, 2023
·
13 revisions
Welcome to the rslike wiki!
here is you find:
- Less undefined behavior, when using Option and Result.
- Well tested.
100% test coverage
- JSDoc with examples.
- Typescript ready - d.ts types are generated with tsc.
- first-class
CJS
andESM
support. - Deno?
NPM:
npm i @rslike/std
YARN/PNPM:
yarn add @rslike/std
# or
pnpm add @rslike/std
- Install package
- In your entry file write next:
// your main file
// add global types in globalThis: Some, None, Option, Result, Ok, Err functions
import '@rslike/std/globals';
// rest your file
Option
is the same as for rust Option
object
You can find the Option
API here: https://github.com/vitalics/rslike/wiki/Option
Result<T,E>
is a same as for rust Result
object
You can find API here: https://github.com/vitalics/rslike/wiki/Result