empty-php-js

empty js function like empty() in php

Usage no npm install needed!

<script type="module">
  import emptyPhpJs from 'https://cdn.skypack.dev/empty-php-js';
</script>

README

empty php js - empty() like in php, but in js

Just install empty-php-js from NPM:

npm i empty-php-js

Require it in your JavaScript project with name "empty":

const empty = require('empty-php-js');

And use it:

if(empty('') || empty({})){
//...
}

empty-php-js @NPM:

https://www.npmjs.com/package/empty-php-js