Top "Coffeescript" questions

CoffeeScript is a language that compiles into JavaScript.

Clean way to remove element from javascript array (with jQuery, coffeescript)

There are many questions about this, not least: jQuery version of array contains, a solution with the splice method and …

javascript jquery coffeescript
Easiest way to check if string is null or empty

I've got this code that checks for the empty or null string. It's working in testing. eitherStringEmpty= (email, password) -&…

coffeescript
CoffeeScript Undefined

In javascript to check if a variable was never created, we just do if (typeof MyVariable !== "undefined"){ ... } I was wonder …

coffeescript undefined
Determining whether one array contains the contents of another array in JavaScript/CoffeeScript

In JavaScript, how do I test that one array has the elements of another array? arr1 = [1, 2, 3, 4, 5] [8, 1, 10, 2, 3, 4, 5, 9].function_name(arr1) # => …

javascript arrays coffeescript
How do I define methods in a Mongoose model?

My locationsModel file: mongoose = require 'mongoose' threeTaps = require '../modules/threeTaps' Schema = mongoose.Schema ObjectId = Schema.ObjectId LocationSchema = latitude: String …

javascript node.js mongodb coffeescript mongoose
Simplest way to check if key exists in object using CoffeeScript

In CoffeeScript, what is the simplest way to check if a key exists in an object?

javascript coffeescript
How can I convert a JavaScript for-loop to CoffeeScript?

for (i = 0; i < 10; i++) { doStuff(); } That's the JavaScript code that I Want to convert to CoffeeScript.

for-loop coffeescript
Can I determine if a string is a MongoDB ObjectID?

I am doing MongoDB lookups by converting a string to BSON. Is there a way for me to determine if …

javascript node.js mongodb coffeescript express
Checkbox not binding to scope in angularjs

I am trying to bind a checkbox to scope using ng-model. The checkbox's initial state corresponds to the scope model …

angularjs binding checkbox coffeescript angularjs-ng-include
Pinch to zoom with CSS3

I'm trying to implement pinch-to-zoom gestures exactly as in Google Maps. I watched a talk by Stephen Woods - "Creating …

javascript jquery css touch coffeescript