{"library":"react-native-mime-types","type":"library","category":null,"description":"react-native-mime-types is a focused utility for identifying and managing MIME (Multipurpose Internet Mail Extensions) types within React Native applications. It provides core functions like `lookup` to determine content types from file extensions or paths, `contentType` to construct full Content-Type headers, and `extension` to find the default file extension for a given MIME type. Unlike the general-purpose `node-mime` library, this package explicitly returns `false` for unknown types instead of providing naive fallbacks, requiring developers to implement their own fallback logic. It operates purely functionally, eschewing `new Mime()` constructors or a `.define()` API for adding custom types; all type definitions are sourced from the comprehensive `mime-db` project. The current stable version is 2.5.0, and it receives updates as needed, often reflecting changes in `mime-db`. Its primary differentiator is its simplicity and explicit behavior regarding unknown types, making it predictable for React Native environments.","language":"javascript","status":"active","version":"2.5.0","tags":["javascript","mime","types","typescript"],"install":[{"cmd":"npm install react-native-mime-types","imports":["import * as mime from 'react-native-mime-types';","const mime = require('react-native-mime-types');","import * as mime from 'react-native-mime-types';\nmime.lookup('file.json');"]},{"cmd":"yarn add react-native-mime-types","imports":[]},{"cmd":"pnpm add react-native-mime-types","imports":[]}],"homepage":null,"github":"https://github.com/Liroo/react-native-mime-types","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/react-native-mime-types","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/react-native-mime-types/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}