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

humanize-url

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize-url - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0

6

index.d.ts

@@ -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

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