[轉]140 favorite JavaScript utilities in single line of code! No more!

https://1loc.dev/

2020-05-14 · 1 min · word · Me

vs code 無法使用eslint

In personal setting.json for vs code``` “eslint.workingDirectories”: [ { “mode”: “auto” } ],

2020-05-06 · 1 min · 13 words · Me

[轉]Junior Vs Senior Code - How To Write Better Code

https://www.youtube.com/watch?v=g2nMKzhkvxw

2020-05-03 · 1 min · word · Me

[轉]How To Manage User Roles In Node.js

https://www.youtube.com/watch?v=jI4K7L-LI58

2020-04-30 · 1 min · word · Me

Promise.all map

const arr = {}; await Promise.all( UsersQuery.map(async function (data) { const city = await db.sequelize.query(` select * from city `, type: db.sequelize.QueryTypes.SELECT }); arr[data.user_id] = city[0].name; }) } UsersQuery.forEach(async function (data, index) { this[index].name = arr[data.user_id]; }, UsersQuery);

2020-04-20 · 1 min · 38 words · Me