New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

coffee-trace

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee-trace

_makes debugging coffee-script easier by displaying corresponding lines of code in the stack-trace with style_

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

Coffee-Trace

Makes debugging coffee-script easier by displaying corresponding lines of code in the stack-trace with style

Coffee-Trace

About Coffee-Trace

Coffee-Trace makes debugging coffeescript code easier by attempting to point corresponding coffeescript code and line numbers and styling the stacktrace a little bit.

WARNING: This is obviously for aiding development needs and by no means intended for production use. It is also, by far, my ugliest piece of code. You've been warned.

Install and Usage

Unleash your inner masochist and enjoy uncaughtException and stack-traces, just by installing with:

npm install coffee-trace

and then

# Require it at the very beginning of your code
require('coffee-trace')

Example

Running this..

require('coffee-trace')

test = ->
  people =
    john:
      first_name: 'john'
      last_name: 'doe'
    mary:
      first_name: 'mary'
      last_name: 'jane'

  console.log("Welcome", people[p].first_name, people[p].last_name, "!!!") for p in ['john', 'mary', 'josh']

process.nextTick test

will result in this: Coffee-Trace

Why?

If you love Coffee-Script and Node.js, you will provably also be frustrated by the challenges of quickly finding and debugging the coffee-script line corresponding to the one pointed out by the stack-trace.

I've been searching a cleaner solution myself, and have found some very useful links and discussions, but am yet unsatisfied. So, while SourceMaps implementation in Coffee-Script is a reality, this is the least I can do.

ToDo ( Utopic Future High Hopes)

  • Beautify and comment code
  • Async API for code sandboxing
  • Returning a decent stack trace object (with coffee file, line and all).
  • A more complete testing

Keywords

coffee-script

FAQs

Package last updated on 29 Nov 2013

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