From d01c97b9b7259e7ce1b73d88b149f34648a8cb6f Mon Sep 17 00:00:00 2001 From: Subhajit Sahu Date: Tue, 9 May 2023 14:19:42 +0530 Subject: [PATCH] :bug: docs: update readme --- CITATION.cff | 8 ++--- README.md | 72 ++++++++++++++++++--------------------- TODO | 3 ++ package-lock.json | 16 ++++----- package.json | 2 +- src/index.ts | 85 ++++++++++++++++++++++++----------------------- wiki | 2 +- 7 files changed, 92 insertions(+), 96 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index cd7f1afd2..ecc1dc4b0 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,7 +4,7 @@ authors: - family-names: Sahu given-names: Subhajit orcid: https://orcid.org/0000-0001-5140-6578 -title: "nodef/extra-array: A collection of functions for working with Arrays" -version: 3.1.0 -doi: 10.5281/zenodo.7339658 -date-released: 2022-11-20 +title: "nodef/extra-array: An array is a collection of values, stored contiguously." +version: 4.1.15 +doi: 10.5281/zenodo.7913300 +date-released: 2023-05-09 diff --git a/README.md b/README.md index 18a9be7f2..61b8bdf35 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,36 @@ An [array] is a collection of values, stored contiguously.
📰 [Docs](https://nodef.github.io/extra-array/), 📘 [Wiki](https://github.com/nodef/extra-array/wiki/). -This package includes common array functions related to querying **about** -arrays, **generating** them, **comparing** one with another, finding their -**length**, **getting** and **setting** elements, obtaining its **properties**, -getting a **part** of it, **rearranging** elements in it, **finding** an element -of a subset of elements in it, performing **functional** operations, -**manipulating** it in various ways, **combining** together arrays or its -elements, of performing **set operations** upon it. +![](https://i.imgur.com/46wYtxW.png) -All functions except `from*()` take array as 1st parameter. Methods like -`swap()` are pure and do not modify the array itself, while methods like -`swap$()` *do modify (update)* the array itself. Some methods accept a map -function for *faster comparision* (like [unique]). I find the map-approach -beautiful, which I learned from Haskell's `sortOn()`. You can notice that I have -followed Javascript naming scheme as far as possible. Some names are borrowed -from Haskell, Python, Java, Processing. +
+ + +This package includes comprehensive set of array functions for **generating** an +array, **cloning** them, querying **about** them, getting non-negative +**indices**, managing its **length**, **getting/setting** elements, fully or +partially **sorting** them, obtaining **minimum(s)/maximum(s)**, **comparing** +one with another, getting a **part** of it, **searching a value**, obtaining all +possible **arrangements** or **random arrangements**, **finding** an element, +**taking/dropping** elements or **scanning** from the beginning or end the of an +array, **searching** the index of a part of the array, performing **functional** +operations, **flattening** multi-level arrays, obtaining **prefix sum**, +**manipulating** it in various ways, **counting/partitioning** elements, +**splitting** it, **concatenating/joining** multiple arrays, **rearranging** +elements withing it, or performing **set operations** upon it. You can use our +package in a variety of ways to streamline your development process and simplify +the implementation of complex algorithms. + +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 `rangedPartialSort()`. Functions like `swap()` are pure and do not +modify the array itself, while functions like `swap$()` *do modify (update)* the +array itself. Some functions accept a map function for *faster comparison*, +such as `unique()`. 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*. This package is available in *Node.js* and *Web* formats. To use it on the web, simply use the `extra_array` global variable after loading with a `