inject-meta-tag
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

inject-meta-tag

Injects <meta> into document head.

Background

Injects custom <meta> into document head. For example, you can use <meta> to know what version of your package is being used in a web app.

How to use

import { injectMeta, npm } from 'inject-meta-tag';

// Will inject <meta name="my-package" content="1.0.0" /> into document head.
injectMeta('my-package', '1.0.0');

// Will inject <meta name="npm:my-package" content="version=1.0.0" /> into document head.
npm('my-package', { version: '1.0.0' });

API

The following is simplified version of the API. Please refer to our published typings for the full version.

injectMeta(name: string, content?: string | undefined): void;

npm(name: string, init: { version: string }): void;

Behaviors

Contributions

Like us? Star us.

Want to make it better? File us an issue.

Don't like something you see? Submit a pull request.

Readme

Keywords

Package Sidebar

Install

npm i inject-meta-tag

Weekly Downloads

82

Version

0.0.1

License

MIT

Unpacked Size

13.6 kB

Total Files

15

Last publish

Collaborators

  • compulim