source: node_modules/ramda-adjunct/es/isNonEmptyString.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 971 bytes
Line 
1import { allPass } from 'ramda';
2import isString from './isString';
3import isNotObj from './isNotObj';
4import isNotEmpty from './isNotEmpty';
5
6/**
7 * Checks if input value is not an empty `String`.
8 *
9 * @func isNonEmptyString
10 * @memberOf RA
11 * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}
12 * @category Type
13 * @sig * -> Boolean
14 * @param {*} val The value to test
15 * @return {boolean}
16 * @see {@link RA.isEmptyString|isEmptyString}
17 * @example
18 *
19 * RA.isNonEmptyString('42'); // => true
20 * RA.isNonEmptyString(''); // => false
21 * RA.isNonEmptyString(new String('42')); // => false
22 * RA.isNonEmptyString(new String('')); // => false
23 * RA.isNonEmptyString([42]); // => false
24 * RA.isNonEmptyString({}); // => false
25 * RA.isNonEmptyString(null); // => false
26 * RA.isNonEmptyString(undefined); // => false
27 * RA.isNonEmptyString(42); // => false
28 */
29var isNonEmptyString = allPass([isString, isNotObj, isNotEmpty]);
30export default isNonEmptyString;
Note: See TracBrowser for help on using the repository browser.