~ubuntu-branches/ubuntu/trusty/node-mime/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/00-fix_support_files_location.patch/mime.js

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2012-03-22 22:34:09 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120322223409-kfsifcp9fy2tvp50
Tags: 1.2.5-1
* New upstream version
* Added debian/watch
* Standards-Version bump to 3.9.3, no changes needed
* Update debian/copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    fs = require('fs');
3
3
 
4
4
var mime = module.exports = {
5
 
  /** Map of extension to mime type */
6
 
  types: {},
 
5
  // Map of extension to mime type
 
6
  types: Object.create(null),
7
7
 
8
 
  /** Map of mime type to extension */
9
 
  extensions :{},
 
8
  // Map of mime type to extension
 
9
  extensions :Object.create(null),
10
10
 
11
11
  /**
12
12
   * Define mimetype -> extension mappings.  Each key is a mime-type that maps
60
60
   */
61
61
  lookup: function(path, fallback) {
62
62
    var ext = path.replace(/.*[\.\/]/, '').toLowerCase();
63
 
    return mime.types[ext] || fallback || mime.default_type;
 
63
 
 
64
    return mime.types[ext] || fallback || mime.default_type
64
65
  },
65
66
 
66
67
  /**