Skip to content

Instantly share code, notes, and snippets.

@oguzhanaslan
oguzhanaslan / findvsfind.js
Created May 29, 2018 12:24
find() vs _.find
var users = [
{ 'user': 'oğuzhan', 'age': 36, 'active': true },
{ 'user': 'aslan', 'age': 41, 'active': false },
{ 'user': 'can', 'age': 14, 'active': false },
{ 'user': 'mehmet', 'age': 16, 'active': true },
{ 'user': 'ahmet', 'age': 11, 'active': true },
];
// lodash
_.find(users, function (o) { return o.age < 40; })
@oguzhanaslan
oguzhanaslan / _.includesvsincludes.js
Last active May 30, 2018 08:06
_.includes vs includes()
var data = ['mustafa', 'kemal', 'atatürk'];
// lodash
_.includes(data, 'kemal');
// JavaScript
data.includes('kemal');
@oguzhanaslan
oguzhanaslan / _.everyvsevery.js
Created May 30, 2018 08:33
_.every vs every()
var value = [{a: 30310}, {b: 100303}, {c: 3040494}]
// lodash
_.every(value, (v,i) => {})
// JavaScript
value.every((v,i) => {})
@oguzhanaslan
oguzhanaslan / package.json
Created October 22, 2018 09:13 — forked from adamreisnz/package.json
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Buczynski",
"url": "http://adambuczynski.com"
},
"license": "UNLICENSED",
// routes.js
const routes = [
{
path: '/',
component: Home,
exact: true
},
{
path: '/gists',
component: Gists

Overview

Problem statement

Describe the problem you're trying to solve by doing this work.

Proposed work

High-level overview of what we're building and why we think it will solve the problem.