Skip to content

Instantly share code, notes, and snippets.

View jakerobers's full-sized avatar
🏠
Working from home

Jake Robers jakerobers

🏠
Working from home
View GitHub Profile
interface Validator {
isValid: () => bool,
getErrorMessage: () => string
}
interface Quantity {
isValid: () => bool,
getRaw: () => string,
getValue: () => number,
}
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: {
raw: '3',
value: 3,
validation: {
isValid: true,
errMessage: ""
}
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: {
raw: '3',
value: 3,
isValid: true,
},
price: 100
}
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: '3',
price: 100
};
const total = Number(product.quantity) * product.price;
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: '3',
price: 100
};
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: 3,
price: 100
};
<section class="webring">
<h3>Articles from blogs I follow around the net</h3>
<section class="flex flex-wrap articles" style='margin: -0.5rem;'>
{{range .Articles}}
<div class="flex flex-auto flex-column pa2 bg-light-gray w4">
<h4 class="ma0">
<a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a>
</h4>
<p class="f6 flex-auto">{{.Summary}}</p>
<small class="source">
[
['Status', 'Payment Date', 'Type', 'Amount', 'Receipt Number'],
['Paid','01/01/2020','A','$1000','1234'],
['Paid','02/01/2020','A','$1000','1235'],
['Paid','03/01/2020','A','$1000','1236']
]
[
['Status', 'Payment Date', 'Type', 'Amount', 'Receipt Number'],
['Paid','01/01/2020','A','$1000','1234'],
['Paid','02/01/2020','A','$1000','1235'],
['Paid','03/01/2020','A','$1000','1236']
]
[
{
'Status': 'Paid',
'Payment Date': '01/01/2020',
'Type': 'A',
'Amount': '$1000',
'Receipt Number': '1234'
},
...
]