Skip to content

Instantly share code, notes, and snippets.

View roguealexander's full-sized avatar

Rogue Rotkosky roguealexander

View GitHub Profile
@roguealexander
roguealexander / gist:191b3a376baf3c44a32476ba7ae3d636
Last active March 20, 2021 18:47
Stakenet Masternode Value Calculations
Data - // stored as reactive variables. If converting to react the data would exist in the state
Computed Properties - // when Data changes, these update automatically. If converting to react these would be in the component body and update each rerender
// In computed properties, this._______ refers to the variable in data (state in react), can also be referred to as variables
// ex: (computed property) xsnPrice: function() { ... }, can be referred to in another computed property as this.xsnPrice
Helper Functions:
toFinString: function (x, fixed = 2) {
if (x < 1000000) {
return x.toFixed(fixed).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");