UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

50 lines (36 loc) 1.1 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.readDirSyncIgnoreDsStore = readDirSyncIgnoreDsStore; exports.default = void 0; function _bluebird() { const data = require("bluebird"); _bluebird = function () { return data; }; return data; } function _fsExtra() { const data = _interopRequireDefault(require("fs-extra")); _fsExtra = function () { return data; }; return data; } var _default = /*#__PURE__*/function () { var _readDirIgnoreDsStore = (0, _bluebird().coroutine)(function* (dirPath) { const files = yield _fsExtra().default.readdir(dirPath); return files.filter(file => file !== '.DS_Store'); }); function readDirIgnoreDsStore(_x) { return _readDirIgnoreDsStore.apply(this, arguments); } return readDirIgnoreDsStore; }(); exports.default = _default; function readDirSyncIgnoreDsStore(dirPath) { const files = _fsExtra().default.readdirSync(dirPath); return files.filter(file => file !== '.DS_Store'); }