UNPKG

1.05 kBMarkdownView Raw
1# prepare
2
3[![npm version](https://badge.fury.io/js/%40chengaoyuan%2Fprepare.svg)](https://badge.fury.io/js/%40chengaoyuan%2Fprepare)
4[![install size](https://packagephobia.now.sh/badge?p=@chengaoyuan/prepare)](https://packagephobia.now.sh/result?p=@chengaoyuan/prepare)
5[![NPM Downloads](https://img.shields.io/npm/dm/@chengaoyuan/prepare.svg?style=flat)](https://npmcharts.com/compare/@chengaoyuan/prepare?minimal=true)
6[![Build Status](https://travis-ci.org/GithubCGY/prepare.svg?branch=master)](https://travis-ci.org/GithubCGY/prepare)
7[![Coverage Status](https://coveralls.io/repos/github/GithubCGY/prepare/badge.svg?branch=master)](https://coveralls.io/github/GithubCGY/prepare?branch=master)
8
9## Installation
10
11 $ npm install @chengaoyuan/prepare
12
13## Usage
14
15```ts
16import prepare from "@chengaoyuan/prepare";
17console.log(prepare(":a#:b")({ a: "abc", b: 2 })); // out: abc#2
18console.log(prepare("select * from user where uid=:uid")({ uid: 10 })); // out: select * from user where uid=10
19```
20
21## Testing
22
23 $ npm test