@qpoint/replace-content
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

qpoint-replace-content

A Qpoint adapter for replacing content in the response html

Usage

import Endpoint from "@qpoint/endpoint";
import proxy from "@qpoint/proxy";
import replaceContent from "@qpoint/replace-content";
import rewriteHtml from "@qpoint/rewrite-html";

export default new Endpoint()
  // proxy to deno.land
  .use(proxy({ appUrl: "https://deno.land" }))

  // replace text occurrences
  .use(replaceContent({ 
    rules: [
      { from: "Deno", to: "Deyes" },
      { from: "deno", to: "deyes" },
      { from: "JavaScript", to: "FunnyScript" },
      { from: "TypeScript", to: "StrictScript" }
    ] 
  }))

  // activate the rewrite
  .use(rewriteHtml({}))

Installation

npm add @qpoint/replace-content

Readme

Keywords

none

Package Sidebar

Install

npm i @qpoint/replace-content

Weekly Downloads

0

Version

0.2.1

License

Apache-2.0

Unpacked Size

16.4 kB

Total Files

9

Last publish

Collaborators

  • jonfriesen
  • marc-barry
  • tylerflint