From a5a6d030a0b49175049bf13219c4854d1f1eb091 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 | 71 +++++++++++++++++---------------------- TODO | 3 ++ package-lock.json | 16 ++++----- package.json | 2 +- src/index.ts | 85 ++++++++++++++++++++++++----------------------- wiki | 2 +- 7 files changed, 91 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..458e9cdef 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,35 @@ 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 with which you can +**generate** an array, **clone** it, query **about** it, get non-negative +**indices**, manage its **length**, **get/set** elements, fully or partially +**sort** it, obtain **minimum(s)/maximum(s)**, **compare** it with another +array, get a **part** of it, **search a value**, obtain all possible +**arrangements** or **random arrangements**, **find** an element, **take/drop** +elements or **scan** from its beginning or its end, **search** the index of a +part of it, perform **functional** operations, **flatten** multi-level arrays, +obtain **prefix sum**, **manipulate** it in various ways, **count/partition** +elements, **split** it, **concatenate/join** multiple arrays, **rearrange** +elements within it, or performing **set operations** upon it. + +With our 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! 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 `