Socket
Socket
Sign inDemoInstall

@gfx/array-like-partial-equal

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gfx/array-like-partial-equal

Comparesion of Subarrays of Two Arrays


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

@gfx/array-like-partial-equal

This library checks equality for subarrays of two arrays, not only for Array<T> but also for ArrayLike<T> in TypeScript.

Install

npm install @gfx/array-like-partial-equal

Synopsis

import { arrayLikePartialEqual } from "@gfx/array-like-partial-equal";

const a: ArrayLike<number> = [99, 1, 2, 3, 98];
const b: ArrayLike<number> = [10, 1, 2, 3, 20];

// check if a.subarray(1, 1+3) === b.subarray(1, 1+3) for each item
console.log(arrayLikePartialEqual(a, 1, b, 1, 3)); // true

// check if a.subarray(0, 0+3) === b.subarray(0, 0+3) for each item
console.log(arrayLikePartialEqual(a, 0, b, 0, 3)); // false

Copyright (c) FUJI Goro.

Keywords

FAQs

Package last updated on 08 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc