$
This commit is contained in:
65
node_modules/prelude-ls/lib/Func.js
generated
vendored
Normal file
65
node_modules/prelude-ls/lib/Func.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
// Generated by LiveScript 1.4.0
|
||||
var apply, curry, flip, fix, over, memoize, slice$ = [].slice, toString$ = {}.toString;
|
||||
apply = curry$(function(f, list){
|
||||
return f.apply(null, list);
|
||||
});
|
||||
curry = function(f){
|
||||
return curry$(f);
|
||||
};
|
||||
flip = curry$(function(f, x, y){
|
||||
return f(y, x);
|
||||
});
|
||||
fix = function(f){
|
||||
return function(g){
|
||||
return function(){
|
||||
return f(g(g)).apply(null, arguments);
|
||||
};
|
||||
}(function(g){
|
||||
return function(){
|
||||
return f(g(g)).apply(null, arguments);
|
||||
};
|
||||
});
|
||||
};
|
||||
over = curry$(function(f, g, x, y){
|
||||
return f(g(x), g(y));
|
||||
});
|
||||
memoize = function(f){
|
||||
var memo;
|
||||
memo = {};
|
||||
return function(){
|
||||
var args, key, arg;
|
||||
args = slice$.call(arguments);
|
||||
key = (function(){
|
||||
var i$, ref$, len$, results$ = [];
|
||||
for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) {
|
||||
arg = ref$[i$];
|
||||
results$.push(arg + toString$.call(arg).slice(8, -1));
|
||||
}
|
||||
return results$;
|
||||
}()).join('');
|
||||
return memo[key] = key in memo
|
||||
? memo[key]
|
||||
: f.apply(null, args);
|
||||
};
|
||||
};
|
||||
module.exports = {
|
||||
curry: curry,
|
||||
flip: flip,
|
||||
fix: fix,
|
||||
apply: apply,
|
||||
over: over,
|
||||
memoize: memoize
|
||||
};
|
||||
function curry$(f, bound){
|
||||
var context,
|
||||
_curry = function(args) {
|
||||
return f.length > 1 ? function(){
|
||||
var params = args ? args.concat() : [];
|
||||
context = bound ? context || this : this;
|
||||
return params.push.apply(params, arguments) <
|
||||
f.length && arguments.length ?
|
||||
_curry.call(context, params) : f.apply(context, params);
|
||||
} : f;
|
||||
};
|
||||
return _curry();
|
||||
}
|
686
node_modules/prelude-ls/lib/List.js
generated
vendored
Normal file
686
node_modules/prelude-ls/lib/List.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
130
node_modules/prelude-ls/lib/Num.js
generated
vendored
Normal file
130
node_modules/prelude-ls/lib/Num.js
generated
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
// Generated by LiveScript 1.4.0
|
||||
var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm;
|
||||
max = curry$(function(x$, y$){
|
||||
return x$ > y$ ? x$ : y$;
|
||||
});
|
||||
min = curry$(function(x$, y$){
|
||||
return x$ < y$ ? x$ : y$;
|
||||
});
|
||||
negate = function(x){
|
||||
return -x;
|
||||
};
|
||||
abs = Math.abs;
|
||||
signum = function(x){
|
||||
if (x < 0) {
|
||||
return -1;
|
||||
} else if (x > 0) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
quot = curry$(function(x, y){
|
||||
return ~~(x / y);
|
||||
});
|
||||
rem = curry$(function(x$, y$){
|
||||
return x$ % y$;
|
||||
});
|
||||
div = curry$(function(x, y){
|
||||
return Math.floor(x / y);
|
||||
});
|
||||
mod = curry$(function(x$, y$){
|
||||
var ref$;
|
||||
return (((x$) % (ref$ = y$) + ref$) % ref$);
|
||||
});
|
||||
recip = (function(it){
|
||||
return 1 / it;
|
||||
});
|
||||
pi = Math.PI;
|
||||
tau = pi * 2;
|
||||
exp = Math.exp;
|
||||
sqrt = Math.sqrt;
|
||||
ln = Math.log;
|
||||
pow = curry$(function(x$, y$){
|
||||
return Math.pow(x$, y$);
|
||||
});
|
||||
sin = Math.sin;
|
||||
tan = Math.tan;
|
||||
cos = Math.cos;
|
||||
asin = Math.asin;
|
||||
acos = Math.acos;
|
||||
atan = Math.atan;
|
||||
atan2 = curry$(function(x, y){
|
||||
return Math.atan2(x, y);
|
||||
});
|
||||
truncate = function(x){
|
||||
return ~~x;
|
||||
};
|
||||
round = Math.round;
|
||||
ceiling = Math.ceil;
|
||||
floor = Math.floor;
|
||||
isItNaN = function(x){
|
||||
return x !== x;
|
||||
};
|
||||
even = function(x){
|
||||
return x % 2 === 0;
|
||||
};
|
||||
odd = function(x){
|
||||
return x % 2 !== 0;
|
||||
};
|
||||
gcd = curry$(function(x, y){
|
||||
var z;
|
||||
x = Math.abs(x);
|
||||
y = Math.abs(y);
|
||||
while (y !== 0) {
|
||||
z = x % y;
|
||||
x = y;
|
||||
y = z;
|
||||
}
|
||||
return x;
|
||||
});
|
||||
lcm = curry$(function(x, y){
|
||||
return Math.abs(Math.floor(x / gcd(x, y) * y));
|
||||
});
|
||||
module.exports = {
|
||||
max: max,
|
||||
min: min,
|
||||
negate: negate,
|
||||
abs: abs,
|
||||
signum: signum,
|
||||
quot: quot,
|
||||
rem: rem,
|
||||
div: div,
|
||||
mod: mod,
|
||||
recip: recip,
|
||||
pi: pi,
|
||||
tau: tau,
|
||||
exp: exp,
|
||||
sqrt: sqrt,
|
||||
ln: ln,
|
||||
pow: pow,
|
||||
sin: sin,
|
||||
tan: tan,
|
||||
cos: cos,
|
||||
acos: acos,
|
||||
asin: asin,
|
||||
atan: atan,
|
||||
atan2: atan2,
|
||||
truncate: truncate,
|
||||
round: round,
|
||||
ceiling: ceiling,
|
||||
floor: floor,
|
||||
isItNaN: isItNaN,
|
||||
even: even,
|
||||
odd: odd,
|
||||
gcd: gcd,
|
||||
lcm: lcm
|
||||
};
|
||||
function curry$(f, bound){
|
||||
var context,
|
||||
_curry = function(args) {
|
||||
return f.length > 1 ? function(){
|
||||
var params = args ? args.concat() : [];
|
||||
context = bound ? context || this : this;
|
||||
return params.push.apply(params, arguments) <
|
||||
f.length && arguments.length ?
|
||||
_curry.call(context, params) : f.apply(context, params);
|
||||
} : f;
|
||||
};
|
||||
return _curry();
|
||||
}
|
154
node_modules/prelude-ls/lib/Obj.js
generated
vendored
Normal file
154
node_modules/prelude-ls/lib/Obj.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
// Generated by LiveScript 1.4.0
|
||||
var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find;
|
||||
values = function(object){
|
||||
var i$, x, results$ = [];
|
||||
for (i$ in object) {
|
||||
x = object[i$];
|
||||
results$.push(x);
|
||||
}
|
||||
return results$;
|
||||
};
|
||||
keys = function(object){
|
||||
var x, results$ = [];
|
||||
for (x in object) {
|
||||
results$.push(x);
|
||||
}
|
||||
return results$;
|
||||
};
|
||||
pairsToObj = function(object){
|
||||
var i$, len$, x, resultObj$ = {};
|
||||
for (i$ = 0, len$ = object.length; i$ < len$; ++i$) {
|
||||
x = object[i$];
|
||||
resultObj$[x[0]] = x[1];
|
||||
}
|
||||
return resultObj$;
|
||||
};
|
||||
objToPairs = function(object){
|
||||
var key, value, results$ = [];
|
||||
for (key in object) {
|
||||
value = object[key];
|
||||
results$.push([key, value]);
|
||||
}
|
||||
return results$;
|
||||
};
|
||||
listsToObj = curry$(function(keys, values){
|
||||
var i$, len$, i, key, resultObj$ = {};
|
||||
for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) {
|
||||
i = i$;
|
||||
key = keys[i$];
|
||||
resultObj$[key] = values[i];
|
||||
}
|
||||
return resultObj$;
|
||||
});
|
||||
objToLists = function(object){
|
||||
var keys, values, key, value;
|
||||
keys = [];
|
||||
values = [];
|
||||
for (key in object) {
|
||||
value = object[key];
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
}
|
||||
return [keys, values];
|
||||
};
|
||||
empty = function(object){
|
||||
var x;
|
||||
for (x in object) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
each = curry$(function(f, object){
|
||||
var i$, x;
|
||||
for (i$ in object) {
|
||||
x = object[i$];
|
||||
f(x);
|
||||
}
|
||||
return object;
|
||||
});
|
||||
map = curry$(function(f, object){
|
||||
var k, x, resultObj$ = {};
|
||||
for (k in object) {
|
||||
x = object[k];
|
||||
resultObj$[k] = f(x);
|
||||
}
|
||||
return resultObj$;
|
||||
});
|
||||
compact = function(object){
|
||||
var k, x, resultObj$ = {};
|
||||
for (k in object) {
|
||||
x = object[k];
|
||||
if (x) {
|
||||
resultObj$[k] = x;
|
||||
}
|
||||
}
|
||||
return resultObj$;
|
||||
};
|
||||
filter = curry$(function(f, object){
|
||||
var k, x, resultObj$ = {};
|
||||
for (k in object) {
|
||||
x = object[k];
|
||||
if (f(x)) {
|
||||
resultObj$[k] = x;
|
||||
}
|
||||
}
|
||||
return resultObj$;
|
||||
});
|
||||
reject = curry$(function(f, object){
|
||||
var k, x, resultObj$ = {};
|
||||
for (k in object) {
|
||||
x = object[k];
|
||||
if (!f(x)) {
|
||||
resultObj$[k] = x;
|
||||
}
|
||||
}
|
||||
return resultObj$;
|
||||
});
|
||||
partition = curry$(function(f, object){
|
||||
var passed, failed, k, x;
|
||||
passed = {};
|
||||
failed = {};
|
||||
for (k in object) {
|
||||
x = object[k];
|
||||
(f(x) ? passed : failed)[k] = x;
|
||||
}
|
||||
return [passed, failed];
|
||||
});
|
||||
find = curry$(function(f, object){
|
||||
var i$, x;
|
||||
for (i$ in object) {
|
||||
x = object[i$];
|
||||
if (f(x)) {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
});
|
||||
module.exports = {
|
||||
values: values,
|
||||
keys: keys,
|
||||
pairsToObj: pairsToObj,
|
||||
objToPairs: objToPairs,
|
||||
listsToObj: listsToObj,
|
||||
objToLists: objToLists,
|
||||
empty: empty,
|
||||
each: each,
|
||||
map: map,
|
||||
filter: filter,
|
||||
compact: compact,
|
||||
reject: reject,
|
||||
partition: partition,
|
||||
find: find
|
||||
};
|
||||
function curry$(f, bound){
|
||||
var context,
|
||||
_curry = function(args) {
|
||||
return f.length > 1 ? function(){
|
||||
var params = args ? args.concat() : [];
|
||||
context = bound ? context || this : this;
|
||||
return params.push.apply(params, arguments) <
|
||||
f.length && arguments.length ?
|
||||
_curry.call(context, params) : f.apply(context, params);
|
||||
} : f;
|
||||
};
|
||||
return _curry();
|
||||
}
|
92
node_modules/prelude-ls/lib/Str.js
generated
vendored
Normal file
92
node_modules/prelude-ls/lib/Str.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
// Generated by LiveScript 1.4.0
|
||||
var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize;
|
||||
split = curry$(function(sep, str){
|
||||
return str.split(sep);
|
||||
});
|
||||
join = curry$(function(sep, xs){
|
||||
return xs.join(sep);
|
||||
});
|
||||
lines = function(str){
|
||||
if (!str.length) {
|
||||
return [];
|
||||
}
|
||||
return str.split('\n');
|
||||
};
|
||||
unlines = function(it){
|
||||
return it.join('\n');
|
||||
};
|
||||
words = function(str){
|
||||
if (!str.length) {
|
||||
return [];
|
||||
}
|
||||
return str.split(/[ ]+/);
|
||||
};
|
||||
unwords = function(it){
|
||||
return it.join(' ');
|
||||
};
|
||||
chars = function(it){
|
||||
return it.split('');
|
||||
};
|
||||
unchars = function(it){
|
||||
return it.join('');
|
||||
};
|
||||
reverse = function(str){
|
||||
return str.split('').reverse().join('');
|
||||
};
|
||||
repeat = curry$(function(n, str){
|
||||
var result, i$;
|
||||
result = '';
|
||||
for (i$ = 0; i$ < n; ++i$) {
|
||||
result += str;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
capitalize = function(str){
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
};
|
||||
camelize = function(it){
|
||||
return it.replace(/[-_]+(.)?/g, function(arg$, c){
|
||||
return (c != null ? c : '').toUpperCase();
|
||||
});
|
||||
};
|
||||
dasherize = function(str){
|
||||
return str.replace(/([^-A-Z])([A-Z]+)/g, function(arg$, lower, upper){
|
||||
return lower + "-" + (upper.length > 1
|
||||
? upper
|
||||
: upper.toLowerCase());
|
||||
}).replace(/^([A-Z]+)/, function(arg$, upper){
|
||||
if (upper.length > 1) {
|
||||
return upper + "-";
|
||||
} else {
|
||||
return upper.toLowerCase();
|
||||
}
|
||||
});
|
||||
};
|
||||
module.exports = {
|
||||
split: split,
|
||||
join: join,
|
||||
lines: lines,
|
||||
unlines: unlines,
|
||||
words: words,
|
||||
unwords: unwords,
|
||||
chars: chars,
|
||||
unchars: unchars,
|
||||
reverse: reverse,
|
||||
repeat: repeat,
|
||||
capitalize: capitalize,
|
||||
camelize: camelize,
|
||||
dasherize: dasherize
|
||||
};
|
||||
function curry$(f, bound){
|
||||
var context,
|
||||
_curry = function(args) {
|
||||
return f.length > 1 ? function(){
|
||||
var params = args ? args.concat() : [];
|
||||
context = bound ? context || this : this;
|
||||
return params.push.apply(params, arguments) <
|
||||
f.length && arguments.length ?
|
||||
_curry.call(context, params) : f.apply(context, params);
|
||||
} : f;
|
||||
};
|
||||
return _curry();
|
||||
}
|
178
node_modules/prelude-ls/lib/index.js
generated
vendored
Normal file
178
node_modules/prelude-ls/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
// Generated by LiveScript 1.4.0
|
||||
var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
|
||||
Func = require('./Func.js');
|
||||
List = require('./List.js');
|
||||
Obj = require('./Obj.js');
|
||||
Str = require('./Str.js');
|
||||
Num = require('./Num.js');
|
||||
id = function(x){
|
||||
return x;
|
||||
};
|
||||
isType = curry$(function(type, x){
|
||||
return toString$.call(x).slice(8, -1) === type;
|
||||
});
|
||||
replicate = curry$(function(n, x){
|
||||
var i$, results$ = [];
|
||||
for (i$ = 0; i$ < n; ++i$) {
|
||||
results$.push(x);
|
||||
}
|
||||
return results$;
|
||||
});
|
||||
Str.empty = List.empty;
|
||||
Str.slice = List.slice;
|
||||
Str.take = List.take;
|
||||
Str.drop = List.drop;
|
||||
Str.splitAt = List.splitAt;
|
||||
Str.takeWhile = List.takeWhile;
|
||||
Str.dropWhile = List.dropWhile;
|
||||
Str.span = List.span;
|
||||
Str.breakStr = List.breakList;
|
||||
prelude = {
|
||||
Func: Func,
|
||||
List: List,
|
||||
Obj: Obj,
|
||||
Str: Str,
|
||||
Num: Num,
|
||||
id: id,
|
||||
isType: isType,
|
||||
replicate: replicate
|
||||
};
|
||||
prelude.each = List.each;
|
||||
prelude.map = List.map;
|
||||
prelude.filter = List.filter;
|
||||
prelude.compact = List.compact;
|
||||
prelude.reject = List.reject;
|
||||
prelude.partition = List.partition;
|
||||
prelude.find = List.find;
|
||||
prelude.head = List.head;
|
||||
prelude.first = List.first;
|
||||
prelude.tail = List.tail;
|
||||
prelude.last = List.last;
|
||||
prelude.initial = List.initial;
|
||||
prelude.empty = List.empty;
|
||||
prelude.reverse = List.reverse;
|
||||
prelude.difference = List.difference;
|
||||
prelude.intersection = List.intersection;
|
||||
prelude.union = List.union;
|
||||
prelude.countBy = List.countBy;
|
||||
prelude.groupBy = List.groupBy;
|
||||
prelude.fold = List.fold;
|
||||
prelude.foldl = List.foldl;
|
||||
prelude.fold1 = List.fold1;
|
||||
prelude.foldl1 = List.foldl1;
|
||||
prelude.foldr = List.foldr;
|
||||
prelude.foldr1 = List.foldr1;
|
||||
prelude.unfoldr = List.unfoldr;
|
||||
prelude.andList = List.andList;
|
||||
prelude.orList = List.orList;
|
||||
prelude.any = List.any;
|
||||
prelude.all = List.all;
|
||||
prelude.unique = List.unique;
|
||||
prelude.uniqueBy = List.uniqueBy;
|
||||
prelude.sort = List.sort;
|
||||
prelude.sortWith = List.sortWith;
|
||||
prelude.sortBy = List.sortBy;
|
||||
prelude.sum = List.sum;
|
||||
prelude.product = List.product;
|
||||
prelude.mean = List.mean;
|
||||
prelude.average = List.average;
|
||||
prelude.concat = List.concat;
|
||||
prelude.concatMap = List.concatMap;
|
||||
prelude.flatten = List.flatten;
|
||||
prelude.maximum = List.maximum;
|
||||
prelude.minimum = List.minimum;
|
||||
prelude.maximumBy = List.maximumBy;
|
||||
prelude.minimumBy = List.minimumBy;
|
||||
prelude.scan = List.scan;
|
||||
prelude.scanl = List.scanl;
|
||||
prelude.scan1 = List.scan1;
|
||||
prelude.scanl1 = List.scanl1;
|
||||
prelude.scanr = List.scanr;
|
||||
prelude.scanr1 = List.scanr1;
|
||||
prelude.slice = List.slice;
|
||||
prelude.take = List.take;
|
||||
prelude.drop = List.drop;
|
||||
prelude.splitAt = List.splitAt;
|
||||
prelude.takeWhile = List.takeWhile;
|
||||
prelude.dropWhile = List.dropWhile;
|
||||
prelude.span = List.span;
|
||||
prelude.breakList = List.breakList;
|
||||
prelude.zip = List.zip;
|
||||
prelude.zipWith = List.zipWith;
|
||||
prelude.zipAll = List.zipAll;
|
||||
prelude.zipAllWith = List.zipAllWith;
|
||||
prelude.at = List.at;
|
||||
prelude.elemIndex = List.elemIndex;
|
||||
prelude.elemIndices = List.elemIndices;
|
||||
prelude.findIndex = List.findIndex;
|
||||
prelude.findIndices = List.findIndices;
|
||||
prelude.apply = Func.apply;
|
||||
prelude.curry = Func.curry;
|
||||
prelude.flip = Func.flip;
|
||||
prelude.fix = Func.fix;
|
||||
prelude.over = Func.over;
|
||||
prelude.split = Str.split;
|
||||
prelude.join = Str.join;
|
||||
prelude.lines = Str.lines;
|
||||
prelude.unlines = Str.unlines;
|
||||
prelude.words = Str.words;
|
||||
prelude.unwords = Str.unwords;
|
||||
prelude.chars = Str.chars;
|
||||
prelude.unchars = Str.unchars;
|
||||
prelude.repeat = Str.repeat;
|
||||
prelude.capitalize = Str.capitalize;
|
||||
prelude.camelize = Str.camelize;
|
||||
prelude.dasherize = Str.dasherize;
|
||||
prelude.values = Obj.values;
|
||||
prelude.keys = Obj.keys;
|
||||
prelude.pairsToObj = Obj.pairsToObj;
|
||||
prelude.objToPairs = Obj.objToPairs;
|
||||
prelude.listsToObj = Obj.listsToObj;
|
||||
prelude.objToLists = Obj.objToLists;
|
||||
prelude.max = Num.max;
|
||||
prelude.min = Num.min;
|
||||
prelude.negate = Num.negate;
|
||||
prelude.abs = Num.abs;
|
||||
prelude.signum = Num.signum;
|
||||
prelude.quot = Num.quot;
|
||||
prelude.rem = Num.rem;
|
||||
prelude.div = Num.div;
|
||||
prelude.mod = Num.mod;
|
||||
prelude.recip = Num.recip;
|
||||
prelude.pi = Num.pi;
|
||||
prelude.tau = Num.tau;
|
||||
prelude.exp = Num.exp;
|
||||
prelude.sqrt = Num.sqrt;
|
||||
prelude.ln = Num.ln;
|
||||
prelude.pow = Num.pow;
|
||||
prelude.sin = Num.sin;
|
||||
prelude.tan = Num.tan;
|
||||
prelude.cos = Num.cos;
|
||||
prelude.acos = Num.acos;
|
||||
prelude.asin = Num.asin;
|
||||
prelude.atan = Num.atan;
|
||||
prelude.atan2 = Num.atan2;
|
||||
prelude.truncate = Num.truncate;
|
||||
prelude.round = Num.round;
|
||||
prelude.ceiling = Num.ceiling;
|
||||
prelude.floor = Num.floor;
|
||||
prelude.isItNaN = Num.isItNaN;
|
||||
prelude.even = Num.even;
|
||||
prelude.odd = Num.odd;
|
||||
prelude.gcd = Num.gcd;
|
||||
prelude.lcm = Num.lcm;
|
||||
prelude.VERSION = '1.1.2';
|
||||
module.exports = prelude;
|
||||
function curry$(f, bound){
|
||||
var context,
|
||||
_curry = function(args) {
|
||||
return f.length > 1 ? function(){
|
||||
var params = args ? args.concat() : [];
|
||||
context = bound ? context || this : this;
|
||||
return params.push.apply(params, arguments) <
|
||||
f.length && arguments.length ?
|
||||
_curry.call(context, params) : f.apply(context, params);
|
||||
} : f;
|
||||
};
|
||||
return _curry();
|
||||
}
|
Reference in New Issue
Block a user