npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@belvoly-vue-aioa/m-core

v0.2.9

Published

移动前端核心库,包含 `request`, `配置`

Downloads

62

Readme

说明

移动前端核心库,包含 request, 配置

使用方法

requeset

const { data, success } = await request('/xxx',
        {
            method: 'GET',
            data: { name: 'XX' }
        }
})

requeset 取消

let abort

const result = request('/xxx',
        {
            method: 'GET',
            data: { name: 'XX' },
            cancel: (c) => {
                abort = c
            }
        }
})
// 取消
abort()

const { success, isCancel } = await result
if(success) {
    // success = false
}

requestVariant

request的变体方法,返回promise和abort,支持直接取消,参数和返回值和request一样

const { promise, abort } = requestVariant('/x')

setTimeout(abort, 1000)

const { data, success, isCancel } = await promise
if (success) {
    //data
} else if (isCancel) {
    //被取消的
}

版本记录

v0.2.9

  1. 增加harmony 鸿蒙判断标识

v 0.2.7

  1. 定位返回坐标系标准

v 0.2.5

  1. 增加钉钉政务云SDK整合能力

v 0.2.4

  1. 增加随申办政务云SDK整合能力

v 0.2.2

  1. 修复request 在 www-form-urlencoded格式下,null和undefined变成字符串传递给后端了

v0.2.1

  1. 增加企业微信agentConfig功能

v0.2.0

  1. 升级核心依赖库的版本

v 0.1.16

  1. 增加requestRequestOption参数说明

v 0.1.15

  1. 选人组件调用的接口可以在浏览器中直接打开并返回数据,安全检测提升安全不够,需要修改为受保护的public/private接口#24

v 0.1.13

  1. 修复request在safari浏览器,当页面使用window.location.href产生302的情况,会显示错误提示。

v 0.1.12

  1. 增加企业微信的配置和支持

v 0.1.11

  1. request 增加异常处理handleCatch 参数。 修复异常时 没有返回正确的response

v 0.1.10

  1. request 增加 isShowError选项,是否默认显示错误信息
  2. request Get 方式过滤null和undifine选项

v 0.1.6

  1. request修复options为nullBUG

v 0.1.5

  1. request增加cancel取消的选项,返回值增加isCancen判断是否主动取消的
  2. 增加requestVariant,是request的变体,返回 { promise, abort }

v 0.1.2

  1. 修复TS编译的Target为esnext,导致编译在低版本浏览器无法运行