small2

do foolish and stay simply.

Usage no npm install needed!

<script type="module">
  import small2 from 'https://cdn.skypack.dev/small2';
</script>

README

small2

Base Tools for myself.Talk less try it.

Install

npm install small2

Example

var s2 = require('small2');

s2.goneEmpty(null);         // true
s2.goneEmpty(undefined);    // true
s2.goneEmpty(NaN);          // true
s2.goneEmpty(0);            // true
s2.goneEmpty('');           // true
s2.goneEmpty([]);           // true
s2.goneEmpty({});           // true

s2.goneEmpty(['a', 'b']);      // ['a', 'b']
s2.goneEmpty({ a: 'b' });      // { a: 'b' }
s2.goneEmpty('string');        // 'string'
s2.goneEmpty(9527);            // 9527