Skip to main content

Function: notEqual()

notEqual<ElementType>(iterable: IterableResolvable<ElementType>, other: IterableResolvable<ElementType>): boolean

Determines if the elements of both iterators are not equal.

Type Parameters

Type Parameter
ElementType

Parameters

ParameterTypeDescription
iterableIterableResolvable<ElementType>The iterator to compare.
otherIterableResolvable<ElementType>The iterator to compare against.

Returns

boolean

Whether the two iterators are not equal.

Example

import { notEqual } from '@sapphire/iterator-utilities';

console.log(notEqual([1], [1]));
// Output: false
console.log(notEqual([1], [1, 2]));
// Output: true

Remarks

This function consumes the entire iterator.

Defined in

projects/utilities/packages/iterator-utilities/src/lib/notEqual.ts:25