Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function collectData(obj) {
const collect = R.cond([
[R.is(Array),sayPipe],
// [Lexeme.its.arg,P(R.path(['head','value']),e=>e.arg())],
[Lexeme.its.pipe,sayPipe],
// [eq.type.arg,P(pipelog('arg'),R.prop('pipe'))],
[Lexeme.its.atomic,sayAtomic],
[P(HeadList.isList,R.not),util.prop.val],
[R.T,e=>{throw new CompileException(e)}]
])
return collect(obj)
}
const ss3: string = _.replace(",", "|", "b,d,d");
const ss2: Array = _.split(",", "b,d,d");
const ss1: boolean = _.test(/h/, "b");
const s: string = _.trim("s");
const x: string = _.head("one");
const sss: string = _.concat("H", "E");
const sss1: string = _.concat("H")("E");
const ssss: string = _.drop(1, "EF");
const ssss1: string = _.drop(1)("E");
const ssss2: string = _.dropLast(1, "EF");
const ys: string = _.nth(2, "curry");
const ys1: string = _.nth(2)("curry");
}
//Type
{
const x: boolean = _.is(Number, 1);
const x1: false = _.isNil(1);
const x1a: true = _.isNil();
const x1b: true = _.isNil(null);
const x2: boolean = _.propIs(1, "num", { num: 1 });
}
const dateRE = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/
const matches = re => R.both(R.is(String), R.test(re))
const PregradingStaged = V.and(
V.props({
tutkintokerta: matches(/^\d{4}[KS]$/),
koe: R.is(String),
osa: R.equals(null),
koulunumero: R.is(Number),
arvostelunPäivämäärä: matches(dateRE),
kysymykset: V.arrayId(R.is(String)),
kokelaat: V.arrayId(
V.props({
etunimet: V.arrayId(R.is(String)),
sukunimi: R.is(String),
kokelasnumero: R.is(Number),
valmistavaArvostelu: V.arrayId(
V.props({
kysymys: R.is(String),
pisteet: R.both(Number.isInteger, R.lte(0))
})
),
pisteidenSumma: R.is(Number)
})
)
}),
V.choose(({kysymykset}) => {
const kysymysCounts = L.counts(L.elems, kysymykset)
return V.propsOr(V.accept, {
kysymykset: V.arrayId(mapsTo(1, kysymysCounts)),
testAccepted(['1', 2], () => V.tuple(R.is(String), R.is(Number)))
testAccepted([1, undefined, '2'], () => V.tuple(V.accept, V.accept, V.accept))
{ x: { y: 2 } }
);
const psatPart = _.pathSatisfies(y => typeof y === "number" && y > 0);
const psat2: boolean = psatPart(["x", "y"])({ x: { y: 2 }, z: true });
const psatPart2 = _.pathSatisfies(y => typeof y === "number" && y > 0, [
"x",
"y"
]);
const psat3: boolean = psatPart2({ x: { y: 2 }, z: true });
const propSat: boolean = _.propSatisfies(x => x > 0, "x", { x: 1, y: 2 });
const coerceArray = _.unless(_.isArrayLike, _.of);
const coer: Array> | number = coerceArray([1, 2, 3]);
const coer1: Array> | number = coerceArray(1);
const coerceString = _.unless(_.is(String), _.toString);
const coer2: string | Array = coerceString([1, 2, 3]);
const coer3: string | Array = coerceString("s");
const unlPrt = _.unless(_.is(Number), _.T);
const unl: number | boolean | Array = unlPrt([1, 2, 3]);
const unl2: number | boolean | Array = unlPrt(1);
const un: number = _.until(_.gt(100), _.multiply(2))(1);
const {
index,
coordinate,
coordinate: { x, y },
coordinates,
onResize,
onChange,
} = this.props
const { width, height } = e.rect
const { left, top } = e.deltaRect
const nextCoordinate = {
...coordinate, x: x + left, y: y + top, width, height,
}
const nextCoordinates = update(index, nextCoordinate)(coordinates)
if (is(Function, onResize)) {
onResize(nextCoordinate, index, nextCoordinates)
}
if (is(Function, onChange)) {
onChange(nextCoordinate, index, nextCoordinates)
}
}
handleDragMove = (e) => {
/**
* Remove nil values from array
*
* @param {Array} array
* @returns {Array} array without nils
*/
const compact = R.filter(Boolean);
/**
* Checks if value is array
*
* @param {any} value
* @returns {Boolean} is value an array
*/
const isArray = R.is(Array);
/**
* Merges style objects array
*
* @param {Array} style objects array
* @returns {Object} merged style object
*/
const mergeStyles = styles =>
styles.reduce((acc, style) => {
const s = isArray(style) ? flatten(style) : style;
Object.keys(s).forEach(key => {
if (s[key] !== null && s[key] !== undefined) {
acc[key] = s[key];
}
});
_createFileStream (event, File) {
return Bacon
.fromEvent(this._watch, event, (relPath, stat) => {
if (File.accepts(relPath)) {
return new File(relPath, stat)
}
})
.filter(R.is(Object))
}
tip.style = function setStyle(d) {
if (is(Object, d)) {
styles = { ...styles, ...d };
}
return this;
};
var stringIsOneOf = R.curry(function (selectionArr, str) {
return R.allPass([R.is(String), R.contains(R.__, selectionArr)])(str);
});
var isStringOfLengthBetween = R.curry(function (min, max, str) {