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