Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevenvachon/http-equiv-refresh
Parse an HTML meta refresh value.
https://github.com/stevenvachon/http-equiv-refresh
attributes html links nodejs seo urls
Last synced: 22 days ago
JSON representation
Parse an HTML meta refresh value.
- Host: GitHub
- URL: https://github.com/stevenvachon/http-equiv-refresh
- Owner: stevenvachon
- License: mit
- Created: 2015-12-14T13:40:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-17T13:00:55.000Z (about 4 years ago)
- Last Synced: 2024-10-03T18:46:13.564Z (about 1 month ago)
- Topics: attributes, html, links, nodejs, seo, urls
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# http-equiv-refresh [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]
> Parse an HTML [meta refresh value](https://mdn.io/HTML/Element/meta#attr-http-equiv).
## Installation
[Node.js](http://nodejs.org) `>= 6` is required. To install, type this at the command line:
```shell
npm install http-equiv-refresh
```## Usage
```js
const parseMetaRefresh = require('http-equiv-refresh');parseMetaRefresh('5; url=http://domain.com/');
//-> { timeout:5, url:'http://domain.com/' }parseMetaRefresh('5');
//-> { timeout:5, url:null }
```[npm-image]: https://img.shields.io/npm/v/http-equiv-refresh.svg
[npm-url]: https://npmjs.com/package/http-equiv-refresh
[travis-image]: https://img.shields.io/travis/stevenvachon/http-equiv-refresh.svg
[travis-url]: https://travis-ci.org/stevenvachon/http-equiv-refresh
[coveralls-image]: https://img.shields.io/coveralls/stevenvachon/http-equiv-refresh.svg
[coveralls-url]: https://coveralls.io/github/stevenvachon/http-equiv-refresh