Comparing version
@@ -0,1 +1,24 @@ | ||
## <small>1.0.2 (2020-08-24)</small> | ||
* Add minimal documentation ([bf6cc25](https://github.com/kikobeats/parse-uri/commit/bf6cc25)) | ||
* Release 1.0.1 ([9af3814](https://github.com/kikobeats/parse-uri/commit/9af3814)) | ||
* Update README.md ([2c9827a](https://github.com/kikobeats/parse-uri/commit/2c9827a)) | ||
* build: add files meta ([70c7cb6](https://github.com/kikobeats/parse-uri/commit/70c7cb6)) | ||
* build: exit early if input is falsy ([2a3b48e](https://github.com/kikobeats/parse-uri/commit/2a3b48e)) | ||
* build: remove unnecessary files ([7c56428](https://github.com/kikobeats/parse-uri/commit/7c56428)) | ||
* docs(readme): add Greenkeeper badge ([89d54ac](https://github.com/kikobeats/parse-uri/commit/89d54ac)) | ||
## <small>1.0.1 (2020-08-24)</small> | ||
* build: add files meta ([70c7cb6](https://github.com/kikobeats/parse-uri/commit/70c7cb6)) | ||
* build: exit early if input is falsy ([2a3b48e](https://github.com/kikobeats/parse-uri/commit/2a3b48e)) | ||
* build: remove unnecessary files ([7c56428](https://github.com/kikobeats/parse-uri/commit/7c56428)) | ||
* Add minimal documentation ([bf6cc25](https://github.com/kikobeats/parse-uri/commit/bf6cc25)) | ||
* Update README.md ([2c9827a](https://github.com/kikobeats/parse-uri/commit/2c9827a)) | ||
* docs(readme): add Greenkeeper badge ([89d54ac](https://github.com/kikobeats/parse-uri/commit/89d54ac)) | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +25,0 @@ # 1.0.0 (2016-02-04) |
23
index.js
'use strict' | ||
module.exports = function parseURI (str, opts) { | ||
function parseURI (str, opts) { | ||
if (!str) return undefined | ||
opts = opts || {} | ||
var o = { | ||
key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'], | ||
key: [ | ||
'source', | ||
'protocol', | ||
'authority', | ||
'userInfo', | ||
'user', | ||
'password', | ||
'host', | ||
'port', | ||
'relative', | ||
'path', | ||
'directory', | ||
'file', | ||
'query', | ||
'anchor' | ||
], | ||
q: { | ||
@@ -31,1 +48,3 @@ name: 'queryKey', | ||
} | ||
module.exports = parseURI |
@@ -5,7 +5,7 @@ { | ||
"homepage": "https://github.com/Kikobeats/parse-uri", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"main": "./index.js", | ||
"author": { | ||
"email": "josefrancisco.verdu@gmail.com", | ||
"name": "Kiko Beats", | ||
"email": "josefrancisco.verdu@gmail.com", | ||
"url": "https://github.com/Kikobeats" | ||
@@ -26,15 +26,5 @@ }, | ||
"devDependencies": { | ||
"browserify": "latest", | ||
"coffee-script": "latest", | ||
"coffeeify": "latest", | ||
"git-dirty": "latest", | ||
"gulp": "latest", | ||
"gulp-header": "latest", | ||
"gulp-uglify": "latest", | ||
"gulp-util": "latest", | ||
"mocha": "latest", | ||
"should": "latest", | ||
"standard": "latest", | ||
"vinyl-buffer": "latest", | ||
"vinyl-source-stream": "latest" | ||
"standard": "latest" | ||
}, | ||
@@ -44,2 +34,5 @@ "engines": { | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"scripts": { | ||
@@ -46,0 +39,0 @@ "clean": "rm -rf node_modules", |
@@ -38,4 +38,23 @@ # parse-uri | ||
## API | ||
### parseURI(str, [options]) | ||
#### options | ||
##### strictMode | ||
Type: `boolean` | ||
Default: `false` | ||
Determinate if use `loose` or `strict` mode. | ||
> Loose mode deviates slightly from the official generic URI spec ([RFC 3986](http://tools.ietf.org/html/rfc3986)) | ||
### Related | ||
* [is-uri](https://github.com/Kikobeats/is-uri#is-uri) – Determinate if a string is a valid URI. | ||
## License | ||
MIT © [Kiko Beats](http://kikobeats.com) |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3
-76.92%0
-100%60
46.34%0
-100%6275
-38.29%5
-68.75%41
-47.44%