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

properjs-pagecontroller

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

properjs-pagecontroller

Lightweight, event driven JS router with History.

latest
Source
npmnpm
Version
0.5.0
Version published
Weekly downloads
38
533.33%
Maintainers
1
Weekly downloads
 
Created
Source

ProperJS // PageController

Lightweight, event driven JS router with History.

Installation

npm i properjs-pagecontroller --save-dev

Usage

import PageController from "properjs-pagecontroller";

const pageController = new PageController({
    transitionTime: 0, // Default
    routerOptions: { // Default
        historyOptions: {},
    },
    routes: ["*"], // Default
});

pageController.on( "samepage", ( data ) => {
    console.log( "samepage", data );
});

pageController.on( "document", ( data ) => {
    console.log( "document", data );
});

pageController.on( "transition-out", ( data ) => {
    console.log( "transition-out", data );
});

pageController.on( "transition-in", ( data ) => {
    console.log( "transition-in", data );
});

pageController.on( "initialized", ( data ) => {
    console.log( "initialized", data );
});

pageController.bind(); // Your webapp is now bound and using ProperJS/Router

setTimeout(() => {
    pageController.routeSilently( "http://localhost:9999/another/route" );

}, 2000 );

Keywords

properjs

FAQs

Package last updated on 11 Jun 2020

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