randommoon.js
TypeScript icon, indicating that this package has built-in type declarations

1.0.21 • Public • Published

randommoon.js

A simple JavaScript library for generating random values.

license

CHANGELOG

Installation:

npm:

npm version

npm i randommoon.js

How to use:

Import specific functions:

CommonJS:

const {Zeros} = require("randommoon.js");

import Statement:

import {Zeros} from "randommoon.js";

*Also import All functions with default as randommoon:

const randommoon = require("randommoon.js");

Array And 2d Array structure:

const shape = [rows,cols] // 2D Array structure
const shape = [rows] // 1D Array structure

example:

const var1 = Zeros(3); 
console.log(var1.data); // Output: [0, 0, 0]
console.log(var1.shape) // Output: [3,0]

With 2D array:

const var2 = Zeros([3, 2]); 
console.log(var2.data); // Output: [[0, 0], [0, 0], [0, 0]]
console.log(var1.shape) // Output: [3,2]

Readme

Keywords

Package Sidebar

Install

npm i randommoon.js

Weekly Downloads

76

Version

1.0.21

License

MIT

Unpacked Size

44.5 kB

Total Files

62

Last publish

Collaborators

  • kiadtisak