New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ruteurl

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ruteurl

Routing for your OPA

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Rute

Hands on routing for one page apps

Version is 0.0.2

CDN

Include from unpkg

<script src="//unpkg.com/ruteurl"></script>

Example

Rute
  .add('/about', function() {
      console.log('about ');
  })
  .add('/user/:id/product/:prod', function(A, B) {
      console.log(A, B);
  })
  .add(function() {
      console.log('default');
  })
  .check()    // Check if the page when it loads is pointing to a url
  .listen()   //  Start listening to url changes

How to use

Use by linking to

<a href="#!/about">About</a>

or from javascript

Rute.goto('/user/54/product/car');

License: MIT

Philosophy: Merging the best from Krasimir Tsonevs "A modern JavaScript router in 100 lines" and regex dance from Routie

FAQs

Package last updated on 07 Dec 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