Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

result

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

result - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

21

index.js

@@ -25,3 +25,3 @@ import ResultType from 'result-type'

default:
var x = pending()
const x = pending()
this.listen(

@@ -96,3 +96,11 @@ handle(x, onValue, 'write', this),

export const coerce = value => {
if (!(value instanceof ResultType)) return wrap(value)
if (!(value instanceof ResultType)) {
if (value instanceof Promise) {
const result = pending()
value.then(value => result.write(value),
error => result.error(error))
return result
}
return wrap(value)
}
if (value instanceof Result) return value

@@ -103,6 +111,5 @@ switch (value.state) {

}
var result = pending()
value.listen(
value => result.write(value),
error => result.error(error))
const result = pending()
value.listen(value => result.write(value),
error => result.error(error))
return result

@@ -156,3 +163,3 @@ }

default:
var x = pending()
const x = pending()
value.listen(handle(x, onValue, 'write'),

@@ -159,0 +166,0 @@ handle(x, onError, 'error'))

{
"name": "result",
"version": "2.0.0",
"version": "2.0.1",
"description": "reify your results",

@@ -5,0 +5,0 @@ "dependencies": {

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