@robert.tools/uri
v1.0.0
Published
function to handle an uri
Maintainers
Readme
🗂️ @robert.tools/uri
Function to handle a URI (Uniform Resource Identifier).
Note
- URL is reserved type
📜 Usage
🟢 Installation
npm install @robert.tools/uri📝 Sample usage
import { getHostname } from '@robert.tools/uri';
getHostname('https://www.example.com'); // 'www.example.com'🗃️ commands
After an npm install with npm i the following commands are available:
- get hostname:
getHostname(url) - get second level domain:
getSLD(url) - get URL ID from curl command:
getUrlID(request) - get URL key:
getUrlKey(url)
⚖️ Notes
This software is hand-crafted, test-driven and assisted by AI tools. I know each line of my code. ✌️
| Tool | Comment | | ------------- | ------------- | | | Test-driven development with Jest | | | Part of the robert.tools ecosystem | | | Code completion | | | chatGPT research |
