# bloody-compile

> compile is a method to perform simple replacements in JavaScript.

Latest version **1.0.0** (published 2014-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install bloody-compile
pnpm add bloody-compile
yarn add bloody-compile
bun add bloody-compile
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-08-19 |
| First published | 2014-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | bloodyowl |
| Maintainers | bloodyowl |

## Links

- npm: https://www.npmjs.com/package/bloody-compile
- Repository: https://github.com/bloodyowl/compile
- Issues: https://github.com/bloodyowl/compile/issues
- npm.io page: https://npm.io/package/bloody-compile

## Recent versions

- 1.0.0 (latest) — 2014-08-19
- 0.1.0 — 2014-02-12

## README

# compile

compile is a method to perform simple replacements in JavaScript. 

[![browser support](https://ci.testling.com/bloodyowl/compile.png)](https://ci.testling.com/bloodyowl/compile)

## require 

```javascript
var compile = require("compile")
```

## Examples 

You can pass : 

### Arguments 

If `arguments.length` exceeds 2, arguments are used as primary keys. 

```javascript
compile("{{0}} - {{1}} - {{2}}", "foo", "bar", "baz") 
/* -> */ "foo - bar - baz"
```

### Arrays

```javascript
compile("{{0}} - {{1}} - {{2}}", ["foo", "bar", "baz"]) 
/* -> */ "foo - bar - baz"
```

### Strings 
```javascript
compile("this is {{*}}", "foo") 
/* -> */ "this is foo"
```

### Objects 
```javascript
compile("{{foo}} {{bar.baz}}!", {foo:"hello", bar:{baz:"yourself"}}) 
/* -> */ "hello yourself!"
```

---
_Source: https://npm.io/package/bloody-compile · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
