New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hmu-plugin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hmu-plugin

Plugin utilities for normalizing output

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

hmu-plugin

Plugin utilities for normalizing output

A small utility library for hmu plugins... Used for normalizing log output, and shorthand functions for common tasks.

Installation

$ npm install hmu-plugin

Usage

import plugin from 'hmu-plugin';
const foobar = plugin('foobar');

// require shorthand
const foobar = require('hmu-plugin')('foobar');

plugin(name)

Create plugin utilities. (Returns util)

  • name (String): Name of the plugin.

util.title()

Log the plugin's title.

util.log(message)

Log a message under the plugin's name.

  • message (String): Message to log.

util.warn(message)

Log a warning under the plugin's name.

  • message (String): Message to log.

util.error(err)

Log an error under the plugin's name.

  • err (Error): Error to log.

util.c

Quick reference to chalk.

util.get(opts, [mod])

A simple Promise wrapper for Node's http.get.

  • opts (Object, String): Options to pass to http.get.
util.get(`http://.../${someting}`)then(req => {
  // ...
});

util.status(url, status)

A quick HTTP GET status checking function using util.get.

  • url (Object, String): Options to pass to util.get.
  • status (Number): Status to compare.
util.status(`http://registry.npmjs.org/${name}`, 404)
.then(available => ...);

Credits

jamen
Jamen Marzonie

Keywords

utility

FAQs

Package last updated on 04 Apr 2016

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