🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@21cnfe/ok

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@21cnfe/ok

基于天翼云盘APP的JS Bridge封装,提供更多原生能力。

latest
npmnpm
Version
1.1.1
Version published
Maintainers
2
Created
Source

天翼云盘小程序 JSSDK

该库包含为天翼云盘小程序提供能力的各种 api 封装,详细的 api 介绍和调用方式见 H5 小程序平台·文档中心

Usage

在项目中安装依赖

npm istall @21cnfe/ok --save

在项目入口文件中引入,如 main.js

import '@21cnfe/ok'

由于该库会在 window 对象上挂载一个名为 ok 的属性,后续所有的 api 都是通过其挂载的 ok 对象调用,无需做其他引入。

canIUse

ok.canIUse(apiName)
  .then(res => {
    console.log('当前API是否可用', res.data.result)
  })

Change Log

ok 1.1.1 2020-06-28

Fixes

  • 修复 android 部分版本出现初始化两次的问题;

FAQs

Package last updated on 29 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts