msn0 / ale-url-parser Goto Github PK
View Code? Open in Web Editor NEW๐บ Top fermented URL parser and stringifier built with performance and small size in mind.
License: MIT License
๐บ Top fermented URL parser and stringifier built with performance and small size in mind.
License: MIT License
Change host to hostname and path to pathname to make it more compatible with https://nodejs.org/api/url.html
Here's what require('url').parse
returns:
{
protocol: 'https:',
slashes: true,
auth: null,
host: 'aaa.com:34567',
port: '34567',
hostname: 'aaa.com',
hash: null,
search: '?baz',
query: 'baz',
pathname: '/foo/bar',
path: '/foo/bar?baz',
href: 'https://aaa.com:34567/foo/bar?baz'
}
For
parse('domain.lol');
I want to get full object, even when parameters are empty
{
protocol: 'http',
host: 'domain.lol',
path: [],
query: {},
hash: ''
}
We need to compare NodeJS's url parse/format (https://nodejs.org/api/url.html) with ale-url-parsers parse/stringify. https://github.com/mcollina/autocannon might be a good way to create benchmarks.
Would be nice to support module property https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md along with main property.
For the old-school main we should expose umd module.
Provide "browser" version of this module with package.json/browser field.
https://webpack.js.org/configuration/resolve/#resolve-mainfields
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.