mirror of
https://github.com/thangisme/notes.git
synced 2026-07-26 13:24:11 -04:00
Initial commit
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var isglob = require('is-glob');
|
||||
|
||||
module.exports = function globParent(str) {
|
||||
str += 'a'; // preserves full path in case of trailing path separator
|
||||
do {str = path.dirname(str)} while (isglob(str));
|
||||
return str;
|
||||
};
|
||||
Reference in New Issue
Block a user