Skip to content

Instantly share code, notes, and snippets.

@deanhume
Created September 20, 2017 08:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deanhume/8da8dda662c3c3578064d02eac614e99 to your computer and use it in GitHub Desktop.
Save deanhume/8da8dda662c3c3578064d02eac614e99 to your computer and use it in GitHub Desktop.
Storage Estimate
if ('storage' in navigator && 'estimate' in navigator.storage) {
navigator.storage.estimate().then(estimate => {
console.log(`Using ${estimate.usage} out of ${estimate.quota} bytes.`);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment