Socket
Book a DemoInstallSign in
Socket

bs-rebug

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-rebug

Originally a port of [debug](https://github.com/visionmedia/debug) to BuckleScript, but has since expanded a bit.

latest
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

rebug

Originally a port of debug to BuckleScript, but has since expanded a bit.

Status

  • Browser back-end has been implemented, Node.js back-end has not
  • Formatting isn't properly supported yet
  • Colors are always on
  • Isn't quite as customizable (yet)

Example

/* Reason */

/* creates a logger with the given namespace */
let debug = Debug.make("my:namespace");

/* debug.log* logs the message only if the namespace of the logger is enabled */
debug.log1("The red cow jumps over the lazy giraffe");

/* debug.error* will log the message regardless of whether the namespace is
   enabled, format it as an error and include a stack trace */
try (...) {
| error => a.error2("Error occurred while doing stuff: ", error)
};

/* debug.fn* groups any log output during its execution, and logs the arguments
   passed to and the value returned from the function */
let loggedParse = debug.fn1("JSON.parse", Js.Json.parseExn);

See examples for more.

Installation

npm install --save bs-rebug

Then add bs-rebug to bs-dependencies in your bsconfig.json:

{
  ...
  "bs-dependencies": ["bs-rebug"]
}

Keywords

BuckleScript

FAQs

Package last updated on 01 Nov 2017

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.