mhulse / basic-node-module Goto Github PK
View Code? Open in Web Editor NEWBasic node module boilerplate using ES2018 async/await syntax.
License: Apache License 2.0
Basic node module boilerplate using ES2018 async/await syntax.
License: Apache License 2.0
https://blog.logrocket.com/design-patterns-in-node-js/
Maybe some good tips here to implement/show.
puppeteer/puppeteer#2859 (comment)
Kinda cool tip. Not sure if this belongs in this repo, but I want to write a tips section here or somewhere.
Check to see that I'm not returning awaits:
Use just throw and try/catch around awaits:
Lines 51 to 65 in 5df8ced
Here's example of just throw:
https://github.com/mhulse/get-tile-url/blob/f79b35889e0ad43fda12053cd1d2a1dcd8ef3b61/index.js#L90
Avoid exporting your class. Use class internally for performance gains, but export a factory that creates instances in order to discourage users from extending your class and avoid forcing callers to use new.
https://medium.com/javascript-scene/why-composition-is-harder-with-classes-c3e627dcd0aa
The above seems to argue that factory functions are preferable over exporting a class from a module.
Need to think about how this relates to what I'm doing here …
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.