Socket
Book a DemoInstallSign in
Socket

gluonjs-router

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gluonjs-router

A minimal router

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

gluon-router

A simple router exposed as an ES6 module. If enabled, it intercepts browser navigation to same-origin locations, and fires a callback instead.

Usage

import { onRouteChange } from '/src/gluon-router.js';

// This callback is fired whenever a navigation takes place, and passes the path, query parameters, and hash of the new location
onRouteChange((path, query, hash) => {
  console.log("PATH: ", path);
  console.log("QUERY: ", query);
  console.log("HASH: ", hash);
});

About Gluonjs

Gluonjs is a minimal Web Component framework designed for simplicity and speed. It borrows some ideas from Polymer, but is mostly based on platform features. The source for the ES6 version is only ~40 lines of javascript.

Keywords

web-components

FAQs

Package last updated on 22 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.