The module for rendering diagrams on regexplained.co.uk
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
index.js
package.json

README.md

regexplained

The module for rendering diagrams on regexplained.co.uk

This module is designed to work on the client side in browserify. If anyone can submit a pull request that makes this work in node.js as well (with decent cross platform support) I'll gladly accept it.

Usage

index.js

var regexplained = require('regexplained');
var paperContainer = document.getElementById('container');
regexplained(paperContainer, '[0-9][0-9][a-z]+', function(e) {
    if (e) {
      alert(e.stack || e.message);
      throw e;
    } else {
      //done
    }
  });

index.html

<div id="container"></div>
<script src="bundle.js"></script>

In a console:

$ npm install regexplained
$ browserify index.js > bundle.js

License

MIT