Socket
Book a DemoInstallSign in
Socket

matija-utils

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matija-utils

My opinionated list of JavaScript utilities.

Source
npmnpm
Version
1.0.23
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

matija-utils

My opinionated list of JavaScript utilities.

Install with npm

$ npm i matija-utils

🚀 Features (work in progress)

Array functions

NameDescription
intersectFinds the common elements of two arrays.
chunkChunks an array into a new array consisting of smaller arrays of a specified size.
rangeCreates an array of numbers from a specified range.
splitByValueSplits and clumps together an array of elements by using a separator.
groupByGroups values in an array of objects by the provided property.
repeatRepeats a function a set amount of times.
generateArrayCreates an array of a certain length filled with a specified value.
endReturns the last N elements of an array. If 1 is specified, it returns only the last element.
sampleGets a random element of an array.
zipCombines two arrays into one, similar to the Python zip function.
differenceGets an array that contains the elements that are present in the array a, but not in the array b.

Other functions

NameDescription
sumSums an unspecified amount of inputs.
productMultiplies an unspecified amount of inputs.
modPerforms a modulo operation akin to that of Python.
randIntGets a random integer between an inclusive range.
generateRandomStringGenerates a string composed of N random characters.

Keywords

utils

FAQs

Package last updated on 15 Dec 2022

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