Skip to content
anvakaPublic

About

I have lots of ideas, not so much time. Just dump my ideas here. Feel free to implement them.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

todo

I have lots of ideas, not so much time. Just dump my ideas here, without any particular order. Feel free to implement them.

Browserify plugin to generate guard statements.

When browserifying a file, produce a guard statements where required. E.g.

module.exports = user;

function greet(user) {
 return "Hello " + user.getName();
}

This code uses method getName of user, without even checking three assumptions:

  1. user is defined
  2. getName is defined
  3. getName is a function

We could do:

module.exports = user;
var guard = require('... guard module ... ');

function greet(user) {
  guard(greet); // protect ourselves!
  return "Hello " + user.getName();
}

When this code is browserified we could run a transform which will inject all guarding logic:

module.exports = user;
var guard = require('... guard module ... ');

function greet(user) {
 guard(user).has('getName()');

 return "Hello " + user.getName();
}

Generate web-friendly builds for commonjs packages

When you have a browser-friendly commonjs package, it's often desirable to just play with it on jsbin/jsfiddle. It would be nice to have a script which automatically browserifies and publishes package to gh-pages, so, that users can just copy-paste link to browserified version.

One can use http://requirebin.com/ or browserify as a service too. These are awesome tools. I just find requirebin less user friendly who needs html/css too. Whereas browserify-cdn is potentially not as reliable as gh-pages.

ZSH <=> JS transpiler

Could be fun to write this transpiler...

About

I have lots of ideas, not so much time. Just dump my ideas here. Feel free to implement them.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors