# Errors are notated by a diff block - Lines colored in red are the observed errors ! Lines colored in orange are 1R's temporary fix or resolution for testing purposes + Lines colored in green are a potential permanent resolution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertArrayObjectsToArrays (obj) { | |
return (function _traverse (obj) { | |
if (Object.prototype.toString.call(obj) === '[object Array]') { | |
return obj.map(el => _traverse(el)); | |
} | |
else if (obj && Object.prototype.toString.call(obj) === '[object Object]') { | |
const keys = Object.keys(obj); | |
if (!keys.length || keys.find(key => !/\d/.test(key))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root":true, | |
"parserOptions":{ | |
"parser":"babel-eslint" | |
}, | |
"env":{ | |
"node":true | |
}, | |
"extends":[ | |
"eslint:recommended", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Examples: | |
# fileio hello.txt # paste file (name/ext will be set). | |
# echo Hello world. | fileio # read from STDIN (won't set name/ext). | |
# fileio -n 1d self_destruct.txt # paste will be deleted after one day, downloaded or not. | |
# # can set \d(d|w|m|y) for weeks, months, years. | |
fileio() { | |
local query |