Skip to content
Permalink
Browse files

fix: Ponyfill for Object.values

  • Loading branch information...
iamthes committed Nov 14, 2017
1 parent 47406f6 commit cb7cabe7cb03e15dfa16d897198cccf88f052d45
Showing with 3 additions and 1 deletion.
  1. +1 −0 package.json
  2. +2 −1 src/directory.ts
@@ -30,6 +30,7 @@
"commit": "git-cz"
},
"dependencies": {
"object-values": "^1.0.0",
"resolve": "^1.5.0",
"tslib": "^1.8.0",
"typescript": "^2.6.1"
@@ -2,6 +2,7 @@ import { readdir, stat } from 'fs';
import { Entry } from './entry';
import { file as parse } from './file';
import { extname, resolve as resolvePath, parse as parsePath } from 'path';
const objectValues = require('object-values');

export const findFileExtensions = ['.ts', '.d.ts', '.js', '.tsx', '.jsx'];
const ignoreDirectoryList = ['node_modules'];
@@ -53,7 +54,7 @@ export function directory(path: string, options: DirectoryOptions = {}): Promise
}
count--;
if (count === 0) {
done({ directories, files: Object.values(names).map(([, file]) => file) });
done({ directories, files: objectValues(names).map(([, file]) => file) });
}
});
});

0 comments on commit cb7cabe

Please sign in to comment.
You can’t perform that action at this time.