daenamkim / npm-release-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM Release Test

Build Status Coverage Status FOSSA Status

  • 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 run preversion and postversion, add a tag in GitHub repo before npm publish
  • Do not add dist/ in .npmignore, it must be included but coverage/ and test/

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

About

License:MIT License


Languages

Language:JavaScript 86.9%Language:TypeScript 13.1%