Front end of the Slack clone application.

index.js 259B

1234567891011
  1. 'use strict';
  2. var path = require('path');
  3. var isglob = require('is-glob');
  4. module.exports = function globParent(str) {
  5. str += 'a'; // preserves full path in case of trailing path separator
  6. do {str = path.dirname(str)} while (isglob(str));
  7. return str;
  8. };