{"library":"simple-mime","title":"simple-mime","description":"A minimal mime type lookup library for Node.js, providing a simple function to map file extensions to MIME types. Version 0.1.0 is the current stable release. It focuses on being lightweight and dependency-free, unlike the more feature-rich `mime` package. Ideal for small static file servers where minimalism is preferred.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install simple-mime"],"cli":null},"imports":["var getMimeType = require('simple-mime')('application/octet-stream')","var type = getMimeType('file.mp3')","import createMime from 'simple-mime'; const getMimeType = createMime('application/octet-stream')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"var getMimeType = require('simple-mime')('text/plain');\nconsole.log(getMimeType('file.html')); // 'text/html'\nconsole.log(getMimeType('file.js'));   // 'application/javascript'\nconsole.log(getMimeType('file.xyz'));  // 'text/plain' (fallback)","lang":"javascript","description":"Shows how to instantiate the mime lookup function with a fallback and query for different files.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}