Skip to content

Commit

Permalink
Update: Use remove-trailing-separator standalone module (closes #114) (
Browse files Browse the repository at this point in the history
  • Loading branch information
darsain authored and phated committed Sep 26, 2016
1 parent d466540 commit 768b408
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var path = require('path');
var clone = require('clone');
var cloneStats = require('clone-stats');
var cloneBuffer = require('./lib/cloneBuffer');
var stripTrailingSep = require('./lib/stripTrailingSep');
var removeTrailingSep = require('remove-trailing-separator');
var isBuffer = require('./lib/isBuffer');
var isStream = require('./lib/isStream');
var isNull = require('./lib/isNull');
Expand Down Expand Up @@ -192,7 +192,7 @@ Object.defineProperty(File.prototype, 'cwd', {
if (!cwd || typeof cwd !== 'string') {
throw new Error('cwd must be a non-empty string.');
}
this._cwd = stripTrailingSep(normalize(cwd));
this._cwd = removeTrailingSep(normalize(cwd));
},
});

Expand All @@ -208,7 +208,7 @@ Object.defineProperty(File.prototype, 'base', {
if (typeof base !== 'string' || !base) {
throw new Error('base must be a non-empty string, or null/undefined.');
}
base = stripTrailingSep(normalize(base));
base = removeTrailingSep(normalize(base));
if (base !== this._cwd) {
this._base = base;
}
Expand Down Expand Up @@ -297,7 +297,7 @@ Object.defineProperty(File.prototype, 'path', {
if (typeof path !== 'string') {
throw new Error('path should be a string.');
}
path = stripTrailingSep(normalize(path));
path = removeTrailingSep(normalize(path));

// Record history only when path changed
if (path && path !== this.path) {
Expand All @@ -316,7 +316,7 @@ Object.defineProperty(File.prototype, 'symlink', {
throw new Error('symlink should be a string');
}

this._symlink = stripTrailingSep(normalize(symlink));
this._symlink = removeTrailingSep(normalize(symlink));
},
});

Expand Down
11 changes: 0 additions & 11 deletions lib/stripTrailingSep.js

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"clone-stats": "^1.0.0",
"cloneable-readable": "^0.5.0",
"readable-stream": "^2.1.0",
"remove-trailing-separator": "^1.0.0",
"replace-ext": "^1.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 768b408

Please sign in to comment.