๐
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const deserializeBoolean = (value: string) => value === 'true'; | |
const deserializeString = (value: string) => value; | |
const deserializeNumber = (value: string) => parseInt(value); | |
const serializeBoolean = (value: boolean) => value ? 'true' : 'false'; | |
const serializeString = (value: string) => value; | |
const serializeNumber = (value: number) => number.toFixed(); | |
/** | |
* Each key-value storage key needs a function to deserialize its string value | |
* from the database into its own type. Each type is specified in KeyValueStorage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example loading adtag.js , 755 is the google vendor id | |
loadWithConsent(755, [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], function() { | |
var adtag = document.createElement('script'); | |
adtag.type = 'module'; adtag.async = true; | |
adtag.src = 'https://studis.h5v.eu/latest/moli.min.mjs'; | |
var outs = document.getElementsByTagName('script')[0]; | |
outs.parentNode.insertBefore(adtag, outs); | |
}); |
OlderNewer