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.
35 lines (28 loc) • 1.26 kB
JavaScript
exports.__esModule = true;
exports["default"] = exports.trimStartInvoker = exports.trimStartPolyfill = void 0;
var _ramda = require("ramda");
var _String = _interopRequireDefault(require("./internal/polyfills/String.trimStart"));
var _isFunction = _interopRequireDefault(require("./isFunction"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var trimStartPolyfill = _String["default"];
exports.trimStartPolyfill = trimStartPolyfill;
var trimStartInvoker = (0, _ramda.invoker)(0, 'trimStart');
/**
* Removes whitespace from the beginning of a string.
*
* @func trimStart
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
* @category String
* @sig String -> String
* @param {string} value String value to have the whitespace removed from the beginning
* @return {string} A new string representing the calling string stripped of whitespace from its beginning (left end).
* @example
*
* RA.trimStart(' abc'); //=> 'abc'
*/
exports.trimStartInvoker = trimStartInvoker;
var trimStart = (0, _isFunction["default"])(String.prototype.trimStart) ? trimStartInvoker : trimStartPolyfill;
var _default = trimStart;
exports["default"] = _default;
;