JSPM

maxstache-stream-variable-injection

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q21429F
  • License MIT

Maxstache transform stream

Package Exports

  • maxstache-stream-variable-injection
  • maxstache-stream-variable-injection/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (maxstache-stream-variable-injection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

maxstache-stream-variable-injection is fork from maxstache

Why?

The template {{ var }} has been made customizable

[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![Downloads][downloads-image]][downloads-url] [![js-standard-style][standard-image]][standard-url]

[maxstache][0] transform stream. Faster and simpler than {mu,min}stache.

Installation

$ npm install maxstache-stream-variable-injection

Usage

const maxstache = require("maxstache-stream-variable-injection");
const fs = require("fs");

fs.createReadStream("./foobar.txt")
  .pipe(
    maxstache(
      { name: "jjjohnny", occupation: "wizard" },
      "{{\\s*([^{}\\s]+)\\s*}}"
    )
  )
  .pipe(process.stdout);

API

transformStream = maxstache(vars)

Create a maxstache transform stream that injects an object of variables. Uses the {{varName}} syntax to mark variables in templates.

License

MIT