ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
31 lines (28 loc) • 840 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ramda = require("ramda");
/**
* Testing string if starts with some prefix ignoring case.
*
* @func
* @category String
*
* @param {string} prefix
* @param {string} x
* @return {boolean} True if `x` starts with `prefix` ignore case
*
* @example
*
* R_.startsWithPrefixIgnoreCase('h', 'HELLO') // true
* R_.startsWithPrefixIgnoreCase('HELL', 'hello') // true
* R_.startsWithPrefixIgnoreCase('hello', 'hello') // true
* R_.startsWithPrefixIgnoreCase('h', 'good bye') // false
*
* @sig a -> b -> Boolean
*/
var startsWithPrefixIgnoreCase = (0, _ramda.useWith)(_ramda.startsWith, [_ramda.toUpper, _ramda.toUpper]);
var _default = startsWithPrefixIgnoreCase;
exports.default = _default;