New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

picofuck

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

picofuck

Tiny Javascript brainfuck interpreter

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

picofuck

npm npm Github file size GitHub

Perhaps the smallest Javascript brainfuck interpreter

picofuck is a tiny Javascript brainfuck interpreter.

Usage

var bf = require("picofuck")

bf("+++[>++++++++++<-]>+++."); // Returns "!"

Why

Why not?

This library is also an open codegolf challenge. Please feel free to submit pull requests if you're able to make the code even shorter!

Install, Build & Test

To install the package, use the standard NPM install command:

npm install picofuck

The package is hand-written, minified Javascript; therefore, no build process is required, and you can directly edit and execute the source!

An NPM script has been created for simplicity when running tests, which can be run from the command line as shown below:

npm test

picofuck uses the Tape library for testing.

Content Delivery Network (CDN)

The picofuck library can be imported via unpkg as shown below:

<script type="application/javascript">var module={};</script>
<script src="https://unpkg.com/picofuck/index.js"></script>
<script type="application/javascript">
  var bf = module.exports;
  // Library is imported as `bf`!
</script>

Be aware that picofuck is a CommonJS module and therefore uses module.exports; before importing the script, you will need to define module or use a CommonJS-compatible module loader.

License

Please see the LICENSE file for license information.

Keywords

brainfuck

FAQs

Package last updated on 12 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts