{"library":"attr-accept","type":"library","category":null,"description":"attr-accept is a lightweight JavaScript utility that implements the logic of the HTML5 `<input type=\"file\">` `accept` attribute. It provides a function to programmatically check if a given `File` object matches the criteria specified by an `accept` string, which can include MIME types (e.g., `image/*`, `application/pdf`), file extensions (e.g., `.jpg`, `.png`), and wildcards. The current stable version is 2.2.5. The library maintains a steady, though not rapid, release cadence, primarily focusing on bug fixes and minor improvements. Its key differentiator is providing a robust, standalone, and browser-compatible implementation of a browser's native file acceptance logic, making it suitable for custom file upload components, especially in libraries like react-dropzone.","language":"javascript","status":"active","version":"2.2.5","tags":["javascript","html5","input","tag","attribute","attr","accept","file","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install attr-accept","imports":["import attrAccept from 'attr-accept';","const attrAccept = require('attr-accept');","import type { File } from 'attr-accept'; // Type definition example, 'File' is a global type"]},{"cmd":"yarn add attr-accept","imports":[]},{"cmd":"pnpm add attr-accept","imports":[]}],"homepage":null,"github":"https://github.com/react-dropzone/attr-accept","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/attr-accept","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/attr-accept/compatibility"}}