Skip to content

Instantly share code, notes, and snippets.

View nxnzesrc's full-sized avatar
🖤
for the love of code

nxnze nxnzesrc

🖤
for the love of code
View GitHub Profile
@nxnzesrc
nxnzesrc / why-comments.js
Last active December 5, 2017 16:50
Commenting on comments (why comments)
import { isString, isObject } from 'lodash';
function updateAnswer(updateCommand, typeKeys) {
if (!updateCommand || !typeKeys) {
return;
}
// The first iteration of the application knew `typeKeys` as a string.
// As the scope evolved, functionality extended to build up an object of `typeKeys` to support
@nxnzesrc
nxnzesrc / what-comments.js
Last active December 5, 2017 16:20
Commenting on comments (what comments)
import { isString, isObject } from 'lodash';
function updateAnswer(updateCommand, typeKeys) {
// If either of `updateCommand` or `typeKeys`
// is null or defined, then we can stop here and just return
if (!updateCommand || !typeKeys) {
return;
}
@nxnzesrc
nxnzesrc / no-comments.js
Last active December 5, 2017 16:16
Commenting on comments (no comments)
import { isString, isObject } from 'lodash';
function updateAnswer(updateCommand, typeKeys) {
if (!updateCommand || !typeKeys) {
return;
}
if (isString(typeKeys)) {
return {