[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2960":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":16,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},2960,"Modernizr","Modernizr\u002FModernizr","Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmodernizr",null,"JavaScript",25665,2940,867,172,0,1,8,71.3,"MIT License",false,"master",true,[24,25,26,27,28,29],"css3-features","feature-detection","hacktoberfest","javascript","javascript-library","modernizr","2026-06-12 04:00:16","\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmodernizr\" rel=\"noopener\" target=\"_blank\">\u003Cimg alt=\"Modernizr\" src=\".\u002Fmedia\u002FModernizr-2-Logo-vertical-medium.png\" width=\"250\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cdiv align=\"center\">\n  \n##### Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.\n  \n[![npm version](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002Fmodernizr.svg)](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002Fmodernizr)\n[![Build Status](https:\u002F\u002Fgithub.com\u002FModernizr\u002FModernizr\u002Fworkflows\u002FTesting\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FModernizr\u002FModernizr\u002Factions)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002FModernizr\u002FModernizr\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002FModernizr\u002FModernizr)\n[![Inline docs](https:\u002F\u002Finch-ci.org\u002Fgithub\u002FModernizr\u002FModernizr.svg?branch=master)](https:\u002F\u002Finch-ci.org\u002Fgithub\u002FModernizr\u002FModernizr)\n\n\u003C\u002Fdiv>\n\n- Read this file in Portuguese-BR [here](\u002FREADME.pt_br.md)\n- Read this file in Indonesian [here](\u002FREADME.id.md)\n- Read this file in Spanish [here](\u002FREADME.sp.md)\n- Read this file in Swedish [here](\u002FREADME.sv.md)\n- Read this file in Tamil [here](\u002FREADME.ta.md)\n- Read this file in Kannada [here](\u002FREADME.ka.md)\n- Read this file in Hindi [here](\u002FREADME.hi.md)\n\n- Our Website is outdated and broken, please DO NOT use it (https:\u002F\u002Fmodernizr.com) but rather build your modernizr version from npm.\n- [Documentation](https:\u002F\u002Fmodernizr.com\u002Fdocs\u002F)\n- [Integration tests](https:\u002F\u002Fmodernizr.github.io\u002FModernizr\u002Ftest\u002Fintegration.html)\n- [Unit tests](https:\u002F\u002Fmodernizr.github.io\u002FModernizr\u002Ftest\u002Funit.html)\n\nModernizr tests which native CSS3 and HTML5 features are available in the current UA and makes the results available to you in two ways: as properties on a global `Modernizr` object, and as classes on the `\u003Chtml>` element. This information allows you to progressively enhance your pages with a granular level of control over the experience.\n\n## Breaking changes with v4\n\n- Dropped support for node versions \u003C= 10, please upgrade to at least version 12\n\n- Following tests got renamed:\n\n  - `class` to `es6class` to keep in line with the rest of the es-tests\n\n- Following tests got moved in subdirectories:\n\n  - `cookies`, `indexeddb`, `indexedblob`, `quota-management-api`, `userdata` moved into the storage subdirectory\n  - `audio` moved into the audio subdirectory\n  - `battery` moved into the battery subdirectory\n  - `canvas`, `canvastext` moved into the canvas subdirectory\n  - `customevent`, `eventlistener`, `forcetouch`, `hashchange`, `pointerevents`, `proximity` moved into the event subdirectory\n  - `exiforientation` moved into the image subdirectory\n  - `capture`, `fileinput`, `fileinputdirectory`, `formatattribute`, `input`, `inputnumber-l10n`, `inputsearchevent`, `inputtypes`, `placeholder`, `requestautocomplete`, `validation` moved into the input subdirectory\n  - `svg` moved into the svg subdirectory\n  - `webgl` moved into the webgl subdirectory\n\n- Following tests got removed:\n\n  - `touchevents`: [discussion](https:\u002F\u002Fgithub.com\u002FModernizr\u002FModernizr\u002Fpull\u002F2432)\n  - `unicode`: [discussion](https:\u002F\u002Fgithub.com\u002FModernizr\u002FModernizr\u002Fissues\u002F2468)\n  - `templatestrings`: duplicate of the es6 detect `stringtemplate`\n  - `contains`: duplicate of the es6 detect `es6string`\n  - `datalistelem`: A dupe of Modernizr.input.list\n\n## New Asynchronous Event Listeners\n\nOften times people want to know when an asynchronous test is done so they can allow their application to react to it.\nIn the past, you've had to rely on watching properties or `\u003Chtml>` classes. Only events on **asynchronous** tests are\nsupported. Synchronous tests should be handled synchronously to improve speed and to maintain consistency.\n\nThe new API looks like this:\n\n```js\n\u002F\u002F Listen to a test, give it a callback\nModernizr.on(\"testname\", function (result) {\n  if (result) {\n    console.log(\"The test passed!\");\n  } else {\n    console.log(\"The test failed!\");\n  }\n});\n```\n\nWe guarantee that we'll only invoke your function once (per time that you call `on`). We are currently not exposing\na method for exposing the `trigger` functionality. Instead, if you'd like to have control over async tests, use the\n`src\u002FaddTest` feature, and any test that you set will automatically expose and trigger the `on` functionality.\n\n## Getting Started\n\n- Clone or download the repository\n- Install project dependencies with `npm install`\n\n## Building Modernizr\n\n### From javascript\n\nModernizr can be used programmatically via npm:\n\n```js\nvar modernizr = require(\"modernizr\");\n```\n\nA `build` method is exposed for generating custom Modernizr builds. Example:\n\n```javascript\nvar modernizr = require(\"modernizr\");\n\nmodernizr.build({}, function (result) {\n  console.log(result); \u002F\u002F the build\n});\n```\n\nThe first parameter takes a JSON object of options and feature-detects to include. See [`lib\u002Fconfig-all.json`](lib\u002Fconfig-all.json) for all available options.\n\nThe second parameter is a function invoked on task completion.\n\n### From the command-line\n\nWe also provide a command line interface for building modernizr.\nTo see all available options run:\n\n```shell\n.\u002Fbin\u002Fmodernizr\n```\n\nOr to generate everything in 'config-all.json' run this with npm:\n\n```shell\nnpm start\n\u002F\u002Foutputs to .\u002Fdist\u002Fmodernizr-build.js\n```\n\n## Testing Modernizr\n\nTo execute the tests using mocha-headless-chrome on the console run:\n\n```shell\nnpm test\n```\n\nYou can also run tests in your browser of choice with this command:\n\n```shell\nnpm run serve-gh-pages\n```\n\nand navigate to these two URLs:\n\n```shell\nhttp:\u002F\u002Flocalhost:8080\u002Ftest\u002Funit.html\nhttp:\u002F\u002Flocalhost:8080\u002Ftest\u002Fintegration.html\n```\n\n## Integrating Modernizr with Build Tools\n\nThis section provides guidance on how to integrate Modernizr with various build tools and frameworks, making it easier to use in your projects.\n\n### 1. Integrating with Webpack\n\nTo integrate Modernizr with Webpack, follow these steps:\n\n1. **Install Modernizr**:\n   ```bash\n   npm install modernizr --save\n   ```\n\n2. **Create a Modernizr Configuration File**:\n   Create a file named `modernizr-config.js` in your project root:\n   ```javascript\n   module.exports = {\n     \"feature-detects\": [\n       \"test\u002Ffeature1\",\n       \"test\u002Ffeature2\",\n       \u002F\u002F Add more feature detects as needed\n     ]\n   };\n   ```\n\n3. **Update Webpack Configuration**:\n   Modify your Webpack configuration file (e.g., `webpack.config.js`) to include the Modernizr plugin:\n   ```javascript\n   const ModernizrWebpackPlugin = require('modernizr-webpack-plugin');\n\n   module.exports = {\n     \u002F\u002F Other configurations...\n     plugins: [\n       new ModernizrWebpackPlugin({\n         \"feature-detects\": [\n           \"test\u002Ffeature1\",\n           \"test\u002Ffeature2\"\n         ]\n       })\n     ]\n   };\n   ```\n\n4. **Build Your Project**:\n   Run your Webpack build process:\n   ```bash\n   npm run build\n   ```\n\n### 2. Integrating with Gulp\n\nIf you are using Gulp, you can integrate Modernizr as follows:\n\n1. **Install Modernizr**:\n   ```bash\n   npm install modernizr --save-dev\n   ```\n\n2. **Create a Gulp Task**:\n   In your `gulpfile.js`, add a task to build Modernizr:\n   ```javascript\n   const gulp = require('gulp');\n   const modernizr = require('modernizr');\n\n   gulp.task('modernizr', function() {\n     return modernizr.build({\n       \"feature-detects\": [\n         \"test\u002Ffeature1\",\n         \"test\u002Ffeature2\"\n       ]\n     }).pipe(gulp.dest('dist\u002F'));\n   });\n   ```\n\n3. **Run the Gulp Task**:\n   Execute the task to generate the Modernizr build:\n   ```bash\n   gulp modernizr\n   ```\n\n### 3. Integrating with Parcel\n\nFor projects using Parcel, you can integrate Modernizr as follows:\n\n1. **Install Modernizr**:\n   ```bash\n   npm install modernizr --save\n   ```\n\n2. **Create a Modernizr Configuration File**:\n   Similar to the Webpack setup, create a `modernizr-config.js` file:\n   ```javascript\n   module.exports = {\n     \"feature-detects\": [\n       \"test\u002Ffeature1\",\n       \"test\u002Ffeature2\"\n     ]\n   };\n   ```\n\n3. **Update Parcel Configuration**:\n   You can use a plugin like `parcel-plugin-modernizr` to integrate Modernizr:\n   ```bash\n   npm install parcel-plugin-modernizr --save-dev\n   ```\n\n4. **Build Your Project**:\n   Run Parcel to build your project:\n   ```bash\n   parcel build index.html\n   ```\n\n### Conclusion\n\nIntegrating Modernizr with your build tools can enhance your web applications by allowing you to detect and respond to the capabilities of the user's browser. Follow the steps above to set up Modernizr with your preferred build tool.\n\nFor more information, refer to the [Modernizr documentation](https:\u002F\u002Fmodernizr.com\u002Fdocs\u002F).\n\n## Code of Conduct\n\nThis project adheres to the [Open Code of Conduct](https:\u002F\u002Fgithub.com\u002FModernizr\u002FModernizr\u002Fblob\u002Fmaster\u002F.github\u002FCODE_OF_CONDUCT.md).\nBy participating, you are expected to honor this code.\n\n## License\n\n[MIT License](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n","Modernizr 是一个 JavaScript 库，用于检测用户浏览器中支持的 HTML5 和 CSS3 特性。它通过将检测结果作为全局 `Modernizr` 对象的属性以及 `\u003Chtml>` 元素上的类名提供给开发者，从而允许网页开发者根据浏览器的功能进行渐进增强。Modernizr 支持广泛的特性检测，包括但不限于存储、音频、电池状态、画布操作等，并且能够帮助开发者以更细粒度的方式控制用户体验。适用于需要根据客户端浏览器能力来调整功能或样式的所有前端开发场景。",2,"2026-06-11 02:51:55","top_language"]