1.0.3 • Published 2 years ago
azureleaf v1.0.3
Azureleaf.js
A modern, lightweight Javascript data manipulation library
by Zak Schenck
Installation
Go to your project's directory and type:
npm install azureleafImport as needed:
const { $azl } = require('azureleaf');Some Included Features
- Shuffling an array
$azl.shuffle([1, 2, 3]) // Returns a randomized array- Flattening an array of any size
$azl.flatten([1, [2, 3], [4, 5, [6, 7]]]) // Returns [1, 2, 3, 4, 5, 6, 7]- Count occurrences in an array. Returning an object.
$azl.allOccurrences([1, 1, 3, 3, 5]) // Returns { 1: 2, 3: 2, 5, 1 }- Checking equality between two objects. Returns boolean
$azl.objEquality({name: 'Zak', state: 'MA'}, {name: 'Zak', state: 'MA'}) // Returns true- Creating a deep copy of an object
$azl.objCopy({name: 'Zak', state: 'MA'}) // Returns a deep copy of {name: 'Zak', state: 'MA'}- You can convert strings into multiple cases such as camel case, pascal case, and snake case.
$azl.snakeCase('Hello, world') // Returns 'hello_world'
$azl.camelCase('Hello, world') // Returns 'helloWorld'
$azl.pascalCase('Hello, world') // Returns 'HelloWorld'..And more!