Initial commit
This commit is contained in:
30
node_modules/junk/index.js
generated
vendored
Normal file
30
node_modules/junk/index.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
// // All
|
||||
// /^npm-debug\.log$/, // npm error log
|
||||
// /^\..*\.swp$/, // vim state
|
||||
// // macOS
|
||||
// /^\.DS_Store$/, // stores custom folder attributes
|
||||
// /^\.AppleDouble$/, // stores additional file resources
|
||||
// /^\.LSOverride$/, // contains the absolute path to the app to be used
|
||||
// /^Icon\r$/, // custom Finder icon: http://superuser.com/questions/298785/icon-file-on-os-x-desktop
|
||||
// /^\._.*/, // thumbnail
|
||||
// /^\.Spotlight-V100$/, // file that might appear on external disk
|
||||
// /\.Trashes/, // file that might appear on external disk
|
||||
// /^__MACOSX$/, // resource fork
|
||||
// // Linux
|
||||
// /~$/, // backup file
|
||||
// // Windows
|
||||
// /^Thumbs\.db$/, // image file cache
|
||||
// /^ehthumbs\.db$/, // folder config file
|
||||
// /^Desktop\.ini$/ // stores custom folder attributes
|
||||
|
||||
exports.re = /^npm-debug\.log$|^\..*\.swp$|^\.DS_Store$|^\.AppleDouble$|^\.LSOverride$|^Icon\r$|^\._.*|^\.Spotlight-V100$|\.Trashes|^__MACOSX$|~$|^Thumbs\.db$|^ehthumbs\.db$|^Desktop\.ini$/;
|
||||
|
||||
exports.is = function (filename) {
|
||||
return exports.re.test(filename);
|
||||
};
|
||||
|
||||
exports.not = exports.isnt = function (filename) {
|
||||
return !exports.is(filename);
|
||||
};
|
21
node_modules/junk/license
generated
vendored
Normal file
21
node_modules/junk/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
37
node_modules/junk/package.json
generated
vendored
Normal file
37
node_modules/junk/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "junk",
|
||||
"version": "1.0.3",
|
||||
"description": "Filter out OS junk files like .DS_Store and Thumbs.db",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/junk",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"junk",
|
||||
"trash",
|
||||
"garbage",
|
||||
"files",
|
||||
"os",
|
||||
"ignore",
|
||||
"exclude",
|
||||
"filter",
|
||||
"temp",
|
||||
"tmp"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
46
node_modules/junk/readme.md
generated
vendored
Normal file
46
node_modules/junk/readme.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# junk [](https://travis-ci.org/sindresorhus/junk)
|
||||
|
||||
> Filter out [OS junk files](test.js) like `.DS_Store` and `Thumbs.db`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save junk
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fs = require('fs');
|
||||
var junk = require('junk');
|
||||
|
||||
fs.readdir('path', function (err, files) {
|
||||
console.log(files);
|
||||
//=> ['.DS_Store', 'test.jpg']
|
||||
|
||||
console.log(files.filter(junk.not));
|
||||
//=> ['test.jpg']
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### junk.is(filename)
|
||||
|
||||
Returns true if `filename` matches a junk file.
|
||||
|
||||
### junk.not(filename)
|
||||
|
||||
Returns true if `filename` doesn't match a junk file.
|
||||
|
||||
### junk.re
|
||||
|
||||
The regex used for matching.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
Reference in New Issue
Block a user