Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-uri

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-uri - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.github/dependabot.yml

27

CHANGELOG.md

@@ -1,26 +0,25 @@

<a name="1.2.0"></a>
# 1.2.0 (2016-02-09)
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
* Support provide a URI Object ([81892ec](https://github.com/kikobeats/is-uri/commit/81892ec))
### 1.2.1 (2022-02-04)
<a name="1.2.0"></a>
# 1.2.0 (2016-02-09)
- Support provide a URI Object ([81892ec](https://github.com/kikobeats/is-uri/commit/81892ec))
<a name="1.1.0"></a>
# 1.1.0 (2016-02-09)
- Improve ([0373dee](https://github.com/kikobeats/is-uri/commit/0373dee))
- Release 1.1.0 ([9b7cb6e](https://github.com/kikobeats/is-uri/commit/9b7cb6e))
* Improve ([0373dee](https://github.com/kikobeats/is-uri/commit/0373dee))
* Release 1.1.0 ([9b7cb6e](https://github.com/kikobeats/is-uri/commit/9b7cb6e))
<a name="1.0.0"></a>
<a name="1.0.0"></a>
# 1.0.0 (2016-02-04)
* first commit ([4a59545](https://github.com/kikobeats/is-uri/commit/4a59545))
* Release 1.0.0 ([43fa823](https://github.com/kikobeats/is-uri/commit/43fa823))
- first commit ([4a59545](https://github.com/kikobeats/is-uri/commit/4a59545))
- Release 1.0.0 ([43fa823](https://github.com/kikobeats/is-uri/commit/43fa823))

@@ -5,4 +5,4 @@ {

"homepage": "https://github.com/Kikobeats/is-uri",
"version": "1.2.0",
"main": "./index.js",
"version": "1.2.1",
"main": "src/index.js",
"author": {

@@ -28,30 +28,49 @@ "name": "Kiko Beats",

"dependencies": {
"parse-uri": "~1.0.0",
"parse-uri": "~1.0.3",
"punycode2": "~1.0.0"
},
"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",
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"ava": "latest",
"c8": "latest",
"ci-publish": "latest",
"conventional-github-releaser": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"nano-staged": "latest",
"npm-check-updates": "latest",
"prettier-standard": "latest",
"simple-git-hooks": "latest",
"standard": "latest",
"vinyl-buffer": "latest",
"vinyl-source-stream": "latest"
"standard-markdown": "latest",
"standard-version": "latest"
},
"engines": {
"node": ">= 0.10"
"node": ">= 4"
},
"scripts": {
"clean": "rm -rf node_modules",
"lint": "standard lib",
"lint": "standard",
"pretest": "npm run lint",
"test": "mocha"
"test": "c8 ava",
"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
"prerelease": "npm run update:check && npm run contributors",
"release:github": "conventional-github-releaser -p angular",
"release:tags": "git push --follow-tags origin HEAD:master",
"release": "standard-version -a",
"update:check": "ncu -- --error-level 2",
"update": "ncu -u"
},
"license": "MIT"
"license": "MIT",
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"simple-git-hooks": {
"commit-msg": "npx commitlint --edit",
"pre-commit": "npx nano-staged"
}
}
# is-uri
![Last version](https://img.shields.io/github/tag/Kikobeats/is-uri.svg?style=flat-square)
[![Build Status](http://img.shields.io/travis/Kikobeats/is-uri/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/is-uri)
[![Dependency status](http://img.shields.io/david/Kikobeats/is-uri.svg?style=flat-square)](https://david-dm.org/Kikobeats/is-uri)
[![Dev Dependencies Status](http://img.shields.io/david/dev/Kikobeats/is-uri.svg?style=flat-square)](https://david-dm.org/Kikobeats/is-uri#info=devDependencies)
[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/is-uri.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/is-uri)
[![NPM Status](http://img.shields.io/npm/dm/is-uri.svg?style=flat-square)](https://www.npmjs.org/package/is-uri)
[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/Kikobeats)

@@ -18,14 +15,2 @@ > Determinate if a string is a valid URI. Based in [uri](https://www.npmjs.com/package/validate.io-uri) but works out of the box and improved.

If you want to use in the browser (powered by [Browserify](http://browserify.org/)):
```bash
$ bower install is-uri --save
```
and later link in your HTML:
```html
<script src="bower_components/is-uri/dist/is-uri.js"></script>
```
## Usage

@@ -46,3 +31,3 @@

* [parse-uri](https://github.com/Kikobeats/parse-uri#parse-uri) – Lightweight module for parse an URI.
- [parse-uri](https://github.com/Kikobeats/parse-uri#parse-uri) – Lightweight module for parse an URI.

@@ -49,0 +34,0 @@ ## License

@@ -1,61 +0,60 @@

/* global describe, it */
'use strict'
var isURI = require('..')
var should = require('should')
const test = require('ava')
const isURI = require('..')
var URLS = {
VALID: [
'http://google.com',
'http://localhost/',
'http://example.w3.org/path%20with%20spaces.html',
'http://example.w3.org/%20',
'ftp://ftp.is.co.za/rfc/rfc1808.txt',
'ftp://ftp.is.co.za/../../../rfc/rfc1808.txt',
'http://www.ietf.org/rfc/rfc2396.txt',
'ldap://[2001:db8::7]/c=GB?objectClass?one',
'mailto:John.Doe@example.com',
'news:comp.infosystems.www.servers.unix',
'tel:+1-816-555-1212',
'telnet://192.0.2.16:80/',
'urn:oasis:names:specification:docbook:dtd:xml:4.1.2',
'https://🐀.ws/🐀🐀',
'magnet:?xt=urn:sha1:PDAQRAOQQRYS76MRZJ33LK4MMVZBDSCL'
],
INVALID: [
5,
null,
undefined,
true,
NaN,
{},
[],
function () {},
'',
'foo',
'foo@bar', // no scheme
'://foo/', // empty scheme
'1http://foo', // invalid scheme
'http://<foo>', // illegals
'http:////foo.html', // invalid path,
'http://example.w3.org/%illegal.html',
'http://example.w3.org/%a', // incomplete hex escape
'http://example.w3.org/%a/foo', // incomplete hex escape,
'http://example.w3.org/%at' // incomplete hex escape
]
}
describe('parse uri', function () {
it('valid', function () {
URLS.VALID.forEach(function (url) {
isURI(url, {strictMode: true}).should.be.true()
test('true', t => {
t.true(isURI('http://google.com', { strictMode: true }))
t.true(isURI('http://localhost/', { strictMode: true }))
t.true(
isURI('http://example.w3.org/path%20with%20spaces.html', {
strictMode: true
})
})
it('invalid', function () {
URLS.INVALID.forEach(function (url) {
isURI(url, {strictMode: true}).should.be.false()
)
t.true(isURI('http://example.w3.org/%20', { strictMode: true }))
t.true(isURI('ftp://ftp.is.co.za/rfc/rfc1808.txt', { strictMode: true }))
t.true(
isURI('ftp://ftp.is.co.za/../../../rfc/rfc1808.txt', { strictMode: true })
)
t.true(isURI('http://www.ietf.org/rfc/rfc2396.txt', { strictMode: true }))
t.true(
isURI('ldap://[2001:db8::7]/c=GB?objectClass?one', { strictMode: true })
)
t.true(isURI('mailto:John.Doe@example.com', { strictMode: true }))
t.true(isURI('news:comp.infosystems.www.servers.unix', { strictMode: true }))
t.true(isURI('tel:+1-816-555-1212', { strictMode: true }))
t.true(isURI('telnet://192.0.2.16:80/', { strictMode: true }))
t.true(
isURI('urn:oasis:names:specification:docbook:dtd:xml:4.1.2', {
strictMode: true
})
})
)
t.true(isURI('https://🐀.ws/🐀🐀', { strictMode: true }))
t.true(
isURI('magnet:?xt=urn:sha1:PDAQRAOQQRYS76MRZJ33LK4MMVZBDSCL', {
strictMode: true
})
)
})
test('false', t => {
t.false(isURI(5, { strictMode: true }))
t.false(isURI(null, { strictMode: true }))
t.false(isURI(undefined, { strictMode: true }))
t.false(isURI(true, { strictMode: true }))
t.false(isURI(NaN, { strictMode: true }))
t.false(isURI({}, { strictMode: true }))
t.false(isURI([], { strictMode: true }))
t.false(isURI(function () {}, { strictMode: true }))
t.false(isURI('', { strictMode: true }))
t.false(isURI('foo', { strictMode: true }))
t.false(isURI('foo@bar', { strictMode: true })) // no scheme
t.false(isURI('://foo/', { strictMode: true })) // empty scheme
t.false(isURI('1http://foo', { strictMode: true })) // invalid scheme
t.false(isURI('http://<foo>', { strictMode: true })) // illegals
t.false(isURI('http:////foo.html', { strictMode: true })) // invalid path
t.false(isURI('http://example.w3.org/%illegal.html', { strictMode: true }))
t.false(isURI('http://example.w3.org/%a', { strictMode: true })) // incomplete hex escape
t.false(isURI('http://example.w3.org/%a/foo', { strictMode: true })) // incomplete hex escape
t.false(isURI('http://example.w3.org/%at', { strictMode: true })) // incomplete hex escape
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc