- Basically follow Reference
- Replace a demo function as below because I want to compare to types too
export function IsNullOrEmpty(str: string): boolean { return !str || (!!str && str.trim().length === 0); }
- Must run
npm version [YOUR VERSION]
to runpreversion
andpostversion
, add a tag in GitHub repo beforenpm publish
- Do not add
dist/
in.npmignore
, it must be included butcoverage/
andtest/
Install
$ yarn add npm-release-daenamkim
or
$ npm install npm-release-daenamkim
For JavaScript
const test = require('npm-release-daenamkim');
console.log(test.IsNullOrEmpty(undefined));
console.log(test.IsNullOrEmpty(null));
console.log(test.IsNullOrEmpty(''));
console.log(test.IsNullOrEmpty('a')); // false
For TypeScript
import * as test from 'npm-release-daenamkim';
console.log(test.IsNullOrEmpty(undefined));
console.log(test.IsNullOrEmpty(null));
console.log(test.IsNullOrEmpty(''));
console.log(test.IsNullOrEmpty('a')); // false