Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Converts snake-case to camelCase
- String.prototype.toCamel = function () {
- return this.replace(/(-[a-z])/g, $1 => $1.toUpperCase().replace('-', ''));
- };
- // Converts snake-case to camelCase
- String.prototype.toCamel = () => this.replace(/(-[a-z])/g, $1 => $1.toUpperCase().replace('-', ''));
- // Add style to coin
- export const setStyle = (id) => {
- switch (id) {
- case 'basic-attention-token': return style.basicattentiontoken;
- case 'bitcoin-cash': return style[id.toCamel()];
- case 'deepbrain-chain': return style[id.toCamel()];
- case '0x': return style.zrx;
- default: return style[id];
- }
- };
Add Comment
Please, Sign In to add comment