humanize-url
Advanced tools
Comparing version 2.1.1 to 3.0.0
@@ -6,3 +6,3 @@ /** | ||
``` | ||
import humanizeUrl = require('humanize-url'); | ||
import humanizeUrl from 'humanize-url'; | ||
@@ -13,4 +13,2 @@ humanizeUrl('https://www.sindresorhus.com/'); | ||
*/ | ||
declare function humanizeUrl(url: string): string; | ||
export = humanizeUrl; | ||
export default function humanizeUrl(url: string): string; |
@@ -1,5 +0,4 @@ | ||
'use strict'; | ||
const normalizeUrl = require('normalize-url'); | ||
import normalizeUrl from 'normalize-url'; | ||
module.exports = url => { | ||
export default function humanizeUrl(url) { | ||
if (typeof url !== 'string') { | ||
@@ -10,2 +9,2 @@ throw new TypeError('Expected a string'); | ||
return normalizeUrl(url, {stripProtocol: true}); | ||
}; | ||
} |
{ | ||
"name": "humanize-url", | ||
"version": "2.1.1", | ||
"version": "3.0.0", | ||
"description": "Humanize a URL: `https://sindresorhus.com` → `sindresorhus.com`", | ||
"license": "MIT", | ||
"repository": "sindresorhus/humanize-url", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12.20" | ||
}, | ||
@@ -24,3 +27,2 @@ "scripts": { | ||
"url", | ||
"uri", | ||
"address", | ||
@@ -43,9 +45,9 @@ "string", | ||
"dependencies": { | ||
"normalize-url": "^4.5.1" | ||
"normalize-url": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.17.0", | ||
"xo": "^0.41.0" | ||
} | ||
} |
@@ -5,3 +5,2 @@ # humanize-url | ||
## Install | ||
@@ -13,7 +12,6 @@ | ||
## Usage | ||
```js | ||
const humanizeUrl = require('humanize-url'); | ||
import humanizeUrl from 'humanize-url'; | ||
@@ -23,6 +21,1 @@ humanizeUrl('https://www.sindresorhus.com/'); | ||
``` | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2785
Yes
17
19
+ Addednormalize-url@7.2.0(transitive)
- Removednormalize-url@4.5.1(transitive)
Updatednormalize-url@^7.0.0