Skip to content
/ Option Public

A deno module for handling null and undefined values, inspired by Rusts Option<T>

License

Notifications You must be signed in to change notification settings

iMarv/Option

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This is a downstream git-mirror of my personal fossil repository. Changes in git won't be sent back upstream.

Option

Deno module inspired by Rusts Option<T> to help handling null and undefined in Typescript.

How to use

The main idea is to type all values that are either T | null or T | undefined into a unified Option<T> and to handle either cases with the help of match() and the Matcher class.

This allows solid type/null safety in your project without the fear of cannot read property name of undefined.

About

A deno module for handling null and undefined values, inspired by Rusts Option<T>

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published