Hetarth02 / js-array-helpers

Array Helper functions for your quick use.
MIT License
8 stars 9 forks source link

Add new array helper functions. #15

Open Hetarth02 opened 1 year ago

Hetarth02 commented 1 year ago

You can take reference from any other language's array function and try to recreate it in javascript.

imanpalsingh commented 1 year ago

How about, ruby's each_slice?

Hetarth02 commented 1 year ago

How about, ruby's each_slice?

@imanpalsingh Can you tell me how it differs from array_chunk(arr, chunk_size) function available in this package?

imanpalsingh commented 1 year ago

Didn't know it was present, your readme only mentions 3 functions. Is there any list of these?

Hetarth02 commented 1 year ago

@imanpalsingh Currently I don't have each and every function listed and the only way is to go through index.js file's doc comments. Moreover I do have plans to create some sort of documentation for every function once enough are accumulated.

androlover98 commented 1 year ago

How about a reverse function? It takes an array as an argument and returns a new reversed array

Nirbhayparmar commented 1 year ago

@Hetarth02 If I want to add a new array function how can I contribute my function?

Hetarth02 commented 1 year ago

@Nirbhayparmar You can contribute your function as long as its logic isn't already been implemented in this package. Code the logic, add proper JSDOC comments and make a PR, if there are changes I will notify you else it everyhting seems proper I will merge it with the hacktoberfest-accepted tag.

Hetarth02 commented 1 year ago

@androlover98 Sure you can implement any number of helper functions as long as there aren't already implemented in this package.

shailendrakanherkar18 commented 1 year ago

@Hetarth02 I would like to add one helper function, name: groupByKey I am ready to raise PR, But it's giving me access right to repository error when trying to push.

Hetarth02 commented 1 year ago

@shailendrakanherkar18 I cannot understand, please specify the problem.

Nirbhayparmar commented 1 year ago

@shailendrakanherkar18 are trying to push to this repository or your forked one?

shailendrakanherkar18 commented 1 year ago

Thanks @Nirbhayparmar @Hetarth02 The issue was from end, Sorry for bothering you guys will Raise PR.