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
- opt-in extensions: vanilla Javascript works as normal
- limited but focussed feature set
- Hackable, modular, extendable and testable
- Line-for-line equivalence for easy debugging (unless beautified)
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