# text-import-engine

> a barebones text templating engine for javascript (with tie-fighters)

Latest version **1.0.9** (published 2021-12-20) · GNU GPLv3 license · 0 weekly downloads

## Install

```sh
npm install text-import-engine
pnpm add text-import-engine
yarn add text-import-engine
bun add text-import-engine
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2021-12-20 |
| First published | 2021-12-19 |
| Weekly downloads | 0 |
| License | GNU GPLv3 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 30 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jordan Tauscher |
| Maintainers | jt_ |
| Keywords | html, text, template, templater, templating, engine, tie, import, importing |

## Links

- npm: https://www.npmjs.com/package/text-import-engine
- npm.io page: https://npm.io/package/text-import-engine

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2021-12-20
- 1.0.8 — 2021-12-20
- 1.0.7 — 2021-12-20
- 1.0.6 — 2021-12-19
- 1.0.5 — 2021-12-19
- 1.0.4 — 2021-12-19
- 1.0.3 — 2021-12-19
- 1.0.2 — 2021-12-19
- 1.0.1 — 2021-12-19
- 1.0.0 — 2021-12-19

## README

# Text Import Engine
### Purpose
TIE is a barebones text templating engine. It was originally intended to be used to render server-side html templates; however it can easily be utilised to create templates for any markup, programming, or plain language with the power of dynamic javascript.
### Getting Started
To start using TIE in your project simply install with `npm i text-import-engine` and import the module `import Tie from "text-import-engine"`.
### Usage
TIE as of now has one function `Tie.render(string, object)` it takes two arguments: the first being the string to be modified, and second being an object containing the data TIE should use to modify the aforementioned string. The syntax to show TIE where in the text these modifications should take place is simple `|o| example |o|` where 'example' is a key in the data object.
### Examples
#### Using TIE syntax within a string 
`<p>hello |o| name |o| nice to see you again</p>`
#### Creating a data object
`const data = {name: 'jordan'}`
#### Calling TIE's render function
`Tie.render('<p>hello |o| name |o| nice to see you again</p>', data)` 
returns: `<p>hello jordan nice to see you again</p>`

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