Socket
Socket
Sign inDemoInstall

fluture

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluture - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

10

index.d.ts

@@ -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 @@

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc