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.
-
quill
Quill is a modern WYSIWYG editor built for compatibility and extensibility. -
slate
A completely customizable framework for building rich text editors. (Currently in beta.) -
Quasar Framework
Quasar Framework - Build high-performance VueJS user interfaces in record time -
medium-editor
Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution. -
TOAST UI Editor
๐๐ Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible. -
TinyMCE
The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular -
jsoneditor
A web-based tool to view, edit, format, and validate JSON -
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. -
bootstrap-wysiwyg
Tiny bootstrap-compatible WYSIWYG rich text editor. -
wysihtml5
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. -
Froala Editor
The next generation Javascript WYSIWYG HTML Editor. -
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. -
Trumbowyg
A lightweight and amazing WYSIWYG JavaScript editor under 10kB -
ContentTools
A JS library for building WYSIWYG editors for HTML content. -
jquery-notebook
A modern, simple and elegant WYSIWYG rich text editor. -
Mobiledoc Kit
A toolkit for building WYSIWYG editors with Mobiledoc -
ckeditor-releases
Official distribution releases of CKEditor 4. -
Materio Free Vuetify VueJS Admin Template
Production Ready, Carefully Crafted, Extensive Vuetifty Free Admin Template ๐คฉ -
Monod
:notebook: Our cool, secure, and offline-first Markdown editor. -
Bangle.dev
Collection of higher level rich text editing tools. It powers the local only note taking app https://bangle.io -
walker.js
Simple & lightweight tracking implementation layer based on attributes -
Zepcode
โ๏ธ Zeplin extension that generates Swift snippets from colors, fonts, and layers -
#<Sawyer::Resource:0x00007fbac98da410>
Basic operations on iterables -
React Chat UI
Build your own chat UI with React components in a few minutes. Chat UI Kit from minchat.io is an open source UI toolkit for developing web chat applications. -
react-component-widget
Component for resizing and repositioning charts, parsing transferred data when working with Recharts library. -
convert-plain-text-into-links
An npm module which replaces any plain text link within string with achor tag
Appwrite - The Open Source Firebase alternative introduces iOS support
* 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)