Socket
Socket
Sign inDemoInstall

alg

Package Overview
Dependencies
0
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    alg

A library for parsing and transforming puzzle algorithms ("algs").


Version published
Maintainers
2
Install size
283 kB
Created

Readme

Source

alg.js

A library for parsing and transforming puzzle algorithms ("algs").

Usage

Here's how to use alg.js:

var oll = alg.parse("[F: [R, U]]");
console.log(oll);

var expanded = alg.expand(oll);
console.log(alg.algToString((oll)));

Here's how to get set up in different environments:

Online

Try it at https://npm.runkit.com/alg

Browser

Note: for the time being you need to get alg.js via npm. In the future, there will be easier ways of getting it directly.

<script src="alg.js"></script>
<script>
  alg.parse("[F: [R, U]]");
  console.log(oll);
</script>

npm

test.js:

var alg = require("alg");

var oll = alg.parse("[F: [R, U]]")
console.log(oll);

Run:

npm install alg
node test.js

ES6 & TypeScript

alg.js works with ES6 and TypeScript out of the box:

import {expand, parse, algToString} from "alg"

var oll = parse("[F: [R, U]]");
console.log(oll);

var expanded = expand(oll);
console.log(algToString((oll)));

FAQs

Last updated on 18 Jun 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc