What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-23 04:30:29
javascript check if number
//Updated dec 2020 // The first 2 Variations return a Boolean // They just work the opposite way around // IsInteger if (Number.isInteger(val)) { // It is indeed a number } // isNaN (is not a number) if (isNaN(val)) { // It is not a number } // Anoth... Add solution -
Javascript 2021-11-21 16:55:18
javascript if browser out of focus
var hidden, visibilityChange; if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support hidden = "hidden"; visibilityChange = "visibilitychange"; } else if (typeof document.msHidden !==... Add solution -
TypeScript 2021-11-18 06:11:22
object notation string javascript\
function getValueFromNotation(obj: Object,is: string|any[], value: any = undefined) { if (typeof is == 'string') return getValueFromNotation(obj,is.split('.'), value); else if (is.length==1 && value!==undefined) return obj... Add solution -
Javascript 2021-11-17 15:27:18
save object as file dev tools
function saveDataAsFile(data, filename = "browser-scrapped.json") { if (!data) { console.error('Console.save: No data'); return; } if (typeof data === "object") { data = JSON.stringify(data, undefined, 4); } var blob = ne... Add solution