trim-left-x
Advanced tools
Comparing version 4.0.20 to 4.0.21
import requireCoercibleToString from 'require-coercible-to-string-x'; | ||
import whiteSpace, { string2016 } from 'white-space-x'; | ||
import whiteSpace from 'white-space-x'; | ||
var EMPTY_STRING = ''; | ||
var RegExpCtr = /none/.constructor; | ||
var reLeft2016 = new RegExpCtr("^[".concat(string2016, "]+")); | ||
var reLeft = new RegExpCtr("^[".concat(whiteSpace, "]+")); | ||
var replace = EMPTY_STRING.replace; | ||
/** | ||
* This method removes whitespace from the left end of a string. (ES2016). | ||
* This method removes whitespace from the start of a string. (ES2019). | ||
* | ||
@@ -16,19 +15,8 @@ * @param {string} [string] - The string to trim the left end whitespace from. | ||
export function trimLeft2016(string) { | ||
return replace.call(requireCoercibleToString(string), reLeft2016, EMPTY_STRING); | ||
} | ||
/** | ||
* This method removes whitespace from the left end of a string. (ES2018). | ||
* | ||
* @param {string} [string] - The string to trim the left end whitespace from. | ||
* @throws {TypeError} If string is null or undefined or not coercible. | ||
* @returns {string} The left trimmed string. | ||
*/ | ||
var trimLeft2018 = function trimLeft2018(string) { | ||
var trimStart = function trimStart(string) { | ||
return replace.call(requireCoercibleToString(string), reLeft, EMPTY_STRING); | ||
}; | ||
export default trimLeft2018; | ||
export default trimStart; | ||
//# sourceMappingURL=trim-left-x.esm.js.map |
@@ -5,9 +5,9 @@ /*! | ||
"copywrite": "Copyright (c) 2017", | ||
"date": "2019-07-22T12:16:26.478Z", | ||
"date": "2019-07-23T23:44:45.624Z", | ||
"describe": "", | ||
"description": "This method removes whitespace from the left end of a string.", | ||
"file": "trim-left-x.js", | ||
"hash": "ad50f7cb71db075b69ec", | ||
"hash": "2118989b4cdcea226cec", | ||
"license": "MIT", | ||
"version": "4.0.20" | ||
"version": "4.0.21" | ||
} | ||
@@ -668,3 +668,2 @@ */ | ||
// CONCATENATED MODULE: ./dist/trim-left-x.esm.js | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trimLeft2016", function() { return trimLeft2016; }); | ||
@@ -674,7 +673,6 @@ | ||
var RegExpCtr = /none/.constructor; | ||
var reLeft2016 = new RegExpCtr("^[".concat(string2016, "]+")); | ||
var reLeft = new RegExpCtr("^[".concat(white_space_x_esm, "]+")); | ||
var replace = EMPTY_STRING.replace; | ||
/** | ||
* This method removes whitespace from the left end of a string. (ES2016). | ||
* This method removes whitespace from the start of a string. (ES2019). | ||
* | ||
@@ -686,18 +684,7 @@ * @param {string} [string] - The string to trim the left end whitespace from. | ||
function trimLeft2016(string) { | ||
return replace.call(require_coercible_to_string_x_esm(string), reLeft2016, EMPTY_STRING); | ||
} | ||
/** | ||
* This method removes whitespace from the left end of a string. (ES2018). | ||
* | ||
* @param {string} [string] - The string to trim the left end whitespace from. | ||
* @throws {TypeError} If string is null or undefined or not coercible. | ||
* @returns {string} The left trimmed string. | ||
*/ | ||
var trim_left_x_esm_trimLeft2018 = function trimLeft2018(string) { | ||
var trim_left_x_esm_trimStart = function trimStart(string) { | ||
return replace.call(require_coercible_to_string_x_esm(string), reLeft, EMPTY_STRING); | ||
}; | ||
/* harmony default export */ var trim_left_x_esm = __webpack_exports__["default"] = (trim_left_x_esm_trimLeft2018); | ||
/* harmony default export */ var trim_left_x_esm = __webpack_exports__["default"] = (trim_left_x_esm_trimStart); | ||
@@ -704,0 +691,0 @@ |
@@ -5,12 +5,12 @@ /*! | ||
"copywrite": "Copyright (c) 2017", | ||
"date": "2019-07-22T12:16:26.478Z", | ||
"date": "2019-07-23T23:44:45.624Z", | ||
"describe": "", | ||
"description": "This method removes whitespace from the left end of a string.", | ||
"file": "trim-left-x.min.js", | ||
"hash": "5c691e4076b07052704c", | ||
"hash": "41d4ac5b69fbd562b3c4", | ||
"license": "MIT", | ||
"version": "4.0.20" | ||
"version": "4.0.21" | ||
} | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.trimLeftX=t():e.trimLeftX=t()}(function(){"use strict";return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")()}(),function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";var n=Object.prototype.toString;if(r(1)()){var s=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==n.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&o.test(s.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},function(e,t,r){"use strict";(function(t){var n=t.Symbol,s=r(3);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&s())))}}).call(this,r(2))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0}},function(e,t,r){"use strict";r.r(t);for(var n=function(e){return null==e},s=function(e){if(n(e))throw new TypeError("Cannot call method on ".concat(e));return e},o=r(0),i=r.n(o),c="Cannot convert a Symbol value to a string",u=c.constructor,p=function(e){if(i()(e))throw new TypeError(c);return u(e)},f=function(e){return p(s(e))},a=[{code:9,description:"Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\t"},{code:10,description:"Line Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\n"},{code:11,description:"Vertical Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\v"},{code:12,description:"Form Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\f"},{code:13,description:"Carriage Return",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\r"},{code:32,description:"Space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:160,description:"No-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:5760,description:"Ogham space mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:6158,description:"Mongolian vowel separator",es5:!0,es2015:!0,es2016:!0,es2017:!1,es2018:!1,string:""},{code:8192,description:"En quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8193,description:"Em quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8194,description:"En space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8195,description:"Em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8196,description:"Three-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8197,description:"Four-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8198,description:"Six-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8199,description:"Figure space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8200,description:"Punctuation space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8201,description:"Thin space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8202,description:"Hair space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8232,description:"Line separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2028"},{code:8233,description:"Paragraph separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2029"},{code:8239,description:"Narrow no-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8287,description:"Medium mathematical space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:12288,description:"Ideographic space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:65279,description:"Byte Order Mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\ufeff"}],d="",l="",y=a.length,b=0;b<y;b+=1)a[b].es2016&&(d+=a[b].string),a[b].es2018&&(l+=a[b].string);var g=l,m=d;r.d(t,"trimLeft2016",function(){return h});var O="",j=/none/.constructor,S=new j("^[".concat(m,"]+")),v=new j("^[".concat(g,"]+")),w=O.replace;function h(e){return w.call(f(e),S,O)}t.default=function(e){return w.call(f(e),v,O)}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.trimLeftX=t():e.trimLeftX=t()}(function(){"use strict";return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")()}(),function(){return function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";var s=Object.prototype.toString;if(r(1)()){var n=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==s.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&o.test(n.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},function(e,t,r){"use strict";(function(t){var s=t.Symbol,n=r(3);e.exports=function(){return"function"==typeof s&&("function"==typeof Symbol&&("symbol"==typeof s("foo")&&("symbol"==typeof Symbol("bar")&&n())))}}).call(this,r(2))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var s=Object.getOwnPropertySymbols(e);if(1!==s.length||s[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},function(e,t,r){"use strict";r.r(t);for(var s=function(e){return null==e},n=function(e){if(s(e))throw new TypeError("Cannot call method on ".concat(e));return e},o=r(0),i=r.n(o),c="Cannot convert a Symbol value to a string",u=c.constructor,p=function(e){if(i()(e))throw new TypeError(c);return u(e)},f=function(e){return p(n(e))},a=[{code:9,description:"Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\t"},{code:10,description:"Line Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\n"},{code:11,description:"Vertical Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\v"},{code:12,description:"Form Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\f"},{code:13,description:"Carriage Return",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\r"},{code:32,description:"Space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:160,description:"No-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:5760,description:"Ogham space mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:6158,description:"Mongolian vowel separator",es5:!0,es2015:!0,es2016:!0,es2017:!1,es2018:!1,string:""},{code:8192,description:"En quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8193,description:"Em quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8194,description:"En space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8195,description:"Em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8196,description:"Three-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8197,description:"Four-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8198,description:"Six-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8199,description:"Figure space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8200,description:"Punctuation space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8201,description:"Thin space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8202,description:"Hair space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8232,description:"Line separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2028"},{code:8233,description:"Paragraph separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2029"},{code:8239,description:"Narrow no-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8287,description:"Medium mathematical space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:12288,description:"Ideographic space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:65279,description:"Byte Order Mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\ufeff"}],d="",l=a.length,y=0;y<l;y+=1)a[y].es2016&&a[y].string,a[y].es2018&&(d+=a[y].string);var b=new(0,/none/.constructor)("^[".concat(d,"]+")),g="".replace;t.default=function(e){return g.call(f(e),b,"")}}])}); | ||
//# sourceMappingURL=trim-left-x.min.js.map |
{ | ||
"name": "trim-left-x", | ||
"version": "4.0.20", | ||
"version": "4.0.21", | ||
"description": "This method removes whitespace from the left end of a string.", | ||
@@ -14,2 +14,3 @@ "homepage": "https://github.com/Xotic750/trim-left-x", | ||
"trimLeft", | ||
"trimStart", | ||
"module", | ||
@@ -53,4 +54,4 @@ "javascript", | ||
"dependencies": { | ||
"require-coercible-to-string-x": "^2.0.18", | ||
"white-space-x": "^4.0.16" | ||
"require-coercible-to-string-x": "^2.0.19", | ||
"white-space-x": "^4.0.17" | ||
}, | ||
@@ -69,3 +70,3 @@ "devDependencies": { | ||
"@babel/runtime": "^7.5.5", | ||
"@prorenata/eslint-config-vue": "^1.13.10", | ||
"@prorenata/eslint-config-vue": "^1.13.11", | ||
"@types/jest": "^24.0.15", | ||
@@ -93,4 +94,4 @@ "@types/node": "^12.6.8", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.13.0", | ||
"eslint-plugin-jsdoc": "^15.6.1", | ||
"eslint-plugin-jest": "^22.13.6", | ||
"eslint-plugin-jsdoc": "^15.7.1", | ||
"eslint-plugin-json": "^1.4.0", | ||
@@ -118,3 +119,3 @@ "eslint-plugin-lodash": "^5.1.0", | ||
"rimraf": "^2.6.3", | ||
"semver": "^6.2.0", | ||
"semver": "^6.3.0", | ||
"source-map-loader": "^0.2.4", | ||
@@ -124,3 +125,3 @@ "strip-ansi": "^5.2.0", | ||
"typescript": "^3.5.3", | ||
"webpack": "^4.36.1", | ||
"webpack": "^4.37.0", | ||
"webpack-bundle-analyzer": "^3.3.2", | ||
@@ -127,0 +128,0 @@ "webpack-cli": "^3.3.6", |
@@ -23,33 +23,10 @@ <a href="https://travis-ci.org/Xotic750/trim-left-x" | ||
## trim-left-x | ||
## trim-left-x (a.k.a trimStart in ES2019) | ||
This method removes whitespace from the left end of a string. | ||
This method removes whitespace from the start of a string. | ||
- [trim-left-x](#module_trim-left-x) | ||
- [`.trimLeft2016`](#module_trim-left-x.trimLeft2016) ⇒ <code>string</code> | ||
<a name="exp_module_math-trim-left-x--module.exports"></a> | ||
<a name="module_trim-left-x.trimLeft2016"></a> | ||
### `module.exports(string)` ⇒ <code>number</code> ⏏ | ||
### `trim-left-x.trimLeft2016` ⇒ <code>string</code> | ||
This method removes whitespace from the left end of a string. (ES2016) | ||
**Kind**: static property of [<code>trim-left-x</code>](#module_trim-left-x) | ||
**Returns**: <code>string</code> - The left trimmed string. | ||
**Throws**: | ||
- <code>TypeError</code> If string is null or undefined or not coercible. | ||
| Param | Type | Description | | ||
| ------ | ------------------- | ------------------------------------------------ | | ||
| string | <code>string</code> | The string to trim the left end whitespace from. | | ||
**Example** | ||
```js | ||
import {trimLeft2016} from 'trim-left-x'; | ||
console.log(trimLeft2016(' \t\na \t\n') === 'a \t\n'); // true | ||
``` | ||
<a name="module_trim-left-x"></a> | ||
@@ -59,3 +36,3 @@ | ||
This method removes whitespace from the left end of a string. (ES2018) | ||
This method removes whitespace from the left end of a string. (ES2019) | ||
@@ -75,5 +52,5 @@ **Kind**: static property of [<code>trim-left-x</code>](#module_trim-left-x) | ||
```js | ||
import trimLeft from 'trim-left-x'); | ||
import trimStart from 'trim-left-x'; | ||
console.log(trimLeft(' \t\na \t\n') === 'a \t\n'); // true | ||
console.log(trimStart(' \t\na \t\n') === 'a \t\n'); // true | ||
``` |
import requireCoercibleToString from 'require-coercible-to-string-x'; | ||
import whiteSpace, {string2016} from 'white-space-x'; | ||
import whiteSpace from 'white-space-x'; | ||
const EMPTY_STRING = ''; | ||
const RegExpCtr = /none/.constructor; | ||
const reLeft2016 = new RegExpCtr(`^[${string2016}]+`); | ||
const reLeft = new RegExpCtr(`^[${whiteSpace}]+`); | ||
const {replace} = EMPTY_STRING; | ||
/** | ||
* This method removes whitespace from the left end of a string. (ES2016). | ||
* This method removes whitespace from the start of a string. (ES2019). | ||
* | ||
@@ -17,17 +15,6 @@ * @param {string} [string] - The string to trim the left end whitespace from. | ||
*/ | ||
export function trimLeft2016(string) { | ||
return replace.call(requireCoercibleToString(string), reLeft2016, EMPTY_STRING); | ||
} | ||
/** | ||
* This method removes whitespace from the left end of a string. (ES2018). | ||
* | ||
* @param {string} [string] - The string to trim the left end whitespace from. | ||
* @throws {TypeError} If string is null or undefined or not coercible. | ||
* @returns {string} The left trimmed string. | ||
*/ | ||
const trimLeft2018 = function trimLeft2018(string) { | ||
const trimStart = function trimStart(string) { | ||
return replace.call(requireCoercibleToString(string), reLeft, EMPTY_STRING); | ||
}; | ||
export default trimLeft2018; | ||
export default trimStart; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82667
683
54