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

medios

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

medios

Your lovely and versatile maids

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Meidos

Your lovely and versatile maids

install

$ yarn add medios

Usage

import {Task} from 'medios'

const Task = new Queue(2)
let count = 0

Task.push(async next => {
  expect(++count).toBe(1)
  await next()
  expect(++count).toBe(4)
})

Task.push(next => {
  expect(++count).toBe(2)
  next()
})

Task.push( async next => {
  await next()
  expect(++count).toBe(5)
})

Task.push( next => {
  expect(++count).toBe(3)
})
import {Message} from 'medios'

const message = new Message()
let count = 1

message.on('set', (value) => {
  count = value
})
message.emit('set', 1000)
expect(count).toBe(1000)

import  {Observer} from 'medios'

const observer = new Observer()

observer.subscribe(val => {
  expect(++val).toBe(2) 
})

observer.subscribe(val => {
  expect(--val).toBe(0)
})

observer.publish(1)

FAQs

Package last updated on 13 Feb 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc