Get <title>
content from HTML string.
npm install get-html-title
<!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"
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT