@chengaoyuan/prepare

根据字符串模板生成处理函数


Keywords
prepare
License
MIT
Install
npm install @chengaoyuan/prepare@1.0.2

Documentation

prepare

npm version install size NPM Downloads Build Status Coverage Status

Installation

$ npm install @chengaoyuan/prepare

Usage

import prepare from "@chengaoyuan/prepare";
console.log(prepare(":a#:b")({ a: "abc", b: 2 })); // out: abc#2
console.log(prepare("select * from user where uid=:uid")({ uid: 10 })); // out: select * from user where uid=10

Testing

$ npm test