Comparing version 7.0.0 to 7.0.1
@@ -80,2 +80,8 @@ declare module 'fluture' { | ||
/** Attempt to extract the rejection reason. See https://github.com/fluture-js/Fluture#extractleft */ | ||
extractLeft(): Array<L> | ||
/** Attempt to extract the resolution value. See https://github.com/fluture-js/Fluture#extractright */ | ||
extractRight(): Array<R> | ||
/** Set up a cleanup Future to run after this one is done. See https://github.com/fluture-js/Fluture#finally */ | ||
@@ -201,6 +207,6 @@ finally(cleanup: Future<L, any>): Future<L, R> | ||
/** Extract the rejection reason into an Array if it's present. See https://github.com/fluture-js/Fluture#extractleft */ | ||
/** Attempt to extract the rejection reason. See https://github.com/fluture-js/Fluture#extractleft */ | ||
export function extractLeft<L, R>(source: Future<L, R>): Array<L> | ||
/** Extract the resolution value into an Array if it's present. See https://github.com/fluture-js/Fluture#extractright */ | ||
/** Attempt to extract the resolution value. See https://github.com/fluture-js/Fluture#extractright */ | ||
export function extractRight<L, R>(source: Future<L, R>): Array<R> | ||
@@ -207,0 +213,0 @@ |
{ | ||
"name": "fluture", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "FantasyLand compliant (monadic) alternative to Promises", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1427,2 +1427,34 @@ # [![Fluture](logo.png)](#butterfly) | ||
#### extractLeft | ||
<details><summary><code>extractLeft :: Future a b -> Array a</code></summary> | ||
```hs | ||
extractLeft :: Future a b -> Array a | ||
Future.prototype.extractLeft :: Future a b ~> () -> Array a | ||
``` | ||
</details> | ||
Returns an array whose only element is the rejection reason of the Future. | ||
In many cases it will be impossible to extract this value; In those cases, the | ||
array will be empty. This function is meant to be used for type introspection: | ||
it is **not** the correct way to [consume a Future](#consuming-futures). | ||
#### extractRight | ||
<details><summary><code>extractRight :: Future a b -> Array b</code></summary> | ||
```hs | ||
extractRight :: Future a b -> Array b | ||
Future.prototype.extractRight :: Future a b ~> () -> Array b | ||
``` | ||
</details> | ||
Returns an array whose only element is the resolution value of the Future. | ||
In many cases it will be impossible to extract this value; In those cases, the | ||
array will be empty. This function is meant to be used for type introspection: | ||
it is **not** the correct way to [consume a Future](#consuming-futures). | ||
## License | ||
@@ -1429,0 +1461,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202278
3877
1512