source: node_modules/ramda-adjunct/lib/trimEnd.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.trimEndPonyfill = exports.trimEndInvoker = exports["default"] = void 0;
5var _ramda = require("ramda");
6var _String = _interopRequireDefault(require("./internal/ponyfills/String.trimEnd"));
7var _isFunction = _interopRequireDefault(require("./isFunction"));
8function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9var trimEndPonyfill = _String["default"];
10exports.trimEndPonyfill = trimEndPonyfill;
11var trimEndInvoker = (0, _ramda.invoker)(0, 'trimEnd');
12
13/**
14 * Removes whitespace from the end of a string.
15 *
16 * @func trimEnd
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 end
22 * @return {string} A new string representing the calling string stripped of whitespace from its end (right end).
23 * @see {@link RA.trimEnd|trimEnd}
24 * @example
25 *
26 * RA.trimEnd('abc '); //=> 'abc'
27 */
28exports.trimEndInvoker = trimEndInvoker;
29var trimEnd = (0, _isFunction["default"])(String.prototype.trimEnd) ? trimEndInvoker : trimEndPonyfill;
30var _default = trimEnd;
31exports["default"] = _default;
Note: See TracBrowser for help on using the repository browser.