Created
April 18, 2019 18:58
-
-
Save waghcwb/99bb2b18b064a2fe355e6339b0a29ec2 to your computer and use it in GitHub Desktop.
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 link = document.getElementById('link') | |
const data = { username: 'waghcwb' } | |
const json = JSON.stringify(data, null, 2) | |
const blob = new Blob([json], { type: 'octet/stream' }) | |
const url = window.URL.createObjectURL(blob) | |
link.href = url | |
link.download = 'username.json' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment