Comparing version 3.0.0 to 3.1.0
@@ -9,2 +9,21 @@ declare const junk: { | ||
Returns `true` if `filename` doesn't match a junk file. | ||
@example | ||
``` | ||
import {promisify} from 'util'; | ||
import * as fs from 'fs'; | ||
import junk = require('junk'); | ||
const pReaddir = promisify(fs.readdir); | ||
(async () => { | ||
const files = await pReaddir('some/path'); | ||
console.log(files); | ||
//=> ['.DS_Store', 'test.jpg'] | ||
console.log(files.filter(junk.not)); | ||
//=> ['test.jpg'] | ||
})(); | ||
``` | ||
*/ | ||
@@ -17,4 +36,7 @@ not(filename: string): boolean; | ||
readonly regex: RegExp; | ||
// TODO: Remove this for the next major release | ||
default: typeof junk; | ||
}; | ||
export default junk; | ||
export = junk; |
@@ -38,2 +38,3 @@ 'use strict'; | ||
// TODO: Remove this for the next major release | ||
exports.default = module.exports; |
{ | ||
"name": "junk", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Filter out system junk files like .DS_Store and Thumbs.db", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -39,6 +39,6 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"tsd-check": "^0.5.0", | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.1", | ||
"xo": "^0.24.0" | ||
} | ||
} |
4557
61