1.0.0 • Published 3 years ago

@bebopskull/lotide v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

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 @bebopskull/lotide

Require it:

const _ = require('@bebopskull/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual(arr1, arr2): assert equivalence of Arrays,
  • assertEqual(a,b): assert equivalence of vualues,
  • assertObjectsEqual(objA, objB): assert equality of objects,
  • countOnly(a): count how many times a single value is present in an array,
  • countLetters(stringA): count how many times a character is rpesent on a string,
  • eqArrays(arr1, arr2): test equivalence through arrays,
  • eqObjects(obj1,obj2): test equivalence through objects,
  • findKey(key): find a key in an object,
  • findKeyByValue(value): find a key in an object by its value,
  • head(arr): select the first element of an array,
  • tail(arr): select the elments of an array without from index 1,
  • letterPositions(string): return the position of a character in an array,
  • map(array): executer operations through elements of an array and create a shallow copy of the results in a new array,
  • middle(array): return the middle elements of an array,
  • takeUntil(array): select the elements of an array until a given value,
  • without(array): filters the arra, creatign a shallow copy of it omiting the given values.
acornansi-colorsajvacorn-jsxargparseansi-regexanymatchansi-stylesarray-includesarray-unionassertion-errorarray.prototype.flatbrace-expansionbinary-extensionsastral-regexbracesbalanced-matchbrowser-stdoutcall-bindcamelcasecallsiteschalkchaicheck-errorchokidarcolor-nameconcat-mapcliuicontains-pathcross-spawndecamelizedebugdeep-eqldeep-isdefine-propertiesdiffdir-globerror-exdoctrineemoji-regexenquireres-abstractescape-string-regexpeslint-module-utilseslinteslint-import-resolver-nodees-to-primitivecolor-converteslint-plugin-eseslint-plugin-importeslint-scopeeslint-plugin-promiseeslint-plugin-nodeeslint-config-standardeslint-utilseslint-visitor-keysespreeesprimaesrecurseesutilsestraversefast-deep-equalfast-globfast-levenshteinfastqfast-json-stable-stringifyfile-entry-cacheesqueryfill-rangeflatflat-cacheflattedfs.realpathfunction-bindfunctional-red-black-treefseventsget-func-nameget-intrinsicglobget-caller-filefind-upglob-parentglobbygrowlglobalsgraceful-fshashas-flaghehas-symbolsignorehosted-git-infoinflightinheritsimport-freshimurmurhashis-arrayishis-callableis-binary-pathis-core-moduleis-date-objectis-extglobis-numberis-globis-plain-objis-fullwidth-code-pointis-regexis-symbolis-negative-zerois-stringisexeisarrayjson5js-yamljson-stable-stringify-without-jsonifyload-json-filelocate-pathlodashlevnmerge2json-schema-traverselog-symbolsminimatchmicromatchlru-cachejs-tokensnanoidnormalize-package-dataminimistnatural-comparenormalize-pathobject-inspectobject-keysobject.valuesobject.assignoncemsp-limitp-locateoptionatorparent-modulepath-existspath-is-absolutep-trypath-keyparse-jsonpath-parsepath-typepicomatchpifypathvalprelude-lspunycoderandombytesread-pkgread-pkg-uppkg-dirreaddirpregexpprequire-directoryrequire-from-stringprogressrequire-main-filenameresolvereusifyresolve-fromsafe-buffersemverrimrafset-blockingshebang-regexshebang-commandserialize-javascriptspdx-expression-parserun-parallelslashspdx-correctspdx-exceptionsstrip-ansispdx-license-idssprintf-jsstring.prototype.trimendstrip-bomstring-widthstrip-json-commentsslice-ansisupports-colortext-tabletablestring.prototype.trimstartto-regex-rangetsconfig-pathstslibtype-checktsutilstype-detecttype-festuri-jsv8-compile-cachetypescriptwhich-modulewhichvalidate-npm-package-licensewrappywide-alignword-wrapyallistworkerpooly18nyargswrap-ansiyargs-parseryargs-unparseryocto-queue
1.0.0

3 years ago