get-title-at-url

2.0.0 • Public • Published

get-title-at-url

npm package

Build Status npm Dependency Status Coverage Status Known Vulnerabilities XO code style Gitter

Npm package to retrieve the title at a given url. Largely combines articleTitle with request.

Installation

Installation is easiest through npm:

npm install get-title-at-url --save

Usage

get-title-at-url can be included as a reference.

import getTitleAtUrl from 'get-title-at-url';

const {title} = await getTitleAtUrl(url);

console.log(title);

CLI

$ npm install --global get-title-at-url
$ get-title-at-url --help

  Usage
    $ get-title-at-url "<url>"

  Example
    $ get-title-at-url "http://www.google.com"

The getTitleAtUrl will return a promise that resolves to {title, error}. title will be unset if error is present and vice versa. The error will be whatever error request passes back, the title will be empty if there was an issue.

License

MIT © Mark Rogers

Dependencies (4)

Dev Dependencies (7)

Package Sidebar

Install

npm i get-title-at-url

Weekly Downloads

68

Version

2.0.0

License

MIT

Unpacked Size

6.25 kB

Total Files

5

Last publish

Collaborators

  • markrogers