Socket
Socket
Sign inDemoInstall

alta-any

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    alta-any

Get a value from any of the channels


Version published
Weekly downloads
14
increased by1300%
Maintainers
1
Install size
22.1 kB
Created
Weekly downloads
 

Readme

Source

alta-any

Get a value from any of the channels.

Included in the alta-kit.

Example

let a = Channel()
let b = Channel()
let ab = any(a, b)

a.put(1)
a.put(1)
b.put(2)

var [ value, channel ] = await ab()
assert.equal(channel, a)
assert.equal(value, 1)

var [ value, channel ] = await ab()
assert.equal(channel, b)
assert.equal(value, 2)

var [ value, channel ] = await ab()
assert.equal(channel, a)
assert.equal(value, 1)

Install

npm install alta-any

License

MIT

Keywords

FAQs

Last updated on 11 Aug 2016

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