Skip to content

vamtiger-project/vamtiger-get-html-title

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

Get the title for a defined HTML document text

Resources

License

Stars

Watchers

Forks

Packages

No packages published