Description
Super fast specification compliant URL parser state machine for Node.js.
URL Parser alternatives and similar libraries
Based on the "Editors" category.
Alternatively, view url-js alternatives based on common mentions on social networks and blogs.
-
medium-editor
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution. -
TinyMCE
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular -
CKEditor 5
Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing. -
SimpleMDE
A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking. -
wysihtml5
DISCONTINUED. Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles. -
EpicEditor
EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it. -
Materio Free Vuetify VueJS Admin Template
Production Ready, Carefully Crafted, Extensive Vuetifty Free Admin Template ๐คฉ -
Bangle.dev
(previously bangle-editor) Collection of higher level rich text editing tools. It powers the local only note taking app https://bangle.io -
Everright-formEditor
:guide_dog: Powerful lowcode|vue form editor,generator,designer,builder library. It provides an easy way to create custom forms. The project is extensible, easy to use and configure, and provides many commonly used form components and functions(vueๅฏ่งๅไฝไปฃ็ ่กจๅ่ฎพ่ฎกๅจใ่กจๅ็ผ่พๅจใelement-plus vant่กจๅ่ฎพ่ฎก) -
data-structure-typed
Javascript Data Structure & TypeScript Data Structure. Heap, Binary Tree, Red Black Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree, AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack. -
React Chat UI
Build your own chat UI with React Chat UI components in a few minutes. React Chat UI Kit from minchat.io is an open source UI toolkit for developing web chat applications.
SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of URL Parser or a related project?
README
URL State Machine
Super fast specification compliant URL state machine for Node.js. For more information about the URL parsing state machine visit here.
Installation
npm i --save url-state-machine
Usage
const URLStateMachine = require('url-state-machine')
const state = new URLStateMachine('https://www.yagiz.co/implementing-node-js-url-parser-in-webassembly-with-rust')
console.log(state.url)
// {
// scheme: 'https',
// username: '',
// password: '',
// host: 'www.yagiz.co',
// port: null,
// path: [ 'implementing-node-js-url-parser-in-webassembly-with-rust' ],
// query: null,
// fragment: null
// }
Benchmarks
Full domain with input and base
new URL("/path/to/something?hello=world", "https://www.google.com")
โโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Slower tests โ Samples โ Result โ Tolerance โ Difference with previous โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ whatwg-url โ 1000 โ 37994.48 op/sec โ ยฑ 0.97 % โ โ
โ url-state-machine โ 9500 โ 257195.34 op/sec โ ยฑ 0.99 % โ + 576.93 % โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ Fastest test โ Samples โ Result โ Tolerance โ Difference with previous โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ URL โ 10000 โ 477303.34 op/sec โ ยฑ 1.27 % โ + 85.58 % โ
โโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ipv4 address
new URL("http://127.0.0.1")
โโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Slower tests โ Samples โ Result โ Tolerance โ Difference with previous โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ whatwg-url โ 5000 โ 91747.56 op/sec โ ยฑ 0.97 % โ โ
โ url-state-machine โ 10000 โ 626208.74 op/sec โ ยฑ 1.65 % โ + 582.53 % โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ Fastest test โ Samples โ Result โ Tolerance โ Difference with previous โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ URL โ 2500 โ 1037903.40 op/sec โ ยฑ 0.87 % โ + 65.74 % โ
โโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ipv6 address
new URL("http://[1:0::]")
โโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Slower tests โ Samples โ Result โ Tolerance โ Difference with previous โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ whatwg-url โ 5500 โ 196896.91 op/sec โ ยฑ 0.97 % โ โ
โ url-state-machine โ 10000 โ 1321601.39 op/sec โ ยฑ 2.76 % โ + 571.21 % โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ Fastest test โ Samples โ Result โ Tolerance โ Difference with previous โ
โโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ URL โ 8000 โ 1356561.74 op/sec โ ยฑ 0.97 % โ + 2.65 % โ
โโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Testing
Running
All tests are referenced and borrowed from web-platform-tests.
npm test
Code Coverage
Test Files 1 failed (1)
Tests 1 failed | 732 passed (733)
Time 633ms (in thread 64ms, 989.58%)
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---|---|---|---|---|---|
All files | 95.88 | 95.18 | 98 | 95.88 | |
constants.js | 100 | 100 | 100 | 100 | |
encoding.js | 100 | 100 | 100 | 100 | |
index.js | 93.99 | 93.02 | 100 | 93.99 | ...4-775,800-801,921-922,926-927,1070-1071 |
parser.js | 99.53 | 99.05 | 100 | 99.53 | 283-284 |
platform.js | 100 | 100 | 100 | 100 | |
string.js | 100 | 100 | 100 | 100 | |
utf8.js | 84.33 | 88.23 | 50 | 84.33 | 39-44,63-64,77-81 |
Conformance to specification
- pathname
- 1 failed | 732 passed (733)
- search
- 1 failed | 732 passed (733)
- host
- 733 passed (733)
- password
- 733 passed (733)
- protocol
- 733 passed (733)
- username
- 733 passed (733)
- port
- 733 passed (733)
- fragment
- 733 passed (733)