vamtiger-get-html-title
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

VAMTIGER Get HTML Title

VAMTIGER Get HTML Title will return the title for defined HTML document text

Installation

VAMTIGER Get HTML Title can be installed using npm or yarn:

npm i --save vamtiger-get-html-title

or

yarn add vamtiger-get-html-title

Usage

Import or require a referece to VAMTIGER Get HTML Title:

import getHtmlTitle from 'vamtiger-get-html-title';

or

const getHtmlTitle = require('vamtiger-get-html-title').default;

VAMTIGER Get HTML Title can then be used to test whether a defined input string contains a HTML Title:

const getHtmlTitle = require('vamtiger-get-html-title').default

const html = `
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>
        Some HTML Title
    </title>
</head>
<body>
    <div>
        Some HTML body inner HTML
    </div>
</body>
</html>
`;
const title = getHtmlTitle({ html }); // 'Some HTML Title'

Readme

Keywords

Package Sidebar

Install

npm i vamtiger-get-html-title

Weekly Downloads

1

Version

0.0.8

License

MIT

Unpacked Size

13.3 kB

Total Files

27

Last publish

Collaborators

  • vamtiger-project