New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grid-frame

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grid-frame

This is the base framework for the grid. ## Usage ```javascript const framework = require('grid-frame')(gridWidth, gridHeight) ``` ## Framework Initialising the grid framework will return an object of the following format. ### .grid Private `grid` is a tw

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

grid-frame

This is the base framework for the grid.

Usage

const framework = require('grid-frame')(gridWidth, gridHeight)

Framework

Initialising the grid framework will return an object of the following format.

.grid

Private grid is a two dimensional array containing objects. Each object by default contains {_x: x, _y: y}.

.get(x, y)

Returns promise. Resolves value of grid[x][y] and rejects if grid[x][y] is undefined.

.getAll()

Returns promise. Resolves value of two dimensional array grid and rejects if grid is undefined.

.set(x, y, z)

Returns promise. Resolves with no value and rejects if grid[x][y] is undefined.

.save

The read/write mechanism for storing grid in JSON format. JSON is stored in save.json within the grid-frame directory.

.read()

Returns promise. Resolves with value of grid and rejects error.

.write(grid)

Returns promise. Resolves with no value and rejects error.

FAQs

Package last updated on 26 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts