Kaffeine

Extended Javascript for Pros

Fork me on GitHub

Kaffeine is a set of extensions to the Javascript syntax that attempt to make it nicer to use. It compiles directly into javascript that is very similar, readable and line for line equivalent to the input (you can beautify if you like).

Philosophy

Overview

// Implicit variable declarions:


zoo = {}


// Implicit function definition:


square = { # * # }


// implicit brackets for functions


open door


// alternative method calling mechanism


users | select { #.age > 18 } 


/* for loop extensions */


for user of users
  send.welcome user
// unwrapping async calls via the ! postfix


if Job.count! > 10 {
  data = retrieve!
  

  process data
} 

Features

  • Optional colons
  • Optional semi-colons