Nostalgic Piano Music

    reru

    0.1.0 • Public • Published

    reru

    Stupidly simple regular expression pushState router.

    build status dependency status dev dependency status

    browser support

    Example

    var reru = require('reru');
     
    reru(/.*/, function () {
      content.innerHTML = '';
    });
     
    reru('^/$', function () {
      var p = document.createElement('p');
      p.appendChild(document.createTextNode('Welcome'));
      content.appendChild(p);
    });
     
    reru('^/(\\d{4})$', function (year) {
      var p = document.createElement('p');
      p.appendChild(document.createTextNode('Archive for' + year));
      content.appendChild(p);
    });

    License

    MIT

    Keywords

    none

    Install

    npm i reru

    DownloadsWeekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • uggedal