Skip to content

Instantly share code, notes, and snippets.

@elubow
elubow / gist:825135
Created February 13, 2011 21:14 — forked from mraleph/gist:825124
std::string tag_key, tag_value;
bool has_tags = false;
map<string,string> tags;
if (!args[1]->IsUndefined()) {
Local<Object> tagsObj = args[1]->ToObject();
Local<Array> tagNames = tagsObj->GetPropertyNames();
uint32_t length = tagNames->Length();
for (uint32_t i=0; i<length;i++) {
Local<String> v8TagKey = tagNames->Get(i)->ToString();
Local<String> v8TagValue = tagsObj->Get(v8TagKey)->ToString();