Skip to content

Instantly share code, notes, and snippets.

View chee's full-sized avatar
🍕
partying

chee chee

🍕
partying
View GitHub Profile
export default (...functions) => (...args) =>
functions
.slice(0, -1)
.reduceRight(
(result, fn) => fn(result),
functions[functions.length - 1](...args)
)
@chee
chee / package.json
Created October 31, 2018 10:54
oh no a nest
{
"name": "honk",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "chee <chee@snoot.club>",
@chee
chee / package.json
Created October 31, 2018 07:13
rely on version 1
{
"name": "relyonversion1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "chee <chee@snoot.club>",
@chee
chee / package.json
Created October 31, 2018 07:12
reliesondep11
{
"name": "relyonversion2",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "chee <chee@snoot.club>",
@chee
chee / package.json
Last active October 31, 2018 07:23
{
"name": "dep1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"install": "[ $(pwd | grep node_modules -o | wc -l) == 1 ] || (echo i am conflicted please help && exit 22)"
},
"keywords": [],
"author": "chee <chee@snoot.club>",
@chee
chee / package.json
Last active October 31, 2018 07:24
{
"name": "dep1",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {
"install": "[ $(pwd | grep node_modules -o | wc -l) == 1 ] || (echo i am conflicted please help && exit 22)"
},
"keywords": [],
"author": "chee <chee@snoot.club>",
@chee
chee / number-words.js
Last active September 15, 2018 16:34
function deconstructor({words, number, base}) {
const which = Math.log(number) / Math.log(base) | 0
const amount = Math.pow(base, which)
const prefix = number / amount | 0
const round = amount * prefix
return {
number: prefix,
remainder: number - round,
word: words[which]
}
@chee
chee / lol.json
Last active September 6, 2018 16:04
{
"lol": "hi",
"array": ["a", "b", "c"]
}
@chee
chee / bigify.js
Last active August 14, 2018 13:36 — forked from rowanmanning/bigify.js
Bigify
#!/usr/bin/env node
charactermap = new Proxy({
' ': 'blank',
'?': 'question',
'!': 'exclamation'
}, {
get: (object, key) =>
key in object
? object[key]
data = require('./data.json')
escape = char => `\\${char}`
special = new RegExp(
'[' +
'( ) { } [ ] | \\ ^ $ * + ? .'
.split``
.map(escape)
.join('|') +