Catalog npm
PACKAGE EXPLORERView in registry

10print

npm

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

10printcommodorecommodore64javascriptpattern
Versions collected7
Direct dependencies1From release 2.0.0
Last observed20 Oct, 18:01 UTC

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.

Versions 7

Collected releases
VersionPublishedDirect dependenciesOpen version
2.0.0Registry latest11 Mar 20211
1.2.211 Mar 20211
1.2.129 Oct 20181
1.2.029 Oct 20181
1.1.024 Oct 20180
1.0.122 Oct 20180
1.0.021 Oct 20180

Package advisories

0
No matching advisories collected

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

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:6f0ea680d3e2dcb2f3697f34ac8b155df78b9f8816a1616ebd171ea8ee690944