summaryrefslogtreecommitdiff
path: root/node_modules/http-equiv-refresh
diff options
context:
space:
mode:
authorShipwreckt <me@shipwreckt.co.uk>2025-10-31 20:02:14 +0000
committerShipwreckt <me@shipwreckt.co.uk>2025-10-31 20:02:14 +0000
commit7a52ddeba2a68388b544f529d2d92104420f77b0 (patch)
tree15ddd47457a2cb4a96060747437d36474e4f6b4e /node_modules/http-equiv-refresh
parent53d6ae2b5568437afa5e4995580a3fb679b7b91b (diff)
Changed from static to 11ty!
Diffstat (limited to 'node_modules/http-equiv-refresh')
-rw-r--r--node_modules/http-equiv-refresh/README.md31
-rw-r--r--node_modules/http-equiv-refresh/index-es5.js30
-rw-r--r--node_modules/http-equiv-refresh/index-es5.js.map1
-rw-r--r--node_modules/http-equiv-refresh/index.js24
-rw-r--r--node_modules/http-equiv-refresh/license21
-rw-r--r--node_modules/http-equiv-refresh/package.json42
6 files changed, 149 insertions, 0 deletions
diff --git a/node_modules/http-equiv-refresh/README.md b/node_modules/http-equiv-refresh/README.md
new file mode 100644
index 0000000..b555d75
--- /dev/null
+++ b/node_modules/http-equiv-refresh/README.md
@@ -0,0 +1,31 @@
+# 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
diff --git a/node_modules/http-equiv-refresh/index-es5.js b/node_modules/http-equiv-refresh/index-es5.js
new file mode 100644
index 0000000..a251158
--- /dev/null
+++ b/node_modules/http-equiv-refresh/index-es5.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports["default"] = void 0;
+var PATTERN = /^\s*(\d+)(?:\s*;(?:\s*url\s*=)?\s*(?:["']\s*(.*?)\s*['"]|(.*?)))?\s*$/i;
+
+var _default = function _default(content) {
+ content = PATTERN.exec(content);
+ var timeout, url;
+
+ if (content !== null) {
+ timeout = parseInt(content[1], 10);
+ url = content[2] || content[3] || null; // first matching group
+ } else {
+ timeout = null;
+ url = null;
+ }
+
+ return {
+ timeout: timeout,
+ url: url
+ };
+};
+
+exports["default"] = _default;
+module.exports = exports.default;
+
+//# sourceMappingURL=index-es5.js.map \ No newline at end of file
diff --git a/node_modules/http-equiv-refresh/index-es5.js.map b/node_modules/http-equiv-refresh/index-es5.js.map
new file mode 100644
index 0000000..bf32636
--- /dev/null
+++ b/node_modules/http-equiv-refresh/index-es5.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;AAAA,IAAM,OAAO,GAAG,wEAAhB;;eAIe,kBAAA,OAAO,EACtB;AACC,EAAA,OAAO,GAAG,OAAO,CAAC,IAAR,CAAa,OAAb,CAAV;AAEA,MAAI,OAAJ,EAAa,GAAb;;AAEA,MAAI,OAAO,KAAK,IAAhB,EACA;AACC,IAAA,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAD,CAAR,EAAa,EAAb,CAAlB;AAEA,IAAA,GAAG,GAAG,OAAO,CAAC,CAAD,CAAP,IAAc,OAAO,CAAC,CAAD,CAArB,IAA4B,IAAlC,CAHD,CAGyC;AACxC,GALD,MAOA;AACC,IAAA,OAAO,GAAG,IAAV;AACA,IAAA,GAAG,GAAG,IAAN;AACA;;AAED,SAAO;AAAE,IAAA,OAAO,EAAP,OAAF;AAAW,IAAA,GAAG,EAAH;AAAX,GAAP;AACA,C","file":"index-es5.js","sourcesContent":["const PATTERN = /^\\s*(\\d+)(?:\\s*;(?:\\s*url\\s*=)?\\s*(?:[\"']\\s*(.*?)\\s*['\"]|(.*?)))?\\s*$/i;\n\n\n\nexport default content =>\n{\n\tcontent = PATTERN.exec(content);\n\n\tlet timeout, url;\n\n\tif (content !== null)\n\t{\n\t\ttimeout = parseInt(content[1], 10);\n\n\t\turl = content[2] || content[3] || null; // first matching group\n\t}\n\telse\n\t{\n\t\ttimeout = null;\n\t\turl = null;\n\t}\n\n\treturn { timeout, url };\n};\n"]} \ No newline at end of file
diff --git a/node_modules/http-equiv-refresh/index.js b/node_modules/http-equiv-refresh/index.js
new file mode 100644
index 0000000..47f3f94
--- /dev/null
+++ b/node_modules/http-equiv-refresh/index.js
@@ -0,0 +1,24 @@
+const PATTERN = /^\s*(\d+)(?:\s*;(?:\s*url\s*=)?\s*(?:["']\s*(.*?)\s*['"]|(.*?)))?\s*$/i;
+
+
+
+export default content =>
+{
+ content = PATTERN.exec(content);
+
+ let timeout, url;
+
+ if (content !== null)
+ {
+ timeout = parseInt(content[1], 10);
+
+ url = content[2] || content[3] || null; // first matching group
+ }
+ else
+ {
+ timeout = null;
+ url = null;
+ }
+
+ return { timeout, url };
+};
diff --git a/node_modules/http-equiv-refresh/license b/node_modules/http-equiv-refresh/license
new file mode 100644
index 0000000..b760007
--- /dev/null
+++ b/node_modules/http-equiv-refresh/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Steven Vachon <contact@svachon.com> (svachon.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/http-equiv-refresh/package.json b/node_modules/http-equiv-refresh/package.json
new file mode 100644
index 0000000..14bac1e
--- /dev/null
+++ b/node_modules/http-equiv-refresh/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "http-equiv-refresh",
+ "description": "Parse an HTML meta refresh value.",
+ "version": "2.0.1",
+ "license": "MIT",
+ "author": "Steven Vachon <contact@svachon.com> (https://svachon.com)",
+ "repository": "github:stevenvachon/http-equiv-refresh",
+ "main": "index-es5.js",
+ "devDependencies": {
+ "@babel/cli": "^7.5.0",
+ "@babel/core": "^7.5.4",
+ "@babel/preset-env": "^7.5.4",
+ "babel-plugin-add-module-exports": "^1.0.2",
+ "chai": "^4.2.0",
+ "coveralls": "^3.0.5",
+ "mocha": "^6.1.4",
+ "nyc": "^14.1.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ },
+ "scripts": {
+ "ci": "npm test && nyc report --reporter=text-lcov | coveralls",
+ "posttest": "nyc report --reporter=text-summary --reporter=html",
+ "prepublishOnly": "npm test",
+ "pretest": "babel index.js --out-file=index-es5.js --plugins=babel-plugin-add-module-exports --presets=@babel/env --source-maps",
+ "test": "nyc --silent mocha test.js --bail --check-leaks"
+ },
+ "files": [
+ "index.js",
+ "index-es5.js",
+ "index-es5.js.map"
+ ],
+ "keywords": [
+ "html",
+ "http-equiv",
+ "meta",
+ "metadata",
+ "parse",
+ "refresh"
+ ]
+}