1.0.7 • Published 4 years ago
@uni/caniuse v1.0.7
canIUse
Determines whether the APIs, packages of the Univesal-api are available in the current version.
Support
Install
$ npm install @uni/caniuse --saveor
$ npm install @uni/apis --saveUsage
import canIUse from '@uni/caniuse';
// true
canIUse('storage');
// true
canIUse('storage.getStorage');
// false
canIUse('storage.getStorageInfo');You can also import from the big package:
import {canIUse} from '@uni/apis';Methods
canIUse(options)
Arguments
| Property | Type | Description | Support | Default |
|---|---|---|---|---|
| api | string | ${package}.${method} | ✔️ | - |
Returns
| Property | Type | Description |
|---|---|---|
| res | boolean | the API can be used when return true |
1.0.7
4 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.5-beta
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
1.0.0-beta
5 years ago