Catalog npm
Back to packageRELEASE DETAILS

2.0.0

npm

10print

Nodejs implementation of the famous one-line Commodore 64 BASIC program

10printcommodorecommodore64javascriptpattern
Published11 Mar 2021
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

10print

Nodejs implementation of the famous one-line Commodore 64 BASIC program:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10. 

This project was inspired by 10 PRINT book (http://10print.org/) where you can find all the information about the original program. This script will print on the console an infinite random sequence composed only by chars / and \ in a fancy pattern.

Getting Started

To run this script you only need to install and import the npm package, then running the goto10 function. Of course don't forget to kill the process to interrupt the infinite loop :)

Installing

npm install 10print

Usage

For a basic usage run goto10() to print the standard pattern:

let p = require("10print");
p.goto10();

If you want to create your own custom pattern it's possible to call printPattern(config) in this way:

p.printPattern({
    symbol1: "/", // The first symbol of your pattern
    symbol2: "\\", // The second symbol of your pattern
    weight: 0.5 // Value between 0 and 1 that tunes the probability of each symbol to be displayed
})

This is the configuration of the standard pattern. Changing weight value would create a new one with different symbol frequency: setting 0 means to have 100% chance to get first symbol, 1 means 100% chance to get second. With 0.5 there is 50% chance for each symbol. You can change this value and the symbols as well to create your custom pattern.

Developing

Install all the dependencies:

npm install

No build is needed. To run the tests:

npm test

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^26.6.3development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-ReohCu8KBg+fk1Xt6fP7EXT8iGsUGobByIAOaLlZsalwEKTcfiWotRUIz4dTTgGNKuXvVFFYm/C8uSgdFhHQMw==",
  "shasum": "51ec6e6f91a1f0eb66b7406e708acf47c906e0b0",
  "tarball": "https://registry.npmjs.org/10print/-/10print-2.0.0.tgz",
  "fileCount": 6,
  "unpackedSize": 8689,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSo23CRA9TVsSAnZWagAANCAP/06i6ysBc6WODMJ7dIQY\nF37fI+q3l0qeCx1F2z48pCLJEHaUHY4lRtCeDBD93xKcTKxg3m6GqrmSWaR0\no9sUYhrdGpinJ55olHPpA5a4Ewulf2cTu6HI7IpbvxXMWxoLMplsnS/8iU2i\nzqoTYoRxwi/1q5mK41tT3i4J14KgCBeZlnxe9JIyGL+xg7UAJWK5itam/Ctt\nY9SpBOIaemLezqfmIiXS8mt98OKqhj/2WlD7lTsjoIg2CbbkLEm+zL3w9srh\nR+zCp8gHxLG17ti6SEp4Wn9vplWwLTvjdW5GTQ2q3omXqfWWnQ3CDYynGwR6\nIJhJ9ZBNjF4cAS8ZvmTAqmkiNlt8fV3n3gSgtMN83243emxQ246D8XQo5Rb6\nItblJfC1EY/1z1EATS3NpOkcV+PWCvlzjwV9+1Hzgo090mCIwwR3bQFmU1QC\nSb0UYvufTIpIrzxZdOG8XQJe6sxeUVCSIN4J5pjWnRrmsMovGGurqqsK204s\nwjtornIgQlFSu+DbTVRla1tKEQUu6aJ2ybQFzP0EwNl+siuGHUrkSA2D3sj3\nVD3aHtLDgWuHskyyWFkav1VRpNHk55LJiIKQzZ4hAMaDiz2DeL8aP78kklNR\nZPrDfkIBJeQMghgE75os7mQjDO7pIEkjzo9dN1H/Uol1oEn8c3CPli5FsmqN\nmheE\r\n=Ox0V\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQD0w+ZULn6hvZVdXxhrYoEbmPW0OT81qgHXHbGk+YBSqgIgLiZ8mRVEMPyKcUXgGcYKI3qVyqBbljToRoYkvEsDoP4="
    }
  ]
}

Repository

PENDING
luca1388/10print

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:01 UTC

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

Record identity

package_version:f6686c81fa73c3e2aff085b40b85209a322ce79d0843e15e7181df4a18091b9e

Other collected versions

1.2.211 Mar1.2.129 Oct1.2.029 Oct1.1.024 Oct1.0.122 Oct1.0.021 OctView all collected versions →