Socket
Socket
Sign inDemoInstall

result-core

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    result-core

minimal result reification


Version published
Maintainers
1
Created

Readme

Source

result-core

Minimal function call reification. This library is designed both to be useful in simple cases and serve as a specification for how alternative implementations should behave. See result and lazy-result for examples. Note how they inherit from this class, making them easy to distinguish from other types. No duck typing required. This makes general purpose utilities such as when much easier to write.

Installation

With component, packin or npm

$ {package mananger} install jkroso/result-core

then in your app:

var Result = require('result-core')

API

  • Result()

Result()

A class for creating concrete representations of function calls which can be manipulated programmatically at run-time.

function add(a, b){
	var result = new Result
	result.write(a + b)
	return result
}

add(1, 2).read(function(three){
	console.log('1 + 2 = %d', three)
})

FAQ

Q: How the fuck is that useful?
A: async programming

Running the tests

Just run make. It will install and start a development server so all you then need to do is point your browser to localhost:3000/test. Likewise to run the Koans.

Keywords

FAQs

Last updated on 27 Jun 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc