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
import moment from 'moment'; | |
export default ({ year, month, day }) => { | |
const locale = 'en-US'; | |
const val = moment() | |
.year(year) | |
.month(month) | |
.date(day); | |
moment.locale(locale); | |
const formatter = moment.localeData().longDateFormat('L'); |
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 getBase64 = fileURL => | |
new Promise(async resolve => { | |
const response = await fetch(fileURL); | |
const blob = await response.blob(); | |
const reader = new FileReader(); | |
reader.readAsDataURL(blob); | |
reader.onloadend = () => { | |
const base64data = reader.result; | |
resolve(base64data); |
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
Math.floor(Math.random() * 100) + 1 | |
// 1 -> start | |
// 100 -> end |
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
{ | |
"key": "shift+alt+f", | |
"command": "editor.action.codeAction", | |
"args": { | |
"kind": "source.fixAll.eslint", | |
"apply": "first" | |
} | |
} |
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
{ | |
"countries": { | |
"colombia": { | |
"name": "Colombia", | |
"code": "CO" | |
}, | |
"egypt": { | |
"name": "Egypt", | |
"code": "EGY" | |
}, |
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
file1 content |
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
file1 |