index.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. // // All
  3. // /^npm-debug\.log$/, // npm error log
  4. // /^\..*\.swp$/, // vim state
  5. // // OS X
  6. // /^\.DS_Store$/, // stores custom folder attributes
  7. // /^\.AppleDouble$/, // stores additional file resources
  8. // /^\.LSOverride$/, // contains the absolute path to the app to be used
  9. // /^Icon[\r\?]?/, // custom Finder icon
  10. // /^\._.*/, // thumbnail
  11. // /^.Spotlight-V100$/, // file that might appear on external disk
  12. // /\.Trashes/, // file that might appear on external disk
  13. // /^__MACOSX$/, // resource fork
  14. // // Linux
  15. // /~$/, // backup file
  16. // // Windows
  17. // /^Thumbs\.db$/, // image file cache
  18. // /^ehthumbs\.db$/, // folder config file
  19. // /^Desktop\.ini$/ // stores custom folder attributes
  20. exports.re = /^npm-debug\.log$|^\..*\.swp$|^\.DS_Store$|^\.AppleDouble$|^\.LSOverride$|^Icon[\r\?]?|^\._.*|^.Spotlight-V100$|\.Trashes|^__MACOSX$|~$|^Thumbs\.db$|^ehthumbs\.db$|^Desktop\.ini$/;
  21. exports.is = function (filename) {
  22. return exports.re.test(filename);
  23. };
  24. exports.not = exports.isnt = function (filename) {
  25. return !exports.is(filename);
  26. };