Catalog npm
PACKAGE EXPLORERView in registry

3d-array-to-string

npm

Convert an array to a string

Versions collected3
Direct dependencies3From release 1.0.2
Last observed20 Oct, 19:32 UTC

README

Current package documentation

3d-array-to-string

A small library which converts an array to a string.

Usage

Install

Install via npm or yarn: npm install 3d-array-to-string

Example

arrayToString(array, width, height, nSlices, original, conversion, spacePaddingNumber, linePaddingNumber, sliceSeparation)

Parameters

  • array: input array (3 dimensional)
  • width: width of array
  • height: height of array
  • nSlices: number of slices of array
  • original: the unique elements of array
  • conversion: the string corresponding to original
  • spacePaddingNumber: number of space following a string
  • linePaddingNumber: line spacing
  • spaceSeparation: slice separator string
import { arrayToString } from "array-to-string";
// OR:
// const arrayToString = require('3d-array-to-string').arrayToString;

const array = [
  1, 1, 1, 1, 1, 0, 2, 3, 0, 3, 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 1, 0, 0, 2, 2, 1,
  1, 1, 1, 2,
];
console.log(
  arrayToString(array, 6, 5, 1, [0, 1, 2, 3], ["0", "1", "2", "3"], 1)
);
// 111110
// 230302
// 200002
// 201002
// 211112

console.log(
  arrayToString(array, 6, 5, 1, [0, 1, 2, 3], [" ", "_", "|", "."], 1)
);
// _____
// |. . |
// |    |
// | _  |
// |____|

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 3

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.2Registry latest22 Feb 20223
1.0.118 Feb 20223
1.0.016 Feb 20223

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ttakenaga/3d-array-to-string

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:55bda013df657155f360ff3fcaf027dee231cd638e8a656e04a1e29ebdb5f382