Skip to content

Instantly share code, notes, and snippets.

@lessless
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lessless/1cc779d9eb0d5ce8aee0 to your computer and use it in GitHub Desktop.
Save lessless/1cc779d9eb0d5ce8aee0 to your computer and use it in GitHub Desktop.
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;
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