UNPKG

nyc-bytes

Version:

A node.js module for working with NYC's BYTES of the BIG APPLE datasets.

11 lines (9 loc) 238 B
const glob = require('glob'); module.exports = function(filePath) { return new Promise((resolve, reject) => { glob(filePath, (err, res) => { if (err) { return reject(err); } return resolve(res.length); }); }); };