Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
blond committed Apr 14, 2016
1 parent e571afd commit 4de4efd
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const walkers = require('./walkers');
* @param {object} options.levels The level map. The key is path to level, the value is options for this level.
* @param {object} options.defaults The options for levels by default.
* @param {object} options.defaults.naming Any options for `bem-naming`.
* @param {String} options.defaults.scheme The name of level scheme. Available values: `flat` or `nested`.
* @param {string} options.defaults.scheme The name of level scheme. Available values: `flat` or `nested`.
*
* @returns {stream} readable stream with info about found files and directories.
* @returns {module:stream.Readable} stream with info about found files and directories.
*/
module.exports = function (levels, options) {
options || (options = {});
Expand All @@ -28,13 +28,8 @@ module.exports = function (levels, options) {
const defaultWalker = (typeof defaults.scheme === 'string' ? walkers[defaults.scheme] : defaults.scheme)
|| walkers.nested;

const output = new Readable({ objectMode: true });

output._read = function () {};

function add(obj) {
output.push(obj);
}
const output = new Readable({ objectMode: true, read: () => {} });
const add = (obj) => output.push(obj);

function scan(level, callback) {
const config = levelConfigs[level];
Expand Down

0 comments on commit 4de4efd

Please sign in to comment.