How to use the @esfx/collection-core.ReadonlyIndexedCollection.indexOf function in @esfx/collection-core

To help you get started, we’ve selected a few @esfx/collection-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esfx / esfx / packages / collection-core-shim / src / __tests__ / global.ts View on Github external
it("indexOf", () => {
            expect(["a", "b", "c", "b"][ReadonlyIndexedCollection.indexOf]("b")).toBe(1);
            expect(["a", "b", "c", "b"][ReadonlyIndexedCollection.indexOf]("b", 2)).toBe(3);
            expect(["a", "b", "c", "b"][ReadonlyIndexedCollection.indexOf]("z")).toBe(-1);
        });
        it("getAt", () => {
github esfx / esfx / packages / collection-core-shim / src / __tests__ / global.ts View on Github external
it("indexOf", () => {
                expect(new TypedArray([1, 2, 3, 2])[ReadonlyIndexedCollection.indexOf](2)).toBe(1);
                expect(new TypedArray([1, 2, 3, 2])[ReadonlyIndexedCollection.indexOf](2, 2)).toBe(3);
                expect(new TypedArray([1, 2, 3, 2])[ReadonlyIndexedCollection.indexOf](9)).toBe(-1);
            });
            it("getAt", () => {