error-if-not-string-longer-than-zero

1.0.0 • Public • Published

errorIfNotStringLongerThanZero(arg): void

Examples

errorIfNotStringLongerThanZero('h'); // no error.

errorIfNotStringLongerThanZero('');
// Error: "Input must be string longer than zero characters"

errorIfNotStringLongerThanZero(false);
// Error: "Input must be string"

Installation

npm i error-if-not-string-longer-than-zero

Loading

// if using TypeScript:
import { errorIfNotStringLongerThanZero } 
    from 'error-if-not-string-longer-than-zero';
// if using ES5 JavaScript:
var errorIfNotStringLongerThanZero = 
    require('error-if-not-string-longer-than-zero')
    .errorIfNotStringLongerThanZero;

Package Sidebar

Install

npm i error-if-not-string-longer-than-zero

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

9.14 kB

Total Files

5

Last publish

Collaborators

  • writetome51