vamtiger-get-html-title
Get the title for a defined HTML document text
Last updated 2 years ago by vamtiger-project .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vamtiger-get-html-title 
SYNC missed versions from official npm registry.

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'

Current Tags

  • 0.0.8                                ...           latest (2 years ago)

6 Versions

  • 0.0.8                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |