token-memory

0.2.2 • Public • Published

token-memory Coveralls Status Travis Status Coverity Status

A small library that provides reliable memories

Installation

npm install --save token-memory

Usage Example

  "use strict";
 
  var Token = require("token-memory");
 
  function newToken() {
    Token(({id, root, token, broadcast, listen}) => {
      token.get('id').once(idFound => {
        if ( id === idFound) {
          broadcast.get('PING').put(id)
          listen.get('PONG').on((peer) => {
            console.log('PEER :', peer);
          });
        }
      })
    })
  }
 
  newToken();

Tests

npm test

Publish

npm login # usertoken npm account

npm publish # token-memory package

Contributing

CONTRIBUTING

Change Log

CHANGELOG

References

build NPM module

/token-memory/

    Package Sidebar

    Install

    npm i token-memory

    Weekly Downloads

    1

    Version

    0.2.2

    License

    MIT

    Unpacked Size

    32.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • alex2006hw
    • usertoken-npm