Ejemplo n.º 1
0
map(tuple, (val, nothing, tupleArray) => tupleArray.push(123));

var users = [{ user: "******" }, { user: "******" }];

// The `_.property` iteratee shorthand.
map(users, "user");

/**
 * _.pullAllBy
 */
pullAllBy([{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }], [{ x: 1 }, { x: 3 }], "x");

/**
 * _.unionBy
 */
unionBy([2.1], [1.2, 2.3], Math.floor);
unionBy([{ x: 1 }], [{ x: 2 }, { x: 1 }], "x");

/**
 * _.uniqBy
 */
uniqBy([2.1, 1.2, 2.3], Math.floor);
uniqBy([{ x: 1 }, { x: 2 }, { x: 1 }], "x");

/**
 * _.clone
 */
clone({ a: 1 }).a == 1;
// $ExpectError property `b`. Property not found in object literal
clone({ a: 1 }).b == 1;
// $ExpectError number. This type is incompatible with function type.
(sortedUniq(null): Array<*>);
(sortedUniqBy(null, null): Array<*>);
(split(null, null, null): Array<*>);
(tail(null): Array<*>);
(take(null, null): Array<*>);
(takeRight(null, null): Array<*>);
(takeRightWhile(null, null): Array<*>);
(takeWhile(null, null): Array<*>);
(toArray(null): Array<*>);
(toPairs(null): Array<*>);
(toPairsIn(null): Array<*>);
(toPath(null): Array<*>);
(toPlainObject(null): {});
(transform(null, null, null): {});
(union(): Array<*>);
(unionBy(): Array<*>);
(unionWith(): Array<*>);
(uniq(null): Array<*>);
(uniqBy(null, null): Array<*>);
(uniqWith(null, null): Array<*>);
(unset(null, null): true);
(unzip(null): Array<*>);
(unzipWith(null, null): Array<*>);
(update(null, null, null): null);
(updateWith(null, null, null, null): null);
(values(null): Array<*>);
(valuesIn(null): Array<*>);
(without(): Array<*>);
(words(null, null): Array<*>);
(wrap(null, null): Function);
(xor(): Array<*>);