define-generic
v0.3.0
Published
Simple single dispatch generic functions
Downloads
8
Maintainers
Readme
define-generic
Simple single dispatch generic functions
var defineGeneric = require('define-generic');
defineGeneric(methods/*Object*/, selector/*Function*/) -> genericFunction
genericFunction.for(key/*String*/, method/*Function*/) -> genericFunction
genericFunction.implements(...parameters) -> Bool
genericFunction(...parameters) -> Any