Sharing is Caring - Patterns for JavaScript Library Design
summary
Describes concrete API decisions: compares static invocation (Request, LoDash) with factory/chaining (Q, jQuery, Moment), shows how an overloaded Moment constructor spawns support load (2,400 closed issues, 176 open) and argues required params then an options object cleans parsing, highlights best by default (Request auto-follows redirects) vs no obvious default (Moment time/UTC confusion), and recommends throwing clear developer errors (Immutable rejects bad constructors) while keeping defaults only when a single right answer exists.
AI-written summary · about
chapters (6)
- 0:00Start
- 7:24Invocation
- 10:41Configuration
- 14:39Defaults
- 21:31Good! Bad user input doesn't crash the Node.js process.
- 22:06Throw on Obvious Developer Error
related talks
40mPIMP Your JS Library or Desgning Non-Shit APIs with JavaScript
42mYour library sucks, and why you should use it
24mThe missing guide for deciding between 3rd party library and custom code -JSWORLD 2023
27mDrawing the line between 3rd party and handcrafted code
01h 12mJS UX: Writing code for humans
21mAsk not what JavaScript can do for you
23mWhat Can We Learn With JavaScript Fatigue?
25mDefault to Consistent
