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.

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
9k views

An Object-Oriented Programming pattern for AngularJS models using CoffeeScript classes

Over the past week, we tried to make our AngularJS model layer more powerful and reduce complexity in our controllers and template by using the object-oriented programming pattern and the CoffeeScript ...
Blaiz's user avatar
  • 141
4 votes
0 answers
138 views

Core class of a JavaScript framework for Single-Page-Applications

A few years ago I started building a tiny (~300 SLOC) JavaScript framework for scalable and maintainable Single-Page-Applications written in CoffeeScript. GitHub www.scaleapp.org It's inspired by ...
flosse's user avatar
  • 121
3 votes
0 answers
83 views

Hotel Room Problem in CoffeeScript

Question: You're in a hotel and you forgot what room number you were in but remember that the sum of it's divisors is greater than the number, yet there is no subset of those divisors that add up to ...
user avatar
3 votes
0 answers
41 views

Backbone.model based state machine

I have created a class to keep track of some internal states. You can see it as a very simple implementation of a state machine ...
Anthony Kong's user avatar
3 votes
0 answers
52 views

Using Angular directives for connect HTML clicks in buttons and controller actions

I'm trying to improve my Angular directive. I'm pretty new to CoffeeScript, so I think there may be inconsistent code. ...
user98293989823's user avatar
3 votes
0 answers
53 views

Search Class with Static Methods

Most of my programming experience is in PHP, and I have always been a bit wary of JavaScript. I have a JavaScript class to manage executing, caching and displaying search results. ...
James Fenwick's user avatar
3 votes
0 answers
83 views

Multiple select widget in CoffeeScript

I created a widget to handle multiple selections in CoffeeScript. There's a working attached snippet that uses the compiled JavaScript (Stack Snippets don't support CoffeeScript), which is available ...
Mohamad's user avatar
  • 2,034
3 votes
0 answers
680 views

Passing functions using higher order components in React

After reading this, I'm on board, however it doesn't get into passing methods from the parent class. In my mixins right now I have a lot of helper functions that are used across the various components ...
Ben's user avatar
  • 131
3 votes
0 answers
208 views

Create component with select+button

I'm new to ReactJs and trying to figure out the preferred style. I also have tried it enough to realize that I'm not a fan of jsx and prefer how React looks when written in coffeescript. This is a ...
George Mauer's user avatar
  • 1,642
2 votes
0 answers
66 views

jQuery Mobile Menu plugin

I would like some opinions on this Mobile Menu plugin I wrote for work. We develop custom WordPress themes, nothing too advanced or anything. I would like if anyone could just take a look and provide ...
bebaps's user avatar
  • 21
2 votes
0 answers
53 views

Recursively merge objects with corresponding property names

I have such objects that I need to merge: ...
eawer's user avatar
  • 207
2 votes
0 answers
67 views

Correcting a quiz

I wrote this code that's supposed to correct quizzes on a webpage, but it feels bloated and I'm sure there's tons of ways to improve it. Any thoughts? ...
Kevin Ferm's user avatar
2 votes
0 answers
883 views

Click interceptor directive

I needed a simple way to add this test to certain click events: if isUser then fireClickEvent else openSignInModal So I made this directive: ...
goldylucks's user avatar
2 votes
0 answers
386 views

Resource that use two different services and query with pagination when resolved

I'm learning Angular and I don't like my current approach. The current controller uses first Geolocation service and when ...
luzny's user avatar
  • 131
2 votes
0 answers
383 views

RESTful API parsing DBF data HSET in Redis

I have this working code, but would like your review: sync.coffe ...
khinester's user avatar
  • 277