npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nutmeg-networkinterface

v0.1.6

Published

Network Interface layer for nutmeg components

Downloads

4

Readme

Nutmeg Network Interface

Goal

Serve as a common layer between various networks (initially Monero) so that other components can interact with the network and not have to adjust behavior for different networks.

Milestones

  1. Create and publish stub implementation - Released November 25th, 2017
    • version 0.1.0
    • implementations use console log to provide some feedback to developers
  2. Create and publish working Monero implementation - WIP

Usage

This package should be consumed by installing from npm, npm install -P nutmeg-networkinterface

From the consuming module or script:

import {Network, Block} from 'nutmeg-networkinterface';

var interface = Network.intialize(); //returns a newly created NetworkInterface object

interface.getLatestBlock(); //latest block

var block = new Block();

interface.submitBlock(block); //returns true for success

//To clean up
interface.kill();

Developer Setup

Check if you have node installed

 $ npm -v
 # 5.5.1

If not, install node via homebrew and validate that things are working by trying the above command again

 $ brew install node
 # ...
 # == Summary
 # 🍺  /usr/local/Cellar/node/8.9.1: 5,012 files, 49.4MB

Next install Babel dependencies to compile our ES6 to ES5

 $ npm install --save-dev babel-cli babel-preset-es2015
 # ...
 # + [email protected]
 # + [email protected]
 # added 274 packages in 12.553s

Install the test devDependencies

 $ npm install -D babel-core chai mocha nyc

Install additional dependencies

 $npm install -D esdoc esdoc-standard-plugin

Running npm run test should result in the tests running (and ideally passing), which will tell you the setup is working.

NPM Commands

Testing

To run all the tests and coverage analysis use npm run test

To run a single test use npm run test:single <path to test file>

To run a single test with coverage analysis use npm run test:single-coverage <path to test file>

JSDoc

To generate the documentation run npm run jsdoc

This will generate an index.html in the ./docs directory. To view open docs/index.html

Note: The jsdoc step is run as apart of the build step, which is included as part of the test step by default.

Clean

To remove the generated content, use npm run clean

Note: This step is run as part of the pretest step by default. Which means it is run before the test, test:single, and test:single-coverage targets.

Resources

  1. JavaScript Library Configuration Setup