get-html-title

0.0.2 • Public • Published

get-html-title Build Status

Get <title> content from HTML string.

Installation

npm install get-html-title

Usage

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>title text</title>
</head>
<body>
 
</body>
</html>

Get title content from above html.

var content = fs.readFileSync(__dirname + "/fixtures/has-multiple-title.html", "utf-8");
getTitle(content)// => "title text"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Keywords

none

Install

DownloadsWeekly Downloads

179

Version

0.0.2

License

MIT

Last publish

Collaborators

  • azu