Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(() => {
const clonedTr = cloneTransaction(tr);
expect(omit(tr, ['time'])).toEqual(omit(clonedTr, ['time']));
done();
}, 10);
export const cleanKey = (key: SupportedCharacters) => omit(usKeyboardLayout[key], ['shiftKey']);
export const omitUnchangedState = (
changes: MultishiftStateProps,
{ state, getItemId }: OmitUnchangedParams,
): MultishiftStateProps => {
return omit(changes, (value, key) => {
if (isArray(value)) {
if (key === 'selectedItems') {
return (
value.length !== state.selectedItems.length ||
(value as GItem[]).some((item, index) => getItemId(item) !== getItemId(state.selectedItems[index]))
);
}
if (key === 'highlightedIndexes') {
return (
value.length !== state.highlightedIndexes.length ||
(value as number[]).some((val, index) => val !== state.highlightedIndexes[index])
);
}
}
const omitTextProps = (props: GProps) => omit(props, keys as any);