first commit
This commit is contained in:
35
build/node_modules/is-falsey-x/index.js
generated
vendored
Normal file
35
build/node_modules/is-falsey-x/index.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @file Test if a given value is falsey.
|
||||
* @version 1.0.1
|
||||
* @author Xotic750 <Xotic750@gmail.com>
|
||||
* @copyright Xotic750
|
||||
* @license {@link <https://opensource.org/licenses/MIT> MIT}
|
||||
* @module is-falsey-x
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var toBoolean = require('to-boolean-x');
|
||||
|
||||
/**
|
||||
* This method tests if a given value is falsey.
|
||||
*
|
||||
* @param {*} value - The value to test.
|
||||
* @returns {boolean} `true` if the value is falsey: otherwise `false`.
|
||||
* @example
|
||||
* var isFalsey = require('is-falsey-x');
|
||||
*
|
||||
* isFalsey(); // true
|
||||
* isFalsey(0); // true
|
||||
* isFalsey(''); // true
|
||||
* isFalsey(false); // true
|
||||
* isFalsey(null); // true
|
||||
*
|
||||
* isFalsey(true); // false
|
||||
* isFalsey([]); // false
|
||||
* isFalsey(1); // false
|
||||
* isFalsey(function () {}); // false
|
||||
*/
|
||||
module.exports = function isFalsey(value) {
|
||||
return toBoolean(value) === false;
|
||||
};
|
||||
Reference in New Issue
Block a user