Top "Coffeescript" questions

CoffeeScript is a language that compiles into JavaScript.

How to empty a Backbone.js collection

I was surprised to discover that this doesn't work: coll = new Backbone.Collection for i in [1..1000] coll.add new Backbone.…

backbone.js coffeescript
Examples of CoffeeScript in NodeJS?

As a pet project, I am trying to get familiar with NodeJS and CoffeeScript, and am finding it hard to …

node.js coffeescript
How do I convert a JavaScript forEach loop/function to CoffeeScript

Background: I'm trying to convert some JavaScript code which uses the the Crossfilter library with D3.js data visualization library …

javascript foreach coffeescript d3.js crossfilter
How to add a query to a webpack loader with multiple loaders?

I have this Babel loader that's working { test: /\.jsx?$/, loader: 'babel', query: babelSettings, exclude: /node_modules/ }, But now I want …

javascript coffeescript webpack babeljs
in CoffeeScript, how can I use a variable as a key in a hash?

eg: So: foo = "asdf" {foo: "bar"} eval foo # how do I get {"asdf": "bar"} ? # this will throw parse error: {(eval …

coffeescript hashmap literals
Jquery UI Draggable: Align helper to mouse position

With jQuery I have a draggable element. It's a div with a size of 200 x 40. Of course the user can …

javascript jquery coffeescript draggable
CoffeeScript, When to use fat arrow (=>) over arrow (->) and vice versa

When building a class in CoffeeScript, should all the instance method be defined using the => ("fat arrow") operator and …

coffeescript arrow-functions
Private members in CoffeeScript?

Does somebody know how to make private, non-static members in CoffeeScript? Currently I'm doing this, which just uses a public …

oop instance-variables private-members coffeescript
require()'ing a CoffeeScript file from a JavaScript file or REPL

I'm using Node.js and wanting to incorporate CoffeeScript into my workflow. I have two use-cases: I want to be …

javascript node.js coffeescript
How do I enable Webstorm intellisense for AngularJS when writing CoffeeScript

I have setup Webstorm to recognise and compile my coffeescript files. I have installed the AngularJS plugin and can successfully …

angularjs coffeescript webstorm