Last active
August 29, 2015 14:05
-
-
Save lessless/1cc779d9eb0d5ce8aee0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var entities = { | |
address: 1, | |
block: 2, | |
transaction: 3, | |
}; | |
entities.humanize = function (id) { | |
switch (id) { | |
case 1: | |
return 'address'; | |
case 2: | |
return 'block'; | |
case 3: | |
return 'transaction'; | |
} | |
}; | |
export default entities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var address = 1; | |
address.humanize = function () {return 'btcAddress';} | |
var block = 1; | |
block.humanize = function () {return 'btcBlock';} | |
var transaction = 1; | |
transaction.humanize = function () {return 'btcTransaction';} | |
export default { | |
address: address, | |
block: block, | |
transaction: transaction, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment