Skip to content

Commit

Permalink
Merge pull request IonicaBizau#35 from edenhermelin/convert-project-t…
Browse files Browse the repository at this point in the history
…o-esm

Convert project to esm
  • Loading branch information
IonicaBizau committed Jul 18, 2022
2 parents 811dcc6 + b04fbbb commit ebb7778
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion example/index.js
@@ -1,5 +1,5 @@
// Dependencies
const parseUrl = require("../lib")
import parseUrl from "../lib/index.js";

console.log(parseUrl("http://ionicabizau.net/blog"))
// {
Expand Down
6 changes: 3 additions & 3 deletions lib/index.js
@@ -1,8 +1,8 @@
"use strict"

// Dependencies
const parsePath = require("parse-path")
, normalizeUrl = require("normalize-url")
import parsePath from "parse-path";
import normalizeUrl from "normalize-url";


/**
Expand Down Expand Up @@ -71,4 +71,4 @@ const parseUrl = (url, normalize = false) => {
return parsed;
}

module.exports = parseUrl;
export default parseUrl;
7 changes: 4 additions & 3 deletions package.json
@@ -1,8 +1,9 @@
{
"name": "parse-url",
"version": "7.0.2",
"version": "7.0.3",
"description": "An advanced url parser supporting git urls too.",
"main": "lib/index.js",
"type": "module",
"directories": {
"example": "example",
"test": "test"
Expand Down Expand Up @@ -31,8 +32,8 @@
"tester": "^1.3.1"
},
"dependencies": {
"normalize-url": "^6.1.0",
"parse-path": "^5.0.0"
"parse-path": "^5.0.0",
"normalize-url": "^7.0.3"
},
"files": [
"bin/",
Expand Down
7 changes: 3 additions & 4 deletions test/index.js
@@ -1,8 +1,7 @@
// Dependencies
const parseUrl = require("../lib")
, tester = require("tester")
, normalizeUrl = require("normalize-url")
;
import parseUrl from "../lib/index.js";
import tester from "tester";
import normalizeUrl from "normalize-url";

const INPUTS = [
[
Expand Down

0 comments on commit ebb7778

Please sign in to comment.