From 6bd58b46ff6505b8b22aff297ef2d38f90e3fbb9 Mon Sep 17 00:00:00 2001
From: Matei Adriel <rafaeladriel11@gmail.com>
Date: Fri, 20 Dec 2019 14:46:53 +0200
Subject: [PATCH] typescript(option): docs: added the docs for the fromNullable
 helper

Signed-off-by: prescientmoon <git@moonythm.dev>
---
 typescript/option/docs/main.md | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/typescript/option/docs/main.md b/typescript/option/docs/main.md
index 3e0d141..e2c05a2 100644
--- a/typescript/option/docs/main.md
+++ b/typescript/option/docs/main.md
@@ -187,4 +187,23 @@ foldback(add, None, x) // x
 foldback(add, Some(y), x) // x + y
 ```
 
+# FromNullable
+
+A function to create options from nullable values.
+
+### Signature
+
+```ts
+const fromNullable: <T>(value: T | null) => Option<T>
+```
+
+### Usage
+
+```ts
+import { Some, None, fromNullable } from '@adrielus/option'
+
+fromNullable(7) // Some(7)
+fromNullable(null) // None
+```
+
 **_This is still work in progress, right now only covering about 60% of the library. Contributions are welcome_**