Code Monkey home page Code Monkey logo

stacky's Introduction

NPM version Build Status

Stacky

Formatting

stacky.pretty(error.stack):

Example Pretty Stack

pretty Provides several options allowing you to tweak the output format to your liking.

Parsing

stacky.parse(error.stack):

[
  {
    method:   'thingCalled',
    location: 'some/file.js',
    line:     1,
    column:   2,
  }
  ...
]

stacky's People

Contributors

dfreedm avatar jimsimon avatar

Stargazers

Ashish Kumar avatar Lê Trần Duy Tân avatar Andrew McGregor avatar Joseph van Bohemen avatar Kevin Isom avatar James Yang avatar Nathan Hutchision avatar  avatar Sebastian Fekete avatar Vaughan Rouesnel avatar Winton Welsh avatar Hemerson Vianna avatar Rocky Assad avatar Khushmeet Singh avatar Sibelius Seraphini avatar Daiwei Lu avatar Eric Clemmons avatar icefox0801 avatar Pierre-Marie Dartus avatar Haukur Páll Hallvarðsson avatar Andrii Trybynenko avatar Minh Nguyen avatar Pascal Gula avatar geppy avatar Christopher Joel avatar Jim Simon avatar Michael Anthony avatar MO avatar Whoami avatar Venj avatar Ya Zhuang avatar Steve Hansen avatar Benjamin Mosnier avatar  avatar Joshua Suggs avatar hd avatar Seb Insua avatar Ali Raza avatar Dylan Harrington avatar Jonathan Barnett avatar Florian Goße avatar J. Felix Etcetera avatar Yang He avatar Ron Waldon-Howe avatar Kasper Isager Dalsgarð avatar Fabricio Matte avatar Mario Vejlupek avatar Lin Xiangyu avatar Thomas Foster avatar Philipp Burckhardt avatar Athan avatar Paolo Moretti avatar Alex Meah avatar Francis Brito avatar Fernando Cea avatar Mark Feltner avatar Hernan (Yidi) Ke avatar jd avatar Jeroen Visser avatar Pelle Wessman avatar  avatar Matthias Thoemmes avatar Fabian Eichenberger avatar Artur Parkhisenko avatar Po-Ying Chen avatar Ben Evans avatar Jimmy Moon avatar Yosh avatar Robin Larsson avatar Dominik Ritter avatar suraj jarus avatar Stephan Ahlf avatar Matt Mueller avatar Paul Irish avatar Sean Lynch avatar

Watchers

Michael Bleigh avatar Andrew McGregor avatar  avatar Addy Osmani avatar Eric Bidelman avatar James Cloos avatar  avatar Emmanuel Garcia avatar Meggin Kearney avatar Michael Anthony avatar  avatar Wendy Ginsberg avatar  avatar Yufeng avatar Whoami avatar Natan Sągol avatar Pascal Gula avatar  avatar  avatar  avatar

stacky's Issues

Error when used with requirejs

formatting.js attempts to require "chalk" when require is defined as a function. This causes Stacky to throw errors when it's being used in a browser and require.js is present.

Bad node.js detection

stacky uses this code to detect Node.js.

var isNode = new Function('try {return this===global;}catch(e){return false;}');

However this way of detecting node is completely wrong.

First issue, the practical one. If you use the <script> version of babel-polyfill this code will declare that the browser isNode and stacky will attempt to require things.

Second problem, the idealistic one. Adding global to browsers was a proposal that made it to stage-3, i.e. nearly included into the standard and implementation attempted by browsers.

This kind of irresponsible code that equates global to Node.js/CommonJS/require is the reason we're having an issue with getting that to stage-4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.