How unicorns sleep
...
Extract the article title of a HTML document
npm install article-title> Extract the article title of a HTML document
It's often quite hard to get the actual title of an article from a page as authors either add a bunch of trash to or don't use it at all. There's also no standardized way to indicate the title of an article in the markup. This module uses some heuristics to extract it cleanly.
``sh`
npm install article-title
`js
import articleTitle from 'article-title';
const html =
...
;articleTitle(html);
//=> 'How unicorns sleep'
``- article-title-cli - CLI for this package