Reason Native
  • Docs
  • Help
  • GitHub

›Pastel

Overview

  • Introduction
  • Native Basics
  • Getting Started

Rely

  • Introduction
  • Quickstart
  • Guides

    • Setup and Teardown
    • Mock Functions

    API Reference

    • Basic API
    • Expect
  • Advanced

Console

  • Introduction
  • Quickstart
  • API

Pastel

  • Introduction
  • Quickstart
  • API
  • Console

Refmterr

  • Introduction
  • Quickstart

File Context Printer

  • Introduction
  • Quickstart
  • API

Pastel Console

@reason-native/pastel-console is a small library that adds pretty coloring to Console output.

Install Pastel Console

To install Pastel Console in your project with esy, run

esy add @reason-native/pastel-console

This will add @reason-native/pastel-console into your package.json.

In order to use Pastel Console, you must add it to your build system. With dune, pastel-console.lib must be added to the relevant dune file:

(libraries ... pastel-console.lib)

Initialize Pastel Console

Pastel Console must be initialized with

PastelConsole.init();

Usage

That's it! Use the Console library as you usually would:

PastelConsole.init();

Console.log([{name: "joe", age: 100}, {name: "sue", age: 18}]);
[{"joe", 100}, {"sue", 18}]
← APIIntroduction →
  • Install Pastel Console
  • Initialize Pastel Console
  • Usage
Reason Native
Projects
RelyConsolePastelRefmterrFile Context Printer
More
GitHubStar
Facebook Open Source
Copyright © 2021 Facebook Inc.