UNPKG

ramda-adjunct

Version:

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

29 lines (28 loc) 950 B
import { allPass, isNotEmpty } from 'ramda'; import isString from './isString.js'; import isNotObj from './isNotObj.js'; /** * Checks if input value is not an empty `String`. * * @func isNonEmptyString * @memberOf RA * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0} * @category Type * @sig * -> Boolean * @param {*} val The value to test * @return {boolean} * @see {@link RA.isEmptyString|isEmptyString} * @example * * RA.isNonEmptyString('42'); // => true * RA.isNonEmptyString(''); // => false * RA.isNonEmptyString(new String('42')); // => false * RA.isNonEmptyString(new String('')); // => false * RA.isNonEmptyString([42]); // => false * RA.isNonEmptyString({}); // => false * RA.isNonEmptyString(null); // => false * RA.isNonEmptyString(undefined); // => false * RA.isNonEmptyString(42); // => false */ var isNonEmptyString = allPass([isString, isNotObj, isNotEmpty]); export default isNonEmptyString;