structkit-ts
v1.4.841
Published
TS utility tool
Downloads
13
Maintainers
Readme
Structkit
Typescript framework in using functional syntax for programmer.
Why Structkit
A Typescript library that make easier in working with arrays, number,object, String and etc.
Download
To download this TS library and install in your local library
Using npm to install in your project folder:
$ npm i structkit-ts
How to import the Library
Import on ESM or TS
import {repeat} from 'structkit-ts';
Example
ESM and TS use this code below
repeat("1",20)
//11111111111111111111
If you are familiar in curry function, good thing structkit is now also supported.
test = repeat(__,20)
test("1")
//11111111111111111111
In the example you noticed that we can apply and arguments if we are unsure of possible that you need to pass as well no need to create a function just for value only
Partial sampe you can use as your utitlity function
first([2,3,4,5])// 2
last([2,3,4,5])// 5
get start and end of array index
arraySlice([1,2],1)// [2]
arraySum([1,2])// 3