Skip to content

usertoken/token-memory

Repository files navigation

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

About

A module to provide durable tokens

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published