Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@npmteam2024/quisquam-dicta-voluptates

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmteam2024/quisquam-dicta-voluptates

A [sorted array] is a collection of values, arranged in an order. 📦 [Node.js](https://www.npmjs.com/package/@npmteam2024/quisquam-dicta-voluptates), 🌐 [Web](https://www.npmjs.com/package/@npmteam2024/quisquam-dicta-voluptates.web), 📜 [Files](https:

  • 1.0.2
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

A sorted array is a collection of values, arranged in an order.
📦 Node.js, 🌐 Web, 📜 Files, 📰 Docs, 📘 Wiki.


This package includes comprehensive set of functions that operate on a sorted array with which you can search a value using binary search, merge multiple sorted arrays, or perform set operations upon it.

We use a consistent naming scheme that helps you quickly identify the functions you need. All functions except from*() take array as 1st parameter. Some functions operate on a specified range in the array and are called ranged*(), such as rangedMerge(). Functions like slice() are pure and do not modify the array itself, while functions like slice$() do modify (update) the array itself. Some functions accept a map function in addition to a compare function. Further, functions which return an iterable instead of an array are prefixed with i, such as isubsequences(). We borrow some names from other programming languages such as Haskell, Python, Java, and Processing.

With this package, you can simplify the implementation of complex algorithms, and be able to achieve your goals faster, regardless of your level of expertise. Try it out today and discover how it can transform your development experience! This package is available in Node.js and Web formats. To use it on the web, simply use the extra_sorted_array global variable after loading with a <script> tag from the jsDelivr CDN.

Stability: Experimental.


const xsortedArray = require('@npmteam2024/quisquam-dicta-voluptates');
// import * as xsortedArray from "@npmteam2024/quisquam-dicta-voluptates";
// import * as xsortedArray from "https://unpkg.com/@npmteam2024/quisquam-dicta-voluptates/index.mjs"; (deno)

var x = [10, 20, 20, 40, 40, 80];
xsortedArray.searchValue(x, 40);
// → 3

var x = [10, 20, 20, 40, 40, 80];
var y = [20, 50, 70];
xsortedArray.merge(x, y);
// → [ 10, 20, 20, 20, 40, 40, 50, 70, 80 ]

var x = [10, 20, 20, 40, 40, 80];
var y = [20, 50, 70];
var z = [30, 60, 90];
xsortedArray.mergeAll([x, y, z]);
// → [ 10, 20, 20, 20, 30, 40, 40, 50, 60, 70, 80, 90 ]

var x = [10, 20, 20, 40, 40, 80];
var y = [20, 50, 70];
xsortedArray.isDisjoint(x, y);
// → false

var x = [10, 20, 20, 40, 40, 80];
var y = [20, 50, 80];
xsortedArray.intersection(x, y);
// → [ 20, 80 ]


Index

PropertyDescription
includesCheck if sorted array has a value using binary search.
hasValueCheck if sorted array has a value using binary search.
indexOfFind first index of value using binary search.
lastIndexOfFind last index of value using binary search.
searchValueFind first index of value using binary search.
searchValueRightFind last index of a value using binary search.
searchValueAnyFind any index of a value using binary search.
searchClosestValueFind index of closest value using binary search.
mergeMerge values from two sorted arrays.
mergeAllMerge values from sorted arrays.
isUniqueExamine if there are no duplicate values.
isDisjointExamine if arrays have no value in common.
uniqueRemove duplicate values.
unionObtain values present in any sorted array.
intersectionObtain values present in both sorted arrays.
differenceObtain values not present in another sorted array.
symmetricDifferenceObtain values present in either sorted array but not both.


References




ORG Coverage Status Test Coverage

Keywords

FAQs

Package last updated on 25 Apr 2024

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