1-liners
Version:
Useful oneliners and shorthand functions
26 lines (23 loc) • 466 B
JavaScript
/**
* @module 1-liners/isString
*
* @description
*
* Same as `typeof value === 'string'`.
*
* @example
*
* const isString = require('1-liners/isString');
*
* isString(''); // => true
* isString('anything'); // => true
*
* isString(/anything else/); // => false
*
*/
;
exports.__esModule = true;
exports['default'] = function (value) {
return typeof value === 'string';
};
module.exports = exports['default'];