Skip to content

Instantly share code, notes, and snippets.

View collardeau's full-sized avatar
🏠
Working from home

Thomas Collardeau collardeau

🏠
Working from home
View GitHub Profile
const getFirstName = name => {
if(name === null) return null; // new
return name.split(" ")[1];
}
const getFirstLetter = word => {
if(word === null) return null; // new
return word[0];
}
const pipe = require("ramda").pipe; // node or webpack/browserify
const firstInitial = pipe(getFirstName, getFirstLetter);