source: node_modules/ramda-adjunct/lib/trimCharsStart.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: 972 bytes
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _ramda = require("ramda");
6var _included = _interopRequireDefault(require("./included"));
7function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8/**
9 * Removes specified characters from the beginning of a string.
10 *
11 * @func trimCharsStart
12 * @memberOf RA
13 * @since {@link https://char0n.github.io/ramda-adjunct/2.24.0|v2.24.0}
14 * @category String
15 * @sig String -> String
16 * @param {string} chars The characters to trim
17 * @param {string} value The string to trim
18 * @return {string} Returns the trimmed string.
19 * @example
20 *
21 * RA.trimCharsStart('_-', '-_-abc-_-'); //=> 'abc-_-'
22 */
23
24var trimCharsStart = (0, _ramda.curry)(function (chars, value) {
25 return (0, _ramda.pipe)((0, _ramda.split)(''), (0, _ramda.dropWhile)((0, _included["default"])(chars)), (0, _ramda.join)(''))(value);
26});
27var _default = trimCharsStart;
28exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.