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

mockjs-async

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mockjs-async

mockjs支持异步模拟的版本

Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
91
5.81%
Maintainers
1
Weekly downloads
 
Created
Source

Mock.js - async version

仅修改Mock.mock方法使支持Promise异步数据替换

使用方式如下:

Mock.mock(/foo\/bar/, function(){
    return new Promise(resolve=>{
        setTimeout(resolve, 3000, {data:"模拟的数据"});
    })
})

Build Status

原版主页

Keywords

mock

FAQs

Package last updated on 03 Apr 2019

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