1.4.843 • Published 12 months ago

structkit v1.4.843

Weekly downloads
4
License
MIT
Repository
github
Last release
12 months ago

Structkit

Javascript framework in using functional syntax for programmer.

NPM version NPM version

Site | Docs |

Why Structkit

A Javascript library that make easier in working with arrays, number,object, String and etc.

Download

To download this JS library and install in your local library

Using npm to install in your project folder:

$ npm i structkit

Due to conflict in Typescript and ES, it was decided to separate in separate package for typescript(Still working in progess)

$ npm i structkit-ts

How to import the Library

In a browser :

<script src="structkit-full.iife.js"></script>

Import on cjs

const {repeat} = require('structkit');

Import on ESM or TS

import {repeat} from 'structkit';

Example

In a browser

_stk.repeat("1",20)
//11111111111111111111

keep in mind _stk is used as global library at html

CJS, 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

get the first index of array

first([2,3,4,5])// 2

get the last index of array

last([2,3,4,5])// 5

get start and end of array index

arraySlice([1,2],1)// [2]

get sum of array

arraySum([1,2])// 3
1.4.842

12 months ago

1.4.841

12 months ago

1.4.82

12 months ago

1.4.81

12 months ago

1.4.84

12 months ago

1.4.83

12 months ago

1.4.8

12 months ago

1.4.843

12 months ago

1.4.61

2 years ago

1.4.7

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.3.1

3 years ago

1.0.1

4 years ago