Catalog npm
Back to packageRELEASE DETAILS

1.0.1

npm

3d-array-to-string

Convert an array to a string

Published18 Feb 2022
Direct dependencies3
Transitive dependenciesNot calculated

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.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^27.5.1development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^2.5.1development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.5.5development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-TZhdXUm+pMuaD/OblAN+Z2tEOVtDv3OsKBoRnAdIdzZZjbVDPRV1xMVT0K6oJYqiAgHordiR1gTlJ4a1lBAxIQ==",
  "shasum": "7c6fdbf91d22a6667d097250c06f8eca1c490542",
  "tarball": "https://registry.npmjs.org/3d-array-to-string/-/3d-array-to-string-1.0.1.tgz",
  "fileCount": 3,
  "unpackedSize": 2321,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDzJqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6bhAAl1rAMtH4mESdF2Y15c0opNu+NkLLbDGfIgfzW8DAOyMZuidu\r\nw8IZYmt+pR3m+6y9jU50JEmxHEOSML/Vnf92AXSrS0FjjHdU0CBX8sqpBGnO\r\ni3yAPaaUQgMBcsyKQpvj9ufLmBZ/uyVY+jgeCOxMM9bYXVeEs6ihDVYlDBEw\r\ntY7tdTjq4qmUzrlrxRpu+3eDxUWwArgvhil7eOCx762nkL/L4Iqnbi0r4COK\r\nK+FVq2T//SewE9CP1hEpI/sxVSQsxSlxXKZwWpu0ejiRivqQ+r+qwIxe0o2O\r\nzeIq7yh0aUA5x0NbZUhFCCla7kC4XDfqsRIn1buu3ABz32itTytw9nWkfiIV\r\n/psNBFL/0g3KXnPbsZPm7t1k2faqjcpSP61eDv+JdFhvdTwe2RRaWckUJDRy\r\nS770tw9qy6u2xpbA+48xiXgxa8c/ohXYy26g1yCFTzS4IfqDrCQDtRDBpmXu\r\nz3fdzDaHQ9v0LjI7b42LX8eVT/0Wk7nl2DJ3AgKfXUE5NhibKbboK3sh5t2p\r\nQo876pbDdnY1xs9y7SVjawikDieGZtVvH4zvtL+f21YQOzDaxJ9LyTRURHmQ\r\nuYoXHvrJ1TyOm+oug0FPcQCsTDNiQ6FKCnItJR6yfDRWBg9RHtmlaN6bFv9o\r\nSBdxfSwCWGcczeOfAGgetqkDbZ8GZpkhmEc=\r\n=ZbgM\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQCtKMoljz1zFUPNbBDUcA3bQtd0UOlFlU6uA1QgNtLMPQIgWKcq1TPXKtsGwkZ+NSu9+0y1Wp2s902wR1ZvK5SdvsY="
    }
  ]
}

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_version:5efd9593e06b95d442feb6206e070aea3c291fe2f8fa86868fac5931a4b1ce00

Other collected versions

1.0.222 Feb1.0.016 FebView all collected versions →