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 --save
or
$ npm install @uni/apis --save
Usage
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
4 years ago
1.0.5
4 years ago
1.0.5-beta
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
1.0.0-beta
4 years ago