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

xxg-chestnut

v1.0.5

Published

a simple frame

Downloads

5

Readme

1.0.5--------------------------------------->

新增:

db.js

 --multiInsert(tableName,columns,objs)

 //condition: where id in (1,3) 后面部分,例如: and departmentId=?
 --multiUpdate(tableName,primaryKey,columns,condition,params,objs)

repository.js

 --multiInsert(columns,objs)

 --multiUpdate(columns,condition,params,objs)

ctrl/wrappRepositoryCtrl.js

 --multiInsert(columns,getObjs,handles)

 --multiUpdate(columns,condition,fnGetParams,fnGetObjs,handles)

1.0.4--------------------------------------->

新增: ctrl/step.js 步骤记录,用于测试或者监控

修复BUG: ctrl/bodyParseToJson.js 应返回Promise

1.0.3--------------------------------------->

删掉未使用的dependencies

1.0.2--------------------------------------->

修改README.txt 方便在www.npmjs.com上查看

1.0.1--------------------------------------->

新增:

util

--crypto 封装系统crypto加密模块

  --cipher(algorithm,inputEncoding,outputEncoding,key,data)

  --deCipher(algorithm,inputEncoding,outputEncoding,key,data)

  --jwtSimple.encode(key,jsonData) -->stringData

  --jwtSimple.decode(key,stringData) -->jsonData

增强:

ctrl

--wrapRepositoryCtrl.js

  --rep=>{} ---> (rep,Aggregate)=>{} Aggregate:聚合根类

  --save() 增加保存聚合根

  --新增 findByIdAggregate(fnGetId,name,handles)

  --新增 findByWhereAggregate(condition,fnGetParams,name,handles)

  --新增 findUniqueAggregate(condition,fnGetParams,name,handles)

1.0.0--------------------------------------->

repository.js 仓库

--save(obj)

--update(obj)

--insert(obj)

--findById(id)

--findByWhere(condition,params)

--deleteById(id)

--deleteByWhere(condition,params)

aggregate.js 聚合根

getModifys() 获取修改实体

oldEntity 原实体

newEntity 新实体

db.js 数据库操作,返回Promise,results参考mysql的results

--update(tableName,primaryKey,obj)

--insert(tableName,obj)

--findById(tableName,primaryKey,id)

--findByWhere(tableName,condition,params)

--deleteById(tableName,primaryKey,id)

--deleteByWhere(tableName,condition,params)

util

--arrayToObject.js 数组转成对象 ['name','age']--->{name:true,age:true}

--objectFilterKey.js (oKeys={age:true},oOrigin)=>过滤掉一些键值 {name:'33',age:23}--->{name:'33'}

--objectModifys.js (oldObj,newObj)=>新对象相对于原对象的改变量

ctrl

--bodyParseToJson.js (handles)=>获取request的body并转换成json格式

--returnCatch.js (handles)=>返回异常给客户端

--returnSuccess.js (fnGetResponseBody,handles)=>返回客户端

--wrapRepositoryCtrl.js 包装repository.js成controller