Skip to content

Commit

Permalink
[Refactor] remove string.prototype.trim
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 11, 2024
1 parent ca9e742 commit 2665605
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var forEach = require('array.prototype.foreach');
var entries = require('object.entries');
var warning = require('warning');
var has = require('hasown');
var trim = require('string.prototype.trim');

var warn = function warn(message) {
warning(false, message);
Expand Down Expand Up @@ -242,7 +241,7 @@ function transformPhrase(
options.smart_count
);

result = trim(texts[pluralTypeWithCount] || texts[0]);
result = defaultReplace.call(texts[pluralTypeWithCount] || texts[0], /^[^\S]*|[^\S]*$/g, '');
}

// Interpolate: Creates a `RegExp` object for each interpolation placeholder.
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"array.prototype.foreach": "^1.0.7",
"hasown": "^2.0.2",
"object.entries": "^1.1.8",
"string.prototype.trim": "^1.2.9",
"warning": "^4.0.3"
},
"devDependencies": {
Expand Down

0 comments on commit 2665605

Please sign in to comment.