Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple namespace helpers for javascript, written in coffeescript.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 coffeescripts
Octocat-spinner-32 javascripts
Octocat-spinner-32 lib
Octocat-spinner-32 tests
Octocat-spinner-32 vendor
Octocat-spinner-32 wip-coffeescripts
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Rakefile
Octocat-spinner-32 shuriken.gemspec
Octocat-spinner-32 tests.watchr


Pointy javascript namespace helpers and stuff

Shuriken is a lightweight toolset for Javascript, written in coffeescript that provides a lightweight implementation of namespaces and a few other things (e.g. mixins) that I've found have simplified structured javascript development.

Using it is as simple as including the shuriken.js in your app and writing your code:

// declare BHM as a root namespace.
var BHM ='BHM');

// Should print out true.
console.log(BHM instanceof Shuriken.Namespace);

BHM.withNS('Something', function(ns) {

  ns.hello = true;

  ns.sayHello = function() {
    if(ns.hello) console.log("Hello there!");

  ns.setup = function() {


// On document load, unless BHM.autosetup is false,
// BHM.Something.setup() will be automatically called.
// Also,
// will say hello manually. I'm sure you get the picture by now.
Something went wrong with that request. Please try again.