quick-tips
Quick Tips - javascript proxies
Quick Tips - javascript proxies
· ☕ 2 min read
The Proxy object in javascript Allows you to create a wrapper for another object, which can intercept and redefine fundamental operations for that object.

Quick Tips - npm dist tags
Quick Tips - npm dist tags
· ☕ 2 min read
Tags can be used to provide an alias instead of version numbers. For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.

Quick Tips - npm semver tokens
Quick Tips - npm semver tokens
· ☕ 1 min read
You may have noticed before, in package.json files, the dependency versions include a prefix that tell npm how to look for updates.

Quick Tips - npm lifecycle scripts
Quick Tips - npm lifecycle scripts
· ☕ 3 min read
NPM Lifecycle scripts The “scripts” property of your package.json file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts.

Quick Tips - publishing npm packages
Quick Tips - publishing npm packages
· ☕ 4 min read
Publishing an NPM package Things to remember In package.json, make sure you define the following fields before publishing main

Quick Tips - Set in Javascript
Quick Tips - Set in Javascript
· ☕ 3 min read
When writing javascript, most of us default to using objects/arrays when we need to store stuff. It makes the most sense usually, but there are 2 other types that are often slept on.

Quick Tips - Map in Javascript
Quick Tips - Map in Javascript
· ☕ 1 min read
When writing javascript, most of us default to using objects/arrays when we need to store stuff. It makes the most sense usually, but there are 2 other types that are often slept on.

Quick Tips - variadic unions in typescript
Quick Tips - variadic unions in typescript
· ☕ 1 min read
A lot of the time, you want to define union types in typescript, and you would set it up like this by default for a small collection of enumerated values-as-types:

Quick Tips - npm workspaces
Quick Tips - npm workspaces
· ☕ 1 min read
Many of you might be in a similar position to where I was, thinking lerna still served some sort of useful purpose in the node ecosystem, but no, it doesnt apparently.

Quick Tips - cwd vs dirname in node
Quick Tips - cwd vs dirname in node
· ☕ 1 min read
These 2 are commonly used to mean pretty different things in node. process.cwd() is a function that is evaluated to the working directory of the process, by default this is the directory where the process was called from (where “node index.

Quick Tips - Early Returns
Quick Tips - Early Returns
· ☕ 1 min read
A good tip to keep in mind when programming is minimizing your use of else statements. When possible, exit the function context earlier given a value that establishes the given return, rather than reflecting that with an else statement to check for something else.