Skip to content

Instantly share code, notes, and snippets.

View YarivGilad's full-sized avatar

Yariv Gilad YarivGilad

View GitHub Profile
import fs from 'fs/promises';
import log from '@ajar/marker';
console.time('benchmark');
const DIR_PATH = './LEADS';
const users = [];
// 1 - read the directory --> [fileNames...]
fs.readdir(DIR_PATH)
.then((files_names)=> {
// 2 - loop over file names array
// ---------------------------------
// write data to a file
// ---------------------------------
// import fs from 'fs';
// const heros = [
// { name: "Tyrion Lannister", minutes: 166, seconds: 15, episodes: 28, family: "Lannister", url: "http://gameofthrones.wikia.com/wiki/Tyrion_Lannister" },
// { name: "Daenerys Targaryen", minutes: 127, seconds: 35, episodes: 25, family: "Targaryen", url: "http://gameofthrones.wikia.com/wiki/Daenerys_Targaryen"},
// { name: "Jon Snow", minutes: 126, seconds: 41, episodes: 24, family: "Night's Watch", url: "http://gameofthrones.wikia.com/wiki/Jon_Snow" },
export default {
AC: {
code: "AC",
unicode: "U+1F1E6 U+1F1E8",
name: "Ascension Island",
emoji: "🇦🇨"
},
AD: {
code: "AD",
unicode: "U+1F1E6 U+1F1E9",
@YarivGilad
YarivGilad / Project.js
Last active September 13, 2015 13:05
Testing Node.js v4.0.0 modular ES6 syntax
//-----------------------
// ./lib/Project.js
//------------------------
"use strict";
class Project {
constructor(name) {
this.name = name;
}
start() {