@chuxingpay/util
v1.5.15
Published
付迅工具函数库 ===========
Downloads
73
Keywords
Readme
付迅工具函数库
安装
npm i @chuxingpay/util
工具类
const { Signature } = require('@chuxingpay/util') const signatureUtil = new Signature(partnerId, appId, appSecret) const paramsWithSign = signatureUtil.generateParams({ reservationNo: 'RN201611260102' }) // paramsWithSign { appId: 'ef251350-0ff5-11ea-8122-bb4103705c4f', partnerId: 100, nonce: '27182ab0', timestamp: 1574737336, data: '{"reservationNo":"RN201911260102"}', version: '1.0', signature: 'ZjE1NDI5NDE5MzFiYWI0NzNhOTIyMGVkZTlkMTE5MjQ2MGFlOGU0Mg==' }
isObjectId(str): 字符串是否为 ObjectId
isEqual(object|array, object|array): 两个对象或者数组是否相等
similar(hotel1, hotel2): 两个酒店相似度检测
isCoordinate(lng, lat): 是否为合法的坐标位置