open-index/open-npm huggingface dataset:
npm package: @javinlau/lotide
Description: this is my lotide submission thats a tad later than anyone would have liked
Author: Javin Lau
Latest version: 1.0.0

# Lotide

A mini clone of the [Lodash](https://lodash.com) 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 @javinlau/lotide`

**Require it:**

`const _ = require('@javinlau/lotide');`

**Call it:**

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

## Documentation

The following functions are currently implemented:

- `function1(assertArraysEqual)`: confirm if two or more arrays compared are equal, if so return appropriate message
- `function2(assertEqual)`: confirm if two or more primitive values compared are equal, if so return appropriate message
- `function3(assertObjectsEqual)`: confirm if two or more objects compared are equal, return appropriate message for either or
- `function4(countLetters)`: count letters in a string and return the number
- `function5(eqArrays)`: compare if two arrays are equal in length but not necessarily what the contents are contained
- `function6(findKey)`: find the keys within an object
- `function7(findKeyByValue)`: search for approriate key within object
- `function8(flatten)`: take all values in the array, including other arrays, and flatten it out to one array only
- `function9(head)`: return the first value in the array
- `function10(letterPositions)`: confirm the position of specific letters using dot notation based on the specific 0 based number given
- `function11(map)`: take an array and callbacks as input and return a new array with transformed element, which is similar to .map method
- `function12(middle)`: provide the middle value in the array, if odd number of values in array then return 1x value, if even then return middle 2 values
- `function13(tail)`: take an array and provide the last value in the array
- `function14(takeUntil)`: take array and callback as input, and conduct loop until condition within callback is observed, return up to that value, and stop loop
- `function15(without)`:  take an array, tell what the callback what value i want to remove, then return the array without the specific value i wanted to remove
npm package: @javinor/canvas-grid
Description: Visual representation of a positive integer matrix (board).
Latest version: 0.0.1
Deprecated: deprecated

# CanvasGrid

Visual representation of a positive integer matrix (board).

### Examples
See [examples page][examples]. 
[examples]: https://javinor.github.io/CanvasGrid/

## Usage

#### Initialize

initialize with an `args` object containing the canvas element and optional initial board or options
```
var grid = new CanvasGrid({ canvas: document.getElementById('myCanvas') })
```

default options or grid styles and cell colors:
```
var defaultOptions =  {
  cellSize: 30,
  lineWidth: 0.5,
  gridColor: 'black',
  valueToColor: ['white', 'black']
}
```

#### Render

Render the board (only needed for initial render)
```
grid.render()
```

#### Set a new value / board
set the cell at row 2, column 3 to value of 1:
```
grid.setValue(2, 3, 1)
```
or shove in a new board
```
grid.setBoard([
  [0,1,0],
  [0,1,0],
  [0,1,0]
])
```

#### Handle Clicks
Default handling of clicks will be toggle through the `valueToColor` array given in `args.options`. 
```
canvas.addEventListener('click', (e) => grid.handleClick(e), false)
```

You can also supply your own `newValueFn` that will get the `row`, `col` and old `value` of a cell and return a new value:
```
grid.options.newValueFn = (row, col, val) => val ? 0 : 1
```