You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
383 B
19 lines
383 B
10 years ago
|
var addressName = {"0x12378912345789": "Gav", "0x57835893478594739854": "Jeff"};
|
||
|
var nameAddress = {};
|
||
|
|
||
|
for (var prop in addressName) {
|
||
|
if (addressName.hasOwnProperty(prop)) {
|
||
|
nameAddress[addressName[prop]] = prop;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var local = {
|
||
|
addressBook:{
|
||
|
byName: addressName,
|
||
|
byAddress: nameAddress
|
||
|
}
|
||
|
};
|
||
|
|
||
|
if (typeof(module) !== "undefined")
|
||
|
module.exports = local;
|