0.0.8 • Published 6 years ago
vamtiger-get-html-title v0.0.8
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'