code: function rmdir(root, callback) {
  
    if (typeof root !== 'string') {
      throw new Error('missing root');
    } else if (typeof callback !== 'function') {
      throw new Error('missing callback');
    }
  
    var chunks = root.split(path.sep); // split in chunks
    var chunk = path.resolve(root); // build absolute path
    // remove "/" from head and tail
    if (chunks[0] === '') {
      chunks.shift();
    }
    if (chunks[chunks.length - 1] === '') {
      chunks.pop();
    }
  
    return rmdirRecursive(chunk, chunks, callback);
  }
docs: remove main. Check README.md
  
  @exports rmdir
  @function rmdir
  @param {String} root - pathname
  @param {Function} callback - next callback