npm.io
1.0.14 • Published 6 years ago

ghost-detect

Licence
MIT
Version
1.0.14
Deps
8
Size
4 kB
Vulns
1
Weekly
0
Stars
5

ghost-detect Build Status

Detect whether a site has been generated by the Ghost publishing platform.

Install

~ ❯❯❯ npm install --save ghost-detect

Usage

const ghostDetect = require('ghost-detect');

ghostDetect('nikolaskama.me').then(ghost => {
	console.log(ghost);
	//=> true
});

ghostDetect('google.com').then(ghost => {
	console.log(ghost);
	//=> false
});

API

ghostDetect(targets, [options])

Returns a Promise for a boolean which is true if any of the targets have been generated using the Ghost publishing platform.

targets

Type: string Array

One or more targets to check. Can either be a full URL like https://hostname or just hostname. When the protocol is missing from a target http is assumed.

options
timeout

Type: number

Timeout in milliseconds after which a request is considered failed. Default: 5000.

  • ghost-detect.now - A minimal service to check whether a site has been generator by the Ghost publishing platform.

License

MIT Nikolaos Kamarinakis

Keywords