Comparing version 1.4.0 to 1.4.2
14
index.js
/** | ||
* @license The MIT License (MIT) | ||
* @copyright Stanislav Kalashnik <darkpark.main@gmail.com> | ||
* @author Stanislav Kalashnik <darkpark.main@gmail.com> | ||
*/ | ||
@@ -24,5 +24,11 @@ | ||
if ( DEVELOP ) { | ||
if ( !format ) { throw new Error(__filename + ': format string is empty'); } | ||
if ( args.length === 0 ) { throw new Error(__filename + ': no arguments'); } | ||
if ( !expr.test(format) ) { throw new Error(__filename + ': format string does not have substitutions: ' + format); } | ||
if ( !format ) { | ||
throw new Error(__filename + ': format string is empty'); | ||
} | ||
if ( args.length === 0 ) { | ||
throw new Error(__filename + ': no arguments'); | ||
} | ||
if ( !expr.test(format) ) { | ||
throw new Error(__filename + ': format string does not have substitutions: ' + format); | ||
} | ||
} | ||
@@ -29,0 +35,0 @@ |
{ | ||
"name": "cjs-format", | ||
"version": "1.4.0", | ||
"version": "1.4.2", | ||
"description": "String substitution according to the given format.", | ||
@@ -14,9 +14,9 @@ "author": { | ||
"scripts": { | ||
"lint": "eslint .", | ||
"lint": "eslint --ignore-pattern '/docs/' .", | ||
"test": "npm run lint", | ||
"jsdoc": "jsdoc --destination doc *.js readme.md" | ||
"jsdoc": "jsdoc --destination docs *.js readme.md" | ||
}, | ||
"devDependencies": { | ||
"cjs-eslint-config": "1.*.*", | ||
"eslint": "3.*.*" | ||
"cjs-eslint": "^1.1.1", | ||
"jsdoc": "^3.5.5" | ||
}, | ||
@@ -23,0 +23,0 @@ "keywords": [ |
String substitution according to the given format | ||
================================================= | ||
[![Build Status](https://img.shields.io/travis/cjssdk/format.svg?style=flat-square)](https://travis-ci.org/cjssdk/format) | ||
[![NPM version](https://img.shields.io/npm/v/cjs-format.svg?style=flat-square)](https://www.npmjs.com/package/cjs-format) | ||
[![Dependencies Status](https://img.shields.io/david/cjssdk/format.svg?style=flat-square)](https://david-dm.org/cjssdk/format) | ||
[![build status](https://img.shields.io/travis/cjssdk/format.svg?style=flat-square)](https://travis-ci.org/cjssdk/format) | ||
[![npm version](https://img.shields.io/npm/v/cjs-format.svg?style=flat-square)](https://www.npmjs.com/package/cjs-format) | ||
[![dependencies status](https://img.shields.io/david/cjssdk/format.svg?style=flat-square)](https://david-dm.org/cjssdk/format) | ||
[![devDependencies status](https://img.shields.io/david/dev/cjssdk/format.svg?style=flat-square)](https://david-dm.org/cjssdk/format?type=dev) | ||
[![Gitter](https://img.shields.io/badge/gitter-join%20chat-blue.svg?style=flat-square)](https://gitter.im/DarkPark/cjssdk) | ||
[![RunKit](https://img.shields.io/badge/RunKit-try-yellow.svg?style=flat-square)](https://runkit.com/npm/cjs-format) | ||
[![RunKit](https://img.shields.io/badge/RunKit-try-yellow.svg?style=flat-square)](https://npm.runkit.com/cjs-format) | ||
@@ -58,4 +59,4 @@ | ||
If you have any problem or suggestion please open an issue [here](https://github.com/cjssdk/format/issues). | ||
Pull requests are welcomed with respect to the [JavaScript Code Style](https://github.com/DarkPark/jscs). | ||
If you have any problems or suggestions please open an [issue](https://github.com/cjssdk/format/issues) | ||
according to the contribution [rules](.github/contributing.md). | ||
@@ -62,0 +63,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4811
32
66
4
1