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.
31 lines (26 loc) • 978 B
JavaScript
exports.__esModule = true;
exports["default"] = void 0;
var _ramda = require("ramda");
var _contained = _interopRequireDefault(require("./contained"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Removes specified characters from the beginning of a string.
*
* @func trimCharsStart
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/2.24.0|v2.24.0}
* @category String
* @sig String -> String
* @param {string} chars The characters to trim
* @param {string} value The string to trim
* @return {string} Returns the trimmed string.
* @example
*
* RA.trimCharsStart('_-', '-_-abc-_-'); //=> 'abc-_-'
*/
var trimCharsStart = (0, _ramda.curry)(function (chars, value) {
return (0, _ramda.pipe)((0, _ramda.split)(''), (0, _ramda.dropWhile)((0, _contained["default"])(chars)), (0, _ramda.join)(''))(value);
});
var _default = trimCharsStart;
exports["default"] = _default;
;