let setAll = (obj, val) => Object.keys(obj).forEach(k => obj[k] = val);
let setNull = obj => setAll(obj, null);
setNull(this.inspectionDetail);
const stripHTMLTags = str => str.replace(/<[^>]*>/g, '');
function numberToStringWithComma(number) {
// convert number to string
let str = String(number);
let s = '';
let count = 0;
for (let i = str.length - 1; i >= 0; i--) {
s = str[i] + s
count++
// add a comma to every three numbers
if (count % 3 == 0 && i != 0) {
s = ',' + s
}
}
return s
}
https://gist.github.com/branneman/8048520
<script src="https://gist.github.com/branneman/8048520.js"></script>console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)