shegit
v1.3.0
Published
Shegit modular utilities.
Readme
Shegit
Shegit modular utilities. Shegit makes JS user-friendly by providing helper functions for working with different types of data.
We would be happy if you visit our GitHub.
Documentation
See https://or-temka.github.io/shegit/
Installation
Installation npm (global):
npm i -g npmInstallation
shegitpackage last version:npm install --save shegit
Example of Using
import _ from 'shegit'
// Selects random items from array
_.getRandomValue([1, 2, 3]) // 2
// Solve the deep function to get the value of
_.resolveValue(() => () => "text") // "text"
// Transform all object keys
const original = { firstName: 'John', lastName: 'Doe', age: 30 };
const transformFn = (key) => key.toUpperCase();
_.mapObjectKeys(original, transformFn); // { FIRSTNAME: 'John', LASTNAME: 'Doe', AGE: 30 }
// RGB custom object to RGB array
_.toColor({123, () => "+4", 500}, "array") // [123, 4, 255]