Socket
Socket
Sign inDemoInstall

ext-list

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

LICENSE.md

20

index.js
'use strict';
var fs = require('fs');
var path = require('path');
/**
* Export ext-list as an object
*
* @api public
*/
module.exports = function () {
var json = fs.readFileSync(path.join(__dirname, 'ext-list.json'));
return JSON.parse(json);
return require('./ext-list.json');
};
/**
* Export the path to the JSON file
*
* @api public
*/
module.exports.path = path.join(__dirname, 'ext-list.json');
{
"name": "ext-list",
"version": "2.0.0",
"version": "2.1.0",
"description": "List of known file extensions and their MIME types",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -16,7 +16,4 @@ # ext-list [![Build Status](https://travis-ci.org/kevva/ext-list.svg?branch=master)](https://travis-ci.org/kevva/ext-list)

console.log(extList());
extList();
//=> { '123': 'application/vnd.lotus-1-2-3', ez: 'application/andrew-inset', aw: 'application/applixware', ... }
console.log(extList.path);
//=> /path/to/ext-list.json
```

@@ -23,0 +20,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc