lib/core.js
function copyIvarList (classPtr) {
  var rtn = []
    , numIvars = ref.alloc('uint')
    , ivars = objc.class_copyIvarList(classPtr, numIvars)
    , count = numIvars.deref();

  for (var i=0; i<count; i++)
    rtn.push(objc.ivar_getName(ivars.readPointer(i * ref.sizeof.pointer)));

  free(ivars);
  return rtn;
}
function copyIvarList (classPtr) {
  var rtn = []
    , numIvars = ref.alloc('uint')
    , ivars = objc.class_copyIvarList(classPtr, numIvars)
    , count = numIvars.deref();

  for (var i=0; i<count; i++)
    rtn.push(objc.ivar_getName(ivars.readPointer(i * ref.sizeof.pointer)));

  free(ivars);
  return rtn;
}
function copyIvarList ( classPtr ) { var rtn = [ ] , numIvars = ref . alloc ( 'uint' ) , ivars = objc . class_copyIvarList ( classPtr , numIvars ) , count = numIvars . deref ( ) ; for ( var i = 0 ; i < count ; i ++ ) rtn . push ( objc . ivar_getName ( ivars . readPointer ( i * ref . sizeof . pointer ) ) ) ; free ( ivars ) ; return rtn ; }
Copies and returns an Array of the instance variables defined by a given
Class pointer. To get class variables, call this function on a metaclass.
Copies and returns an Array of the instance variables defined by a given Class pointer . To get class variables call this function on a metaclass .