1.2.0 • Published 8 years ago

is-empty v1.2.0

Weekly downloads
229,620
License
MIT
Repository
github
Last release
8 years ago

is-empty

Check whether a value is empty.

Installation

$ npm install is-empty
$ npm test

Example

var empty = require('is-empty');

empty([]);              // true
empty({});              // true
empty('');              // true
empty(0);               // true
empty(function(){});    // true
empty(null);            // true
empty(undefined);       // true
empty(new Map());       // true
empty(new Set());       // true
empty(new Error());     // true

empty(true);            // false
empty(false);           // false
empty(['a', 'b']);      // false
empty({ a: 'b' });      // false
empty('string');        // false
empty(42);              // false
empty(function(a,b){}); // false
empty(new Map([['key', 'value']])); // false
empty(new Set([1]));    // false
empty(new Error('fail'))// false

API

isEmpty(value)

Check whether value is empty.

License

MIT

brokerapiwp-edit-pro-cliacr-core@theprojectsomething/pouchdb-server-monorepokenshoo-shared@mi-design/react-ui-kitkenshoo-redux-utilswhat-cliwhat-server@unifiedts/engine@infinitebrahmanuniverse/nolb-is-egbc-test-2@everything-registry/sub-chunk-1933tackerword-microserviceword-serverwordassoserverwindows-store-linkwonder-slatesc-storejsrehoc-validatorsparenderrsoury-marketplacereact-native-video-typoseed-climiladezzatmetalboxmerge-utilloaduserslogin-server-expressis-blankj22-slatemozu-adminui-core-utilkpx-lib-uikoa-json-successhasura-where-paramshtml2chscripthtml2hscriptgordon_lin-sb-seogoogle-store-linkgwalletlead-uigh-repos-creation-calgo-plugin-climako-configopsportal-coreprotatoprotato-libprowppk-selectreact-cli-toolreact-reorderable-listreact-reorderable-list-forkreact-reorderable-list-forked2react-simple-tree-menureact-simple-tree-menu-modifiednetwork-dataset-servernomad-slateqianxunjsredux-namespacesquerysqlreact-tas-componentsstringssuptrimza-core-libslate-fixslate-packagessimple-hoc-validatorsimple-oauth2-clienttwitter-fetch-userstwitterfollowerexploreruh-responderterryoy-slatetooljwt@adraheem/axios-next@agreed/client@bagusrin/node-utils@bjoerge/slate@biocad/jfwyassbzero.libzytoolsunique-groupingunified-engine@happyiterating/slate@eliumhq/slate@gkutils/common@gitbook/slate-hyperscript@gitbook/slate@leight-core/utils@leight-core/viv@leight/utils@interweave/interweave@edde/dasa-lib@mingqi/w3ajs-client@kbourro/ts-browser@ixiaolian/mp-lib@jodaz_/file-provider@kgdev/slate@impervaos/google-analytics-spa@quiz-us/kit
1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

9 years ago

0.1.0

9 years ago

0.0.1

11 years ago