<commit_before># Source Map Support

This module provides source map support for stack traces in node via the [V8 stack trace API](http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. This module takes effect globally and should be initialized by inserting a call to require('source-map-support') at the top of your code.

### CoffeeScript Demo

The following terminal commands show a stack trace in node with CoffeeScript filenames:

    $ cat > demo.coffee

    require 'source-map-support'<commit_msg>add installation section to readme<commit_after># Source Map Support

This module provides source map support for stack traces in node via the [V8 stack trace API](http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen.

### Installation

    npm install source-map-support

This module takes effect globally and should be initialized by inserting a call to require('source-map-support') at the top of your code.

### CoffeeScript Demo

The following terminal commands show a stack trace in node with CoffeeScript filenames:

    $ cat > demo.coffee

    require 'source-map-support'
{'fraction_non_alphanumeric': 0.06748826291079812, 'fraction_numerical': 0.002347417840375587, 'mean_word_length': 4.482315112540193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5021889', 'n_tokens_mistral': 436, 'n_tokens_neox': 415, 'n_words': 213}