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