fing
Meta tools for Node/Javascript
Usage
By example
coffee> require 'fing' coffee> Function: Thingcoffee> coffee> coffee> Thingfing type: 'prototype'# <------------------ is a 'class' or function name: 'Thing' args: # <------------------ constructor / function signature id: 1 ref: 'prototype:Thing:1' coffee> thing1 = coffee> coffee> thing1fing type: 'instance'# <------------------- an instance of a 'class' name: 'Thing' args: # <------------------- constructor signature id: 2# <------------------- unique ref: 'instance:Thing:2' coffee> thing2 = coffee> thing2fing type: 'instance' name: 'Thing' args: id: 3 ref: 'instance:Thing:3' # <------------ unique reference coffee> Thingfing type: 'prototype' name: 'Thing' args: id: 1# <--------------- Thing still has id 1 ref: 'prototype:Thing:1' coffee> = Functioncoffee> fnfing type: 'prototype' name: ''# <---- anonymous function args: name: 'arg1' name: 'arg2' # <---- function arg signature id: 5# <---- unique id ref: 'prototype::5' coffee> = -> fingtraceFunctioncoffee> test call: 'test' file: 'evalmachine.<anonymous>' line: 4 col: 15 coffee>
Identity
The generated identity is only ensured unique for single threaded environments, eg. Nodejs
ChangeLog
2013-03-27 v0.0.5
- Protected prototype override from multiple requires
2013-02-24 v0.0.4
- Added fing.trace()
2013-02-18 v0.0.3
- Added ano_ther underscode to __id
- Hid ___id away, as a non enumerating property
2013-02-09 v0.0.2
- Added <object|function/prototype>.fing.[type,name,args,id,ref]
2013-02-04 v0.0.1
- Added .fing.args (= [{name:'arg1name'},{name:'arg2name'},...])