Skip to content

Commit

Permalink
Replace _.trim with native JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 1, 2021
1 parent c32a7b7 commit c71f9af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/svg-sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ SVGSpriter.prototype.add = function (file, name, svg) {

// If no vinyl file object has been given
if (!this._isVinylFile(file)) {
file = _.trim(file);
file = file.trim();
var error = null;

// If the name part of the file path is absolute
Expand All @@ -96,8 +96,8 @@ SVGSpriter.prototype.add = function (file, name, svg) {

// Else
} else {
name = _.trimStart(_.trim(name), path.sep + '.') || path.basename(file);
svg = _.trim(svg);
name = _.trimStart(name.trim(), path.sep + '.') || path.basename(file);
svg = typeof svg === 'string' ? svg.trim() : svg;

// Argument validation
if (arguments.length < 3) {
Expand Down

0 comments on commit c71f9af

Please sign in to comment.