2.0.1 • Published 7 years ago

http-equiv-refresh v2.0.1

Weekly downloads
18,439
License
MIT
Repository
github
Last release
7 years ago

http-equiv-refresh NPM Version Build Status Coverage Status

Parse an HTML meta refresh value.

Installation

Node.js >= 6 is required. To install, type this at the command line:

npm install http-equiv-refresh

Usage

const parseMetaRefresh = require('http-equiv-refresh');

parseMetaRefresh('5; url=http://domain.com/');
//-> { timeout:5, url:'http://domain.com/' }

parseMetaRefresh('5');
//-> { timeout:5, url:null }