modernizr-scrumw 1.0.0
Install from the command line:
Learn more about npm packages
$ npm install @u-next/modernizr-scrumw@1.0.0
Install via package.json:
"@u-next/modernizr-scrumw": "1.0.0"
About this version
Modernizr-scrumw is a JavaScript library for scrumw team which provides feature detection for HTML5, CSS3, JavaScript, and browser-common functionalities. These tests help us create adaptable web experiences by identifying supported features in users' devices. Its original version comes from https://modernizr.com/docs/.
Initially, we want to generate a report using Modernizr tests. However, we encounter the following challenges:
- Modernizr's support for ES modules is limited. we can't use it directely in webpack 5. For further details, see the discussion on Modernizr GitHub issue #2012.
- There is a necessity to add or modify tests as our own requirements.
- Modernizr tests execute immediately after import rather than on demand, affecting our startup speed.
- Some web features have already been removed from the relevant web standards, but are still retained in Modernizr.
Hence, we have developed this customized version!
npm install @u-next/modernizr-scrumw
- normal test
import aDownload from '@u-next/modernizr-scrumw/feature/html/a/download';
console.log(aDownload()); // Are a download supported?
- Async tests
import flash from 'modernizr-esm/feature/browserCommon/flash';
flash(( support ) => {
console.log(support); // Is Flash supported?
});
- Each test can be imported and used separately.
- Tests return multiple named exports if they test multiple features.
- Async tests support Promises as a result.
- No global modifications, such as setting classes on the
html
element. - Ignores browser globals when imported directly in an SSR environment.
https://github.com/u-next/modernizr-scrumw/blob/master/TESTS.md
npm version [patch | minor | major]
npm run release
This repository is used to manage web features referenced in TVH.
Details
- modernizr-scrumw
-
u-next
- 9 months ago
- 33 dependencies
Assets
- modernizr-scrumw-1.0.0.tgz
Download activity
- Total downloads 5,002
- Last 30 days 529
- Last week 153
- Today 0