58tjfrom
v1.0.1
Published
provide create or update 58tjfrom util.
Downloads
6
Readme
提供创建或更新58tjfrom工具方法
安装
npm i @58fe/58tjfrom -S
使用
该工具包提供2个工具方法,分别是创建tjfrom(createTJFrom),和生成tjfrom(updateTJFrom)
createTJFrom
创建新的
tjfrom
,接受slot
和slotFrom
两个参数根据规则最后生成tjfrom
参数
|参数|说明|类型|默认值|备注 |-|-|-|-|-| |slot| slot值(可以找主站申请(美事: wanglizhou))|string| |slotFrom| tjfrom中slotFrom的扩展)|object|
ex:
const { createTJFrom } = require("@58fe/58tjfrom");
const slot = "jl";
const slotFrom = {'jl_qd': 1, 'jl_hd': 2};
createTJFrom(slot, slotFrom)
updateTJFrom
在
tjfrom
中追加slotFrom
并生成新的tjfrom
参数
|参数|说明|类型|默认值|备注 |-|-|-|-|-| |tjfrom| tjfrom值|string| |slotFrom| tjfrom中slotFrom的扩展)|object|
ex:
const { updateTJFrom } = require("@58fe/58tjfrom");
const tjfrom = "slot__{...}";
const newSlotFrom = {};
updateTJFrom(tjfrom, newSlotFrom)