JSPM

  • Created
  • Published
  • Downloads 4243
  • Score
    100M100P100Q126220F

Node.js url module for Gjs

Package Exports

  • @gjsify/url

Readme

@gjsify/url

GJS implementation of the Node.js url module using GLib.Uri. Provides URL and URLSearchParams.

Part of the gjsify project — Node.js and Web APIs for GJS (GNOME JavaScript).

Installation

npm install @gjsify/url
# or
yarn add @gjsify/url

Usage

import { URL, URLSearchParams } from '@gjsify/url';

const url = new URL('https://example.com/path?foo=bar');
console.log(url.hostname); // 'example.com'
console.log(url.searchParams.get('foo')); // 'bar'

Inspirations and credits

License

MIT