Socket
Socket
Sign inDemoInstall

arraycraft

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    arraycraft

arrayCraft is a versatile utility package designed to level up your array and string handling skills! 🛠️ With arrayCraft, you can effortlessly manipulate arrays and strings like a pro. Whether you're sorting, filtering, or transforming data, this package


Version published
Weekly downloads
3
decreased by-75%
Maintainers
1
Install size
30.3 kB
Created
Weekly downloads
 

Readme

Source

ArrayCraft 🛠️

ArrayCraft is a powerful utility package designed to supercharge your array and string manipulation tasks in JavaScript. With a wide range of functions for arrays and strings, ArrayCraft simplifies common operations, making your coding experience more efficient and enjoyable.

Array Functions

  • sumArray: Find the sum of all array elements.
  • calculateAverage: Calculate the average of array elements.
  • findMaxValue: Find the maximum element value in an array.
  • isEmpty: Check if an array is empty.
  • removeDuplicates: Remove duplicate elements from an array.
  • arrayDifference: Find the difference between two arrays.
  • shuffleArray: Randomly shuffle the elements of an array.
  • minElement: Find the minimum element in an array.
  • maxElement: Find the maximum element in an array.
  • containsElement: Check if an element is present in an array.
  • removeFalsyValues: Remove all the falsy values from an array.
  • getRandomElement: Return random element from an array.
  • lastElement: Return Last element in the string.
  • remove: Removes all occurrences of a specified value from an array.
  • mean: Return the Mean.
  • median: Return Median.
  • mode: Return Mode.
  • countOccurrences: Count the occurrence of particular item.
  • zipArrays: Zip the array.
  • padArray: Pad array.

String Functions

  • capitalizeFirstLetter: Capitalize the first letter of a string.
  • toTitleCase: Convert a string into title case.
  • reverseString: Reverse a string.
  • isPalindrome: Check if a string is a palindrome.
  • generateRandomString: Generate a random string of a specified length.
  • toCamelCase: Convert String into Camel case.
  • removeWhitespace: Remove All the white spaces in string.
  • removeHtmlTags: Remove HTML tag in String.
  • splitWords: Make a array of words.
  • shuffleString: Shuffle the string.
  • isValidEmailL: Check is string is valid email.
  • repeatString: Repeat the string in multiple times.
  • extractUrls: Return a array of urls extract from string.
  • extractEmails: Extract the Emails from the string.
  • extractPhoneNumbers: Extract the Phone Numbers from the string.
  • extractDates: Extract the Dates from the string.
  • containsOnlyDigits: Check if string contains only digits.

Installation

You can install ArrayCraft via npm:

npm install arraycraft

Usage

const { arrayFunctions, stringFunctions } = require("arraycraft");

// Example usage of array functions
const numbers = [1, 2, 3, 4, 5];
console.log(arrayFunctions.sumArray(numbers)); // Output: 15

// Example usage of string functions
console.log(stringFunctions.capitalizeFirstLetter("hello")); // Output: Hello

Why ArrayCraft?

  • Efficiency: Perform common array and string operations with ease.
  • Flexibility: Supports various data types and scenarios.
  • Reliability: Well-tested functions for reliable results.
  • Simplicity: Clean and straightforward API for seamless integration.

Contribution

Contributions are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a pull request on GitHub.

License

ArrayCraft is licensed under the MIT License.

Keywords

FAQs

Last updated on 11 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc