string.prototype.trimleft
Advanced tools
Comparing version 2.1.1 to 2.1.2
'use strict'; | ||
var bind = require('function-bind'); | ||
var replace = bind.call(Function.call, String.prototype.replace); | ||
/* eslint-disable no-control-regex */ | ||
var leftWhitespace = /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*/; | ||
/* eslint-enable no-control-regex */ | ||
module.exports = function trimLeft() { | ||
return replace(this, leftWhitespace, ''); | ||
}; | ||
module.exports = require('string.prototype.trimstart/implementation'); |
'use strict'; | ||
var bind = require('function-bind'); | ||
var callBind = require('es-abstract/helpers/callBind'); | ||
var define = require('define-properties'); | ||
@@ -10,3 +10,3 @@ | ||
var bound = bind.call(Function.call, getPolyfill()); | ||
var bound = callBind(getPolyfill()); | ||
@@ -13,0 +13,0 @@ define(bound, { |
{ | ||
"name": "string.prototype.trimleft", | ||
"version": "2.1.1", | ||
"author": "Jordan Harband", | ||
"version": "2.1.2", | ||
"author": "Jordan Harband <ljharb@gmail.com>", | ||
"funding": { | ||
"url": "https://github.com/sponsors/ljharb" | ||
}, | ||
"description": "ES7 spec-compliant String.prototype.trimLeft shim.", | ||
"description": "ES2019 spec-compliant String.prototype.trimLeft shim.", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"prepublish": "safe-publish-latest", | ||
"pretest": "npm run lint && es-shim-api --bound", | ||
@@ -29,6 +30,9 @@ "test": "npm run tests-only", | ||
"ES7", | ||
"ES2019", | ||
"shim", | ||
"trim", | ||
"trimLeft", | ||
"trimStart", | ||
"trimRight", | ||
"trimEnd", | ||
"polyfill", | ||
@@ -39,11 +43,13 @@ "es-shim API" | ||
"define-properties": "^1.1.3", | ||
"function-bind": "^1.1.1" | ||
"es-abstract": "^1.17.5", | ||
"string.prototype.trimstart": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@es-shims/api": "^2.1.2", | ||
"@ljharb/eslint-config": "^15.0.2", | ||
"@ljharb/eslint-config": "^16.0.0", | ||
"covert": "^1.1.1", | ||
"eslint": "^6.7.2", | ||
"functions-have-names": "^1.2.0", | ||
"tape": "^4.12.0" | ||
"eslint": "^6.8.0", | ||
"functions-have-names": "^1.2.1", | ||
"safe-publish-latest": "^1.1.4", | ||
"tape": "^5.0.0-next.4" | ||
}, | ||
@@ -50,0 +56,0 @@ "testling": { |
@@ -13,3 +13,3 @@ String.prototype.trimLeft <sup>[![Version Badge][npm-version-svg]][package-url]</sup> | ||
A spec-proposal-compliant `String.prototype.trimLeft` shim. Invoke its "shim" method to shim `String.prototype.trimLeft` if it is unavailable. | ||
An ES2019-spec-compliant `String.prototype.trimLeft` shim. Invoke its "shim" method to shim `String.prototype.trimLeft` if it is unavailable. | ||
@@ -16,0 +16,0 @@ This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. |
@@ -10,3 +10,3 @@ 'use strict'; | ||
var defineProperties = require('define-properties'); | ||
var bind = require('function-bind'); | ||
var callBind = require('es-abstract/helpers/callBind'); | ||
var isEnumerable = Object.prototype.propertyIsEnumerable; | ||
@@ -35,5 +35,5 @@ var functionsHaveNames = require('functions-have-names')(); | ||
runTests(bind.call(Function.call, String.prototype.trimLeft), t); | ||
runTests(callBind(String.prototype.trimLeft), t); | ||
t.end(); | ||
}); |
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
11571
16
3
7
103
+ Addedes-abstract@^1.17.5
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addedes-abstract@1.23.5(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.2.1(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.2(transitive)
+ Addedtyped-array-length@1.0.6(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
- Removedfunction-bind@^1.1.1