Neptunium, Promethium, Manganese

    mcode

    0.1.0 • Public • Published

    mcode

    Take your MSON and run it as code using Geneva.

    Usage

    Requirement: to use this functionality, your code MUST be found under the heading Main and MUST be an array following Geneva's structure and syntax.

    run

    Takes an MSON structure, converts it to JSON, and runs it through Geneva.

    Given the following MSON:

    # Main (array)
    - !+
    - 5 (number)
    - 3 (number)

    When you execute it as code, it returns the correct result.

    var mcode = require('mcode');
    mcode.run(msonAbove, function(error, result) {
      console.log(result); // Outputs 8
    });

    msonToJson

    Takes an MSON structure and converts it into JSON.

    Given the following MSON:

    # Main (array)
    - !+
    - 5 (number)
    - 3 (number)

    When you execute it as code, it returns the correct result.

    var mcode = require('mcode');
    mcode.msonToJson(msonAbove, function(error, result) {
      console.log(result); // Outputs ['!+', 5, 3]
    });

    Command Line Tool

    Install mcode globally.

    npm install mcode -g

    Use the run command to run code.

    mcode run filename.md

    Keywords

    none

    Install

    npm i mcode

    DownloadsWeekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • smizell