source: node_modules/ramda-adjunct/es/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: 828 bytes
Line 
1import { invoker } from 'ramda';
2import ponyfill from './internal/ponyfills/String.trimStart';
3import isFunction from './isFunction';
4export var trimStartPonyfill = ponyfill;
5export var trimStartInvoker = invoker(0, 'trimStart');
6
7/**
8 * Removes whitespace from the beginning of a string.
9 *
10 * @func trimStart
11 * @memberOf RA
12 * @since {@link https://char0n.github.io/ramda-adjunct/2.22.0|v2.22.0}
13 * @category String
14 * @sig String -> String
15 * @param {string} value String value to have the whitespace removed from the beginning
16 * @return {string} A new string representing the calling string stripped of whitespace from its beginning (left end).
17 * @example
18 *
19 * RA.trimStart(' abc'); //=> 'abc'
20 */
21
22var trimStart = isFunction(String.prototype.trimStart) ? trimStartInvoker : trimStartPonyfill;
23export default trimStart;
Note: See TracBrowser for help on using the repository browser.