source: node_modules/ramda-adjunct/lib/trimStart.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: 1.2 KB
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports.trimStartPonyfill = exports.trimStartInvoker = exports["default"] = void 0;
5var _ramda = require("ramda");
6var _String = _interopRequireDefault(require("./internal/ponyfills/String.trimStart"));
7var _isFunction = _interopRequireDefault(require("./isFunction"));
8function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9var trimStartPonyfill = _String["default"];
10exports.trimStartPonyfill = trimStartPonyfill;
11var trimStartInvoker = (0, _ramda.invoker)(0, 'trimStart');
12
13/**
14 * Removes whitespace from the beginning of a string.
15 *
16 * @func trimStart
17 * @memberOf RA
18 * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
19 * @category String
20 * @sig String -> String
21 * @param {string} value String value to have the whitespace removed from the beginning
22 * @return {string} A new string representing the calling string stripped of whitespace from its beginning (left end).
23 * @example
24 *
25 * RA.trimStart(' abc'); //=> 'abc'
26 */
27exports.trimStartInvoker = trimStartInvoker;
28var trimStart = (0, _isFunction["default"])(String.prototype.trimStart) ? trimStartInvoker : trimStartPonyfill;
29var _default = trimStart;
30exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.