1.0.1 • Published 2 years ago

aw-hero-json v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

模块说明

功能强大的模块

使用步骤:

  1. 下载
npm i 模块名
  1. 导入 + 使用
const hero = require('hero-json')
// 查询方法
// 参数:查询关键字可以省略,省略返回所有
// 返回值:Promise
hero.query()

// 添加方法
// 参数Object:{name:名字,title:外号,icon:头像}
// 返回值:Promise
hero.add({ name: '提莫', title: '迅捷斥候', icon: '在线头像地址' })

// 删除方法
// 参数:删除英雄的id
// 返回值:Promise
hero.del(id)

// 修改方法
// 参数Object:{id:修改的英雄id,name:名字,title:外号,icon:头像}
// 返回值:Promise
hero.update({ id: 3, name: '提莫', title: '迅捷斥候', icon: '在线头像地址' })
  1. 如果对你有帮助的话,记得点赞哦
1.0.1

2 years ago