'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isDirEmpty;

var _fs;

function _load_fs() {
  return _fs = _interopRequireDefault(require('fs'));
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function isDirEmpty(dirPath, cb) {
  (_fs || _load_fs()).default.readdir(dirPath, function (err, files) {
    if (err) throw err;
    if (!files.length) return cb(true);
    return cb(false);
  });
}