Skip to content

Commit cdbea5f

Browse files
es128phated
authored andcommitted
feat: use path-dirname ponyfill
1 parent 65249f9 commit cdbea5f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
var path = require('path');
44
var isglob = require('is-glob');
5+
var pathDirname = require('path-dirname');
56

67
module.exports = function globParent(str) {
78
str += 'a'; // preserves full path in case of trailing path separator
8-
do {str = path.dirname(str)} while (isglob(str));
9+
do {str = pathDirname.posix(str)} while (isglob(str));
910
return str;
1011
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
},
2929
"homepage": "https://github.com/es128/glob-parent",
3030
"dependencies": {
31-
"is-glob": "^3.1.0"
31+
"is-glob": "^3.1.0",
32+
"path-dirname": "^1.0.0"
3233
},
3334
"devDependencies": {
3435
"coveralls": "^2.11.2",

0 commit comments

Comments
 (0)