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

errmsg

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errmsg

A simple, generic tool for creating (error) messages

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
2
-75%
Maintainers
1
Weekly downloads
 
Created
Source

errmsg

A simple, generic tool for creating (error) messages

build status dependency status semantic-release

Installation

npm install --save errmsg

Usage

var errmsg = require('errmsg')
var partial = require('lodash.partial')
console.log(errmsg("$1 $2", "Hello", "World")) // "Hello" "World"

function id(v) {return v}
console.log(errmsg.customFormatter(id, "$1 $2", "Hello", "World")) // Hello World

var errmsgId = partial(errmsg.customFormatter, id);
console.log(errmsgId.customFormatter("$1 $2", "Hello", "World")) // Hello World

var MESSAGES = {
  lipsum: "$1 $2 dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
var errmsgs = partial(errmsg.lookup, MESSAGES);
console.log(errmsgs("lipsum", "Lorem", "Ipsum"));

var errmsgsId = partial(errmsg.customFormatterLookup, id, MESSAGES);
console.log(errmsgsId("lipsum", "Lorem", "Ipsum"));

Credits

Jordan Klassen

Sebastian McKenzie - based on babel-messages

License

ISC

FAQs

Package last updated on 28 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