Hungarian notation may be ugly, but as long as you can use it for magic, that doesn't matter (much).
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.
LICENSE
README.md
index.js
package.json
test.js

README.md

Installation:

npm install hungarian-magic

Wraps a function, an array of functions or an object containing functions.

Supported hungarian prefixes:

  • str: String
  • cb: Function
  • fn: function
  • func: function
  • num: number
  • obj: Object
  • bool: boolean

Either just use the prefix as variable name or continue it either camelCase-like (numAge) or with an underscore (num_age).

Usage example with dnode:

var hungarianWrap = require('hungarian-magic');
var server = dnode(hungarianWrap({
    zing : function (num, cb) { cb(num * 100) }
}));