Skip to content

Instantly share code, notes, and snippets.

@cha0s
Created July 7, 2012 02:07
Show Gist options
  • Save cha0s/3063848 to your computer and use it in GitHub Desktop.
Save cha0s/3063848 to your computer and use it in GitHub Desktop.
// array = [
// "#{value.candidates[0]}:#{value.index}"
// value.argTypes.map (argType) -> {V: [newCustomValue argType]}
// ]
array->Set(0, String::New((value.candidates[0] + ":" + value.index).toAscii()));
Handle<Array> args = Array::New();
for (int i = 0; i < value.argTypes.length(); i++) {
Handle<Array> a = Array::New();
a->Set(0, newCustomValue(value.argTypes[i]));
Handle<Object> v = Object::New();
v->Set(String::New("V"), a);
args->Set(i, v);
}
array->Set(1, args);
@cha0s
Copy link
Author

cha0s commented Jul 7, 2012

    // array = [
    //  value.candidates[0] + ':' + value.index,
    //  value.argTypes.map(function(argType) { {V: [newCustomValue(argType)]}; });
    // ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment