break-cache

1.0.3 • Public • Published

break-cache

npm version Build Status Coverage Status Dependency Status devDependency Status npm

Searches strings inside input file and adds (or updates) current timestamp to these strings as URL query parameter.

Installation

$ npm i break-cache

Usage

CLI

break-cache --input file [--match pattern] [--output file] [--param name]

options:
-i, --input - input file
-m, --match - regexp for searching URLs inside input file
-o, --output - output file (default: STDOUT)
-p, --param - timestamp query parameter name (default: t)

API

const breakCache = require('break-cache');
 
// options: { input: string, match?: RegExp, output?: string, param?: string }
// streamOrCallback?: stream.Writable | ((err, data) => void)
breakCache(options, stream);

Example

This will add timestamps to svg badges in a readme file.

break-cache README.md -m '\.svg' -o README.md

Readme

Keywords

Package Sidebar

Install

npm i break-cache

Weekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • iyegoroff