Skip to content

Releases: Becklyn/javascript-router

1.0.3

10 Dec 15:58
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Ensure that passed parameters are never modified.

Commits

  • Immutable parameters (#4) 0ab1308
  • Extend test case 2af68b2
  • Ensure that passed parameters are never modified 8e9abfe
  • Bump ava bf2de8f
  • Add test to ensure that parameters are not modified d7f71eb
  • Fix typo in comment 7fb67c3

1.0.2...1.0.3

1.0.2

22 Oct 21:12
Compare
Choose a tag to compare

✨ Improvements

  • Add module key in package.json.
  • Remove dependency on mojave.

Commits

  • Add module in package.json + remove mojave dependency 6194c5b

1.0.1...1.0.2

1.0.1

05 Aug 09:13
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Fixed internal types in the Router.

Commits

1.0.0...1.0.1

1.0.0

31 Jul 07:58
f230b19
Compare
Choose a tag to compare

Symfony JavaScript Router

This is a modern implementation of the JS router for generation Symfony routes.
Best to be used with the JavaScript routing bundle.

Initialization

For example like this (using mojave):

import {initFromGlobalData} from "mojave/init"; 
import {Router} from "@becklyn/router";

let router = initFromGlobalData("RouterInit", new Router());

A manual way to wire it up to global data is like this:

function loadGlobalData (key, handler)
{
    if (undefined === window[key])
    {
        return;
    }

    // replace global callback
    window[key].init = (data) => handler.init(data);
    // handle current data
    handler.init(window[key].data);
}

let router = new Router();
loadGlobalData("RouterInit", router);