can-i-use.js 279 字节
Newer Older
fxy060608's avatar
fxy060608 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
import {
  hasOwn
} from 'uni-shared'

import platformSchema from 'uni-platform/helpers/can-i-use'
// TODO 待处理其他 API 的检测

export function canIUse (schema) {
  if (hasOwn(platformSchema, schema)) {
    return platformSchema[schema]
  }
  return true
}