Skip to main content

Questions tagged [coffeescript]

CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

Filter by
Sorted by
Tagged with
10 votes
1 answer
239 views

Optimize CoffeeScript comparison function

I've wrote this CoffeScript function to compare values in a table, but it turned out to be a HUGE function. Since the code is really really long, you can find it here as well. Code explanation: The ...
Razvan B.'s user avatar
  • 203
4 votes
2 answers
91 views

Initializing events on class

I wrote a simple class that substitutes all file inputs in an HTML for a more complex template and set some actions on it. The code is rather small, but I'm not used to write JavaScript. I wonder if ...
fotanus's user avatar
  • 227
3 votes
1 answer
72 views

Set up event on class and initialize state [closed]

Very similar to this question, I'm curious about common patterns/best practices for handling events in coffeescript classes, particularly when you also need to call the event handlers immediately to ...
Jared's user avatar
  • 176
2 votes
1 answer
67 views

Cleaner Way to Test for Types? [closed]

I defined a function that multiplies its argument by 3: coffee> foo = (x) -> x * 3 [Function] We can call it with an input of 1: ...
Kevin Meredith's user avatar
2 votes
3 answers
111 views

Prim's algorithm in CoffeeScript

I'm just starting to learn CoffeeScript and am trying to work through simple examples, this one being Prim's algorithm. I'd like feedback on everything but especially on making this script take ...
sunny's user avatar
  • 1,835