RingoJS

Module Index

  • assert

    Assertion library covering the CommonJS Unit Testing specification and a few additional convenience methods.

  • binary

    This module provides implementations of the Binary, ByteArray, and ByteString classes as defined in the CommonJS Binary/B proposal.

    The JavaScript Binary class serves as common base class for ByteArray and ByteString and can't be instantiated. ByteArray implements a modifiable and resizable byte buffer, while ByteString implements an immutable byte sequence. The ByteArray and ByteString constructors can take several arguments. Have a look at the proposal for details.

    When passed to a Java method that expects a byte array, instances of these class are automatically unwrapped. Use the {@link #unwrap()} method to explicitly get the wrapped Java byte array.

  • console

    This module provides a familiar console object for logging and debugging.

  • fs

    This module provides file and path related functionality as defined by the CommonJS Filesystem/A proposal.

    The "fs" module provides a file system API for the manipulation of paths, directories, files, links, and the construction of file streams.

  • globals

    RingoJS adopts some of the global properties from the Rhino shell and adds a few of its own.

    Note that this module must and can not be imported like an ordinary module. It is evaluated only once upon RingoJS startup.

  • io

    This module implements the Stream/TextStream classes as per the CommonJS IO/A proposal.

  • net

    This module provides support for networking using TCP and UDP sockets.

  • system

    This module provides an implementation of the system module compliant to the CommonJS System/1.0 specification.

    Beyond the standard, a "print" function and some properties for Narwhal compatibility are provided.

  • test

    A test runner compliant to the CommonJS Unit Testing specification.

  • ringo/args

    A parser for command line options. This parser supports various option formats:

    -a -b -c (multiple short options)
    -abc (multiple short options combined into one)
    -a value (short option with value)
    -avalue (alternative short option with value)
    --option value (long option with value)
    --option=value (alternative long option with value)
  • ringo/base64

    Base64 encoding and decoding for binary data and strings.

  • ringo/buffer

    A simple text Buffer class for composing strings.

  • ringo/concurrent

    Utilities for working with multiple concurrently running threads.

  • ringo/daemon

    The daemon control script invoked by the init script.

    This module interprets the first command line argument as module ID, load the module and try to invoke the life cycle functions on it.

    For HTTP servers it is generally more convenient to directly use ringo/httpserver which will create a new server instance and pass it to as argument to the application life cycle functions.

  • ringo/encoding

    Low-level support for character encoding and decoding.

  • ringo/engine

    Provides access to the Rhino JavaScript engine.

  • ringo/events

    Exports an EventEmitter classes that provide methods to emit events and register event listener functions.

  • ringo/httpclient

  • ringo/httpserver

    A wrapper for the Jetty HTTP server.

  • ringo/jsdoc

    Low level support for parsing JSDoc-style comments from JavaScript files.

  • ringo/logging

    This module provides generic logging support for Ringo applications. It uses SLF4J or Apache log4j if either is detected in the classpath, and will fall back to java.util.logging otherwise.

    If the first argument passed to any of the logging methods is a string containing any number of curly bracket pairs ({}), the logger will interpret it as format string and use any following arguments to replace the curly bracket pairs. If an argument is an Error or Java Exception object, the logger will render a stack trace for it and append it to the log message.

    This module's exports object implements the [EventEmitter](../events/) interface and emits logged messages using the log level name as event type.

  • ringo/markdown

    A fast and extensible Markdown formatter.

  • ringo/mime

    This module provides functionality for determining the MIME type for a given file extension.

  • ringo/mustache

    CommonJS-compatible mustache.js module.

    This version of mustache.js adds filters. If a tag or section name consists of several space-separated items, the items are evaluated one at a time, starting with the right-most item. If an item evaluates to a function, the result of the previous item is passed to it as argument.

  • ringo/parser

    This module provides an interface to the Rhino parser.

  • ringo/profiler

    A profiler for measuring execution time of JavaScript functions. Note that you need to run with optimization level -1 for profiling to work. Running the profiler on optimized code will produce no data.

  • ringo/promise

    Allows to work with deferred values that will be resolved in the future.

  • ringo/shell

    provides functions to work with the Ringo shell.

  • ringo/subprocess

    A module for spawning processes, connecting to their input/output/errput and returning their response codes.

  • ringo/term

    A module for printing ANSI terminal escape sequences. This module provides a number of useful color and style constants, and a replacement for the print function optimized for styled output.

  • ringo/worker

    A Worker API based on the W3C Web Workers.

  • ringo/zip

    This module provides classes to uncompress zip files and streams.

  • ringo/jsgi/connector

    Low level JSGI adapter implementation.

  • ringo/jsgi/response

    This module provides response helper functions for composing JSGI response objects. For more flexibility the JsgiResponse is chainable.

  • ringo/utils/arrays

    Provides utility functions for working with JavaScript Arrays.

  • ringo/utils/dates

    Adds useful functions for working with JavaScript Date objects.

  • ringo/utils/files

    A collection of file related utilities.

  • ringo/utils/http

  • ringo/utils/numbers

    Provides utility functions for working with JavaScript numbers.

  • ringo/utils/objects

    Adds utility functions for working with JavaScript Objects

  • ringo/utils/strings

    Adds useful methods to the JavaScript String type.