Skip to content

Instantly share code, notes, and snippets.

View timothylombrana's full-sized avatar
🐧

Timothy Lombrana timothylombrana

🐧
View GitHub Profile
@timothylombrana
timothylombrana / gist:3b4c3255a8b693c7e5814f28ab5dd7bf
Last active October 9, 2016 23:24
Error installing npm grunt-libsass
➜ git:(master) ✗ node -v
v5.2.0
➜ git:(master) ✗ npm -v
3.3.12
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
> node-sass@0.9.3 install /node_modules/node-sass
> node build.js
@timothylombrana
timothylombrana / dry.ts
Created August 9, 2018 13:57
DRY: don't repeat yourself
createContact = item => {
let items = this.state.items;
let email = this.state.email;
const itemsIncludesEmail = items.some(o => o.email === mail);
const emailValid = EmailValidator.validate(email);
if (items.length < 10 && !itemsIncludesEmail && emailValid) {
this.setState(state => ({
button: true,
items: state.items.concat([item]),