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

hypera

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypera

Simple to use module for creating multi-dimensional arrays

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Hypera

Hypera is a simple to use module that allows you to create multi-dimensional arrays in an instant.

Installation

$ npm i hypera

Usage

Hypera module is imported into your project like this:

const Hypera = require('hypera')();

You can also pass in an argument that will serve as the default value for all the elements of the array:

(If no argument is passed, the default value will be set to null.)

const Hypera = require('hypera')(false);

In this case, I'm setting the default value to false.


After importing the module, you can use it like this:

// This will create a 2-dimensional array with 3 rows and 3 columns:
let array = Hypera(3,3);

/* [ [ null, null, null ],
     [ null, null, null ],
     [ null, null, null ] ] */

Now you can create arrays with as many dimensions as you need.

For example, creating a 5-dimensional array where all the dimensions have a length of 3 would look like this:

let array = Hypera(3,3,3,3,3);

License

MIT

Keywords

hyper

FAQs

Package last updated on 21 Nov 2018

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