Current collected state Current
Observed since 20 Oct, 19:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Convert an array to a string
A small library which converts an array to a string.
Install via npm or yarn: npm install 3d-array-to-string
arrayToString(array, width, height, nSlices, original, conversion, spacePaddingNumber, linePaddingNumber, sliceSeparation)
array: input array (3 dimensional)width: width of arrayheight: height of arraynSlices: number of slices of arrayoriginal: the unique elements of arrayconversion: the string corresponding to originalspacePaddingNumber: number of space following a stringlinePaddingNumber: line spacingspaceSeparation: slice separator stringimport { 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)
);
// _____
// |. . |
// | |
// | _ |
// |____|
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 19:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:55bda013df657155f360ff3fcaf027dee231cd638e8a656e04a1e29ebdb5f382