3.0.0 • Published 3 years ago

@vanillaes/interpolate v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

A small, easy-to-use template literal builder. Good for loading template literal strings from external sources.

Features

  • ECMAScript Module
  • Typescript Compatible
  • Tiny Footprint (1K)

Imports

This package works isomorphically in browser and server-side JavaScript

Browser

Import directly from the local path or a CDN

<script type="module">
import { interpolate } from 'path/to/interpolate/index.js'
</script>

The minified version can be imported from

<script type="module">
import { interpolate } from 'path/to/interpolate/index.min.js'
</script>

Node

Install the package

npm install @vanillaes/interpolate

Import using the module path

import { interpolate } from '@vanillaes/interpolate'

Interpolate()

Builds a string from a template string + tags collection.

Arguments

Interpolate(template, {tags})

  • template - the template literal string
  • tags - the tagged values in the template

Typings

Typings are generated from JSDoc using Typescript. They are 100% compatible with VSCode Intellisense and will work seamlessly with Typescript.

3.0.0

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago