yinxing
Version:
853 lines (840 loc) • 12.8 kB
JavaScript
//
const R=require('ramda')
const {
F,
T,
__,
add,
addIndex,
adjust,
all,
allPass,
always,
and,
any,
anyPass,
ap,
aperture,
append,
apply,
applySpec,
applyTo,
ascend,
assoc,
assocPath,
binary,
bind,
both,
call,
chain,
clamp,
clone,
comparator,
complement,
compose,
composeK,
composeP,
composeWith,
concat,
cond,
construct,
constructN,
contains,
converge,
countBy,
curry,
curryN,
dec,
defaultTo,
descend,
difference,
differenceWith,
dissoc,
dissocPath,
divide,
drop,
dropLast,
dropLastWhile,
dropRepeats,
dropRepeatsWith,
dropWhile,
either,
empty,
endsWith,
eqBy,
eqProps,
equals,
evolve,
filter,
find,
findIndex,
findLast,
findLastIndex,
flatten,
flip,
forEach,
forEachObjIndexed,
fromPairs,
groupBy,
groupWith,
gt,
gte,
has,
hasIn,
hasPath,
head,
identical,
identity,
ifElse,
inc,
includes,
indexBy,
indexOf,
init,
innerJoin,
insert,
insertAll,
intersection,
intersperse,
into,
invert,
invertObj,
invoker,
is,
isEmpty,
isNil,
join,
juxt,
keys,
keysIn,
last,
lastIndexOf,
length,
lens,
lensIndex,
lensPath,
lensProp,
lift,
liftN,
lt,
lte,
map,
mapAccum,
mapAccumRight,
mapObjIndexed,
match,
mathMod,
max,
maxBy,
mean,
median,
memoizeWith,
merge,
mergeAll,
mergeDeepLeft,
mergeDeepRight,
mergeDeepWith,
mergeDeepWithKey,
mergeLeft,
mergeRight,
mergeWith,
mergeWithKey,
min,
minBy,
modulo,
move,
multiply,
nAry,
negate,
none,
not,
nth,
nthArg,
o,
objOf,
of,
omit,
once,
or,
otherwise,
over,
pair,
partial,
partialRight,
partition,
path,
pathEq,
pathOr,
pathSatisfies,
pick,
pickAll,
pickBy,
pipe,
pipeK,
pipeP,
pipeWith,
pluck,
prepend,
product,
project,
prop,
propEq,
propIs,
propOr,
propSatisfies,
props,
range,
reduce,
reduceBy,
reduceRight,
reduceWhile,
reduced,
reject,
remove,
repeat,
replace,
reverse,
scan,
sequence,
set,
slice,
sort,
sortBy,
sortWith,
split,
splitAt,
splitEvery,
splitWhen,
startsWith,
subtract,
sum,
symmetricDifference,
symmetricDifferenceWith,
tail,
take,
takeLast,
takeLastWhile,
takeWhile,
tap,
test,
then,
thunkify,
times,
toLower,
toPairs,
toPairsIn,
toString,
toUpper,
transduce,
transpose,
traverse,
trim,
tryCatch,
type,
unapply,
unary,
uncurryN,
unfold,
union,
unionWith,
uniq,
uniqBy,
uniqWith,
unless,
unnest,
until,
update,
useWith,
values,
valuesIn,
view,
when,
where,
whereEq,
without,
xprod,
zip,
zipObj,
zipWith,
}=R
o={
assoc,
assocPath,
clone,
dissoc,
dissocPath,
eqProps,
evolve,
forEachObjIndexed,
has,
hasIn,
hasPath,
invert,
invertObj,
keys,
keysIn,
lens,
lensIndex,
lensPath,
lensProp,
mapObjIndexed,
merge,
mergeDeepLeft,
mergeDeepRight,
mergeDeepWith,
mergeDeepWithKey,
mergeLeft,
mergeRight,
mergeWith,
mergeWithKey,
objOf,
omit,
over,
path,
pathOr,
pick,
pickAll,
pickBy,
project,
prop,
propOr,
props,
set,
toPairs,
toPairsIn,
values,
valuesIn,
view,
where,
whereEq,
}
o={
Function: [
__,
addIndex,
always,
ap,
apply,
applySpec,
applyTo,
ascend,
binary,
bind,
call,
comparator,
compose,
composeK,
composeP,
composeWith,
construct,
constructN,
converge,
curry,
curryN,
descend,
empty,
F,
flip,
identity,
invoker,
juxt,
lift,
liftN,
memoizeWith,
nAry,
nthArg,
o,
of,
once,
otherwise,
partial,
partialRight,
pipe,
pipeK,
pipeP,
pipeWith,
T,
tap,
then,
thunkify,
tryCatch,
unapply,
unary,
uncurryN,
useWith
],
Math: [
add,
dec,
divide,
inc,
mathMod,
mean,
median,
modulo,
multiply,
negate,
product,
subtract,
sum
],
List: [
adjust,
all,
any,
aperture,
append,
chain,
concat,
contains,
drop,
dropLast,
dropLastWhile,
dropRepeats,
dropRepeatsWith,
dropWhile,
endsWith,
filter,
find,
findIndex,
findLast,
findLastIndex,
flatten,
forEach,
fromPairs,
groupBy,
groupWith,
head,
includes,
indexBy,
indexOf,
init,
insert,
insertAll,
intersperse,
into,
join,
last,
lastIndexOf,
length,
map,
mapAccum,
mapAccumRight,
mergeAll,
move,
none,
nth,
pair,
partition,
pluck,
prepend,
range,
reduce,
reduceBy,
reduced,
reduceRight,
reduceWhile,
reject,
remove,
repeat,
reverse,
scan,
sequence,
slice,
sort,
splitAt,
splitEvery,
splitWhen,
startsWith,
tail,
take,
takeLast,
takeLastWhile,
takeWhile,
times,
transduce,
transpose,
traverse,
unfold,
uniq,
uniqBy,
uniqWith,
unnest,
update,
without,
xprod,
zip,
zipObj,
zipWith
],
Logic: [
allPass,
and,
anyPass,
both, // &&
complement,//!
cond,
defaultTo, //||
either, //||
ifElse,
isEmpty,
not,
or,
pathSatisfies,
propSatisfies,
unless,
until,
when
],
Object: [
assoc,
assocPath,
clone,
dissoc,
dissocPath,
eqProps,
evolve,
forEachObjIndexed,
has,
hasIn,
hasPath,
invert,
invertObj,
keys,
keysIn,
lens,
lensIndex,
lensPath,
lensProp,
mapObjIndexed,
merge,
mergeDeepLeft,
mergeDeepRight,
mergeDeepWith,
mergeDeepWithKey,
mergeLeft,
mergeRight,
mergeWith,
mergeWithKey,
objOf,
omit,
over,
path,
pathOr,
pick,
pickAll,
pickBy,
project,
prop,
propOr,
props,
set,
toPairs,
toPairsIn,
values,
valuesIn,
view,
where,
whereEq
],
Relation: [
clamp,
countBy,
difference,
differenceWith,
eqBy,
equals,
gt,
gte,
identical,
innerJoin,
intersection,
lt,
lte,
max,
maxBy,
min,
minBy,
pathEq,
propEq,
sortBy,
sortWith,
symmetricDifference,
symmetricDifferenceWith,
union,
unionWith
],
Type: [
is,
isNil,
propIs,
type
],
String: [
match,
replace,
split,
test,
toLower,
toString,
toUpper,
trim
]
}
o1={
"__": "Function",
"addIndex": "Function",
"always": "Function",
"ap": "Function",
"apply": "Function",
"applySpec": "Function",
"applyTo": "Function",
"ascend": "Function",
"binary": "Function",
"bind": "Function",
"call": "Function",
"comparator": "Function",
"compose": "Function",
"composeK": "Function",
"composeP": "Function",
"composeWith": "Function",
"construct": "Function",
"constructN": "Function",
"converge": "Function",
"curry": "Function",
"curryN": "Function",
"descend": "Function",
"empty": "Function",
"F": "Function",
"flip": "Function",
"identity": "Function",
"invoker": "Function",
"juxt": "Function",
"lift": "Function",
"liftN": "Function",
"memoizeWith": "Function",
"nAry": "Function",
"nthArg": "Function",
"o": "Function",
"of": "Function",
"once": "Function",
"otherwise": "Function",
"partial": "Function",
"partialRight": "Function",
"pipe": "Function",
"pipeK": "Function",
"pipeP": "Function",
"pipeWith": "Function",
"T": "Function",
"tap": "Function",
"then": "Function",
"thunkify": "Function",
"tryCatch": "Function",
"unapply": "Function",
"unary": "Function",
"uncurryN": "Function",
"useWith": "Function",
"adjust": "List",
"all": "List",
"any": "List",
"aperture": "List",
"append": "List",
"chain": "List",
"concat": "List",
"contains": "List",
"drop": "List",
"dropLast": "List",
"dropLastWhile": "List",
"dropRepeats": "List",
"dropRepeatsWith": "List",
"dropWhile": "List",
"endsWith": "List",
"filter": "List",
"find": "List",
"findIndex": "List",
"findLast": "List",
"findLastIndex": "List",
"flatten": "List",
"forEach": "List",
"fromPairs": "List",
"groupBy": "List",
"groupWith": "List",
"head": "List",
"includes": "List",
"indexBy": "List",
"indexOf": "List",
"init": "List",
"insert": "List",
"insertAll": "List",
"intersperse": "List",
"into": "List",
"join": "List",
"last": "List",
"lastIndexOf": "List",
"length": "List",
"map": "List",
"mapAccum": "List",
"mapAccumRight": "List",
"mergeAll": "List",
"move": "List",
"none": "List",
"nth": "List",
"pair": "List",
"partition": "List",
"pluck": "List",
"prepend": "List",
"range": "List",
"reduce": "List",
"reduceBy": "List",
"reduced": "List",
"reduceRight": "List",
"reduceWhile": "List",
"reject": "List",
"remove": "List",
"repeat": "List",
"reverse": "List",
"scan": "List",
"sequence": "List",
"slice": "List",
"sort": "List",
"splitAt": "List",
"splitEvery": "List",
"splitWhen": "List",
"startsWith": "List",
"tail": "List",
"take": "List",
"takeLast": "List",
"takeLastWhile": "List",
"takeWhile": "List",
"times": "List",
"transduce": "List",
"transpose": "List",
"traverse": "List",
"unfold": "List",
"uniq": "List",
"uniqBy": "List",
"uniqWith": "List",
"unnest": "List",
"update": "List",
"without": "List",
"xprod": "List",
"zip": "List",
"zipObj": "List",
"zipWith": "List",
"allPass": "Logic",
"and": "Logic",
"anyPass": "Logic",
"both": "Logic",
"complement": "Logic",
"cond": "Logic",
"defaultTo": "Logic",
"either": "Logic",
"ifElse": "Logic",
"isEmpty": "Logic",
"not": "Logic",
"or": "Logic",
"pathSatisfies": "Logic",
"propSatisfies": "Logic",
"unless": "Logic",
"until": "Logic",
"when": "Logic",
"add": "Math",
"dec": "Math",
"divide": "Math",
"inc": "Math",
"mathMod": "Math",
"mean": "Math",
"median": "Math",
"modulo": "Math",
"multiply": "Math",
"negate": "Math",
"product": "Math",
"subtract": "Math",
"sum": "Math",
"assoc": "Object",
"assocPath": "Object",
"clone": "Object",
"dissoc": "Object",
"dissocPath": "Object",
"eqProps": "Object",
"evolve": "Object",
"forEachObjIndexed": "Object",
"has": "Object",
"hasIn": "Object",
"hasPath": "Object",
"invert": "Object",
"invertObj": "Object",
"keys": "Object",
"keysIn": "Object",
"lens": "Object",
"lensIndex": "Object",
"lensPath": "Object",
"lensProp": "Object",
"mapObjIndexed": "Object",
"merge": "Object",
"mergeDeepLeft": "Object",
"mergeDeepRight": "Object",
"mergeDeepWith": "Object",
"mergeDeepWithKey": "Object",
"mergeLeft": "Object",
"mergeRight": "Object",
"mergeWith": "Object",
"mergeWithKey": "Object",
"objOf": "Object",
"omit": "Object",
"over": "Object",
"path": "Object",
"pathOr": "Object",
"pick": "Object",
"pickAll": "Object",
"pickBy": "Object",
"project": "Object",
"prop": "Object",
"propOr": "Object",
"props": "Object",
"set": "Object",
"toPairs": "Object",
"toPairsIn": "Object",
"values": "Object",
"valuesIn": "Object",
"view": "Object",
"where": "Object",
"whereEq": "Object",
"clamp": "Relation",
"countBy": "Relation",
"difference": "Relation",
"differenceWith": "Relation",
"eqBy": "Relation",
"equals": "Relation",
"gt": "Relation",
"gte": "Relation",
"identical": "Relation",
"innerJoin": "Relation",
"intersection": "Relation",
"lt": "Relation",
"lte": "Relation",
"max": "Relation",
"maxBy": "Relation",
"min": "Relation",
"minBy": "Relation",
"pathEq": "Relation",
"propEq": "Relation",
"sortBy": "Relation",
"sortWith": "Relation",
"symmetricDifference": "Relation",
"symmetricDifferenceWith": "Relation",
"union": "Relation",
"unionWith": "Relation",
"match": "String",
"replace": "String",
"split": "String",
"test": "String",
"toLower": "String",
"toString": "String",
"toUpper": "String",
"trim": "String",
"is": "Type",
"isNil": "Type",
"propIs": "Type",
"type": "Type"
}