Nested Public Modules

    @charles.thompson/lotide

    1.0.0 • Public • Published

    Lotide

    A mini clone of the Lodash library.

    Purpose

    BEWARE: This library was published for learning purposes. It is not intended for use in production-grade software.

    This project was created and published by me as part of my learnings at Lighthouse Labs.

    Usage

    Install it:

    npm install charles.thompson/lotide

    Require it:

    const _ = require('charles.thompson/lotide');

    Call it:

    const results = _.tail([1, 2, 3]) // => [2, 3]

    Documentation

    The following functions are currently implemented:

    • assertArrayEquals(arr1, arr2): the first three functions are for testing assertions if the actual is equal to the expected
    • assertEqual(arr1, arr2):
    • assertObjectsEqual(arr1, arr2):
    • countLetters(str): takes in a string and counts each of the letters
    • countOnly(allItems,itemsToCount): return a proper report on all the strings found in the input array, and their respective counts
    • eqArrays(arr1, arr2) : runs two arrays to see if they match
    • eqObjects(obj1,obj2):runs two objects to check for match
    • findKey(obj, callback) : checks value of keys in object
    • findKeyByValue(obj, val): checks value and reports back key of obj
    • head(array): takes first index of array
    • letterPositions(sentence): finds placement of letters and sums together
    • map(arr, callback): takes first value from each part of string
    • middle(array): returns middle of array, sums together even array
    • tail(arr): returns all but 0 index of array
    • takeUntil(str, callback): reports back string upon unser input
    • without(source, ItemToRemove): removes from array with user input

    Keywords

    none

    Install

    npm i @charles.thompson/lotide

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    15.1 kB

    Total Files

    26

    Last publish

    Collaborators

    • charles.thompson