gift-card-server/node_modules/glob-parent/index.js
Rodrigo Pedroso 3ac017a5ad Commit project
2019-06-19 10:46:14 -04:00

10 lines
259 B
JavaScript

'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;
};