id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
yakyak/yakyak:src/ui/models/connection.coffee:5:raw_corpus
raw_corpus
wrapAction = (f) -> handle 'connwrap', -> f() action 'connwrap'
CoffeeScript
yakyak/yakyak
src/ui/models/connection.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee
87
89
yakyak/yakyak:src/ui/models/connection.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript wrapAction = (f) -> handle 'connwrap', -> f() action 'connwrap' ```
var wrapAction; wrapAction = function(f) { handle('connwrap', function() { return f(); }); return action('connwrap'); };
CoffeeScript
JavaScript
yakyak/yakyak
src/ui/models/connection.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee
87
89
yakyak/yakyak:src/ui/models/connection.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var wrapAction; wrapAction = function(f) { handle('connwrap', function() { return f(); }); return action('connwrap'); }; ```
wrapAction = (f) -> handle 'connwrap', -> f() action 'connwrap'
JavaScript
CoffeeScript
yakyak/yakyak
src/ui/models/connection.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee
87
89
Nedomas/databound:test/crud.coffee:1:raw_corpus
raw_corpus
fakePromise = (result) -> then: (callback) -> callback(result) Databound.fake_responses = {}
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fakePromise = (result) -> then: (callback) -> callback(result) Databound.fake_responses = {} ```
var fakePromise; fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; Databound.fake_responses = {};
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fakePromise; fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; Databound.fake_responses = {}; ```
fakePromise = (result) -> then: (callback) -> callback(result) Databound.fake_responses = {}
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:1:completion
completion
fakePromise = (result) -> then: (callback) -> callback(result)
Databound.fake_responses = {}
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:2:raw_corpus
raw_corpus
fakeResponse = (resp, action = 'where') -> Databound.fake_responses[action] = resp Databound::request = (action, params) -> fakePromise Databound.fake_responses[action] # Configs Databound.API_URL = 'http://databound-testing.com'
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fakeResponse = (resp, action = 'where') -> Databound.fake_responses[action] = resp Databound::request = (action, params) -> fakePromise Databound.fake_responses[action] # Configs Databound.API_URL = 'http://databound-testing.com' ```
var fakeResponse; fakeResponse = function(resp, action = 'where') { Databound.fake_responses[action] = resp; return Databound.prototype.request = function(action, params) { return fakePromise(Databound.fake_responses[action]); }; }; // Configs Databound.API_URL = 'http://databound-testing.com';
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fakeResponse; fakeResponse = function(resp, action = 'where') { Databound.fake_responses[action] = resp; return Databound.prototype.request = function(action, params) { return fakePromise(Databound.fake_responses[action]); }; }; // Configs Databound...
fakeResponse = (resp, action = 'where') -> Databound.fake_responses[action] = resp Databound::request = (action, params) -> fakePromise Databound.fake_responses[action] # Configs Databound.API_URL = 'http://databound-testing.com'
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:2:completion
completion
fakeResponse = (resp, action = 'where') -> Databound.fake_responses[action] = resp Databound::request = (action, params) ->
fakePromise Databound.fake_responses[action] # Configs Databound.API_URL = 'http://databound-testing.com'
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:3:raw_corpus
raw_corpus
Databound::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Databound '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they ex...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Databound '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).t...
Databound.prototype.promise = function(result) { return fakePromise(result); }; describe('CRUD', function() { var User; User = new Databound('/users'); describe('#where', function() { it('should return zero initial records', function() { fakeResponse([]); return User.where().then(function(users...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.promise = function(result) { return fakePromise(result); }; describe('CRUD', function() { var User; User = new Databound('/users'); describe('#where', function() { it('should return zero initial records', function() { fakeResp...
Databound::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Databound '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they ex...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:3:completion
completion
Databound::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Databound '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they ex...
describe '#find', -> it 'should single record when it exists', -> resp =[ { id: 1, name: 'Nikki' } { id: 2, name: 'John' } ] fakeResponse(resp) User.find(1).then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist',...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:4:raw_corpus
raw_corpus
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) des...
User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql(void 0); }); }); ...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user...
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:completion
completion
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
scoped_records: JSON.stringify([{ id: 2, name: 'Peter' }]) , 'update' User.update(id: 2, name: 'Peter').then (user) -> expect(user).to.eql({ id: 2, name: 'Peter' }) describe '#destroy', -> it 'should destroy a record and return if it was successful', -> fakeResponse success: tr...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
a9ec95b81ba921da84ae29711a27b8000ec079bb
452
https://github.com/Nedomas/databound/blob/a9ec95b81ba921da84ae29711a27b8000ec079bb/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:raw_corpus
raw_corpus
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
2141ffd791d7a03070752938a7be6458708f4cc5
452
https://github.com/Nedomas/databound/blob/2141ffd791d7a03070752938a7be6458708f4cc5/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) des...
User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql(void 0); }); }); ...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
2141ffd791d7a03070752938a7be6458708f4cc5
452
https://github.com/Nedomas/databound/blob/2141ffd791d7a03070752938a7be6458708f4cc5/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user...
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
2141ffd791d7a03070752938a7be6458708f4cc5
452
https://github.com/Nedomas/databound/blob/2141ffd791d7a03070752938a7be6458708f4cc5/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:completion
completion
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
scoped_records: [{ id: 2, name: 'Peter' }] , 'update' User.update(id: 2, name: 'Peter').then (user) -> expect(user).to.eql({ id: 2, name: 'Peter' }) describe '#destroy', -> it 'should destroy a record and return if it was successful', -> fakeResponse success: true scope...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
2141ffd791d7a03070752938a7be6458708f4cc5
452
https://github.com/Nedomas/databound/blob/2141ffd791d7a03070752938a7be6458708f4cc5/test/crud.coffee
69
118
Nedomas/databound:test/crud.coffee:4:raw_corpus
raw_corpus
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
6cf66e14c82815d98f85a1d76853ebb89fb32c70
452
https://github.com/Nedomas/databound/blob/6cf66e14c82815d98f85a1d76853ebb89fb32c70/test/crud.coffee
69
108
Nedomas/databound:test/crud.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) des...
User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql(void 0); }); }); ...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
6cf66e14c82815d98f85a1d76853ebb89fb32c70
452
https://github.com/Nedomas/databound/blob/6cf66e14c82815d98f85a1d76853ebb89fb32c70/test/crud.coffee
69
108
Nedomas/databound:test/crud.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user...
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
6cf66e14c82815d98f85a1d76853ebb89fb32c70
452
https://github.com/Nedomas/databound/blob/6cf66e14c82815d98f85a1d76853ebb89fb32c70/test/crud.coffee
69
108
Nedomas/databound:test/crud.coffee:4:completion
completion
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
fakeResponse([{ id: 2, name: 'Peter' }], 'where') User.update(id: 2, name: 'Peter').then (user) -> expect(user).to.eql({ id: 2, name: 'Peter' }) describe '#destroy', -> it 'should destroy a record and return if it was successful', -> fakeResponse([{ id: 2, name: 'Peter' }], 'where') fa...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
6cf66e14c82815d98f85a1d76853ebb89fb32c70
452
https://github.com/Nedomas/databound/blob/6cf66e14c82815d98f85a1d76853ebb89fb32c70/test/crud.coffee
69
108
Nedomas/databound:test/crud.coffee:1:raw_corpus
raw_corpus
fakePromise = (result) -> then: (callback) -> callback(result) Godfather.fake_responses = {}
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fakePromise = (result) -> then: (callback) -> callback(result) Godfather.fake_responses = {} ```
var fakePromise; fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; Godfather.fake_responses = {};
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fakePromise; fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; Godfather.fake_responses = {}; ```
fakePromise = (result) -> then: (callback) -> callback(result) Godfather.fake_responses = {}
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:1:completion
completion
fakePromise = (result) -> then: (callback) -> callback(result)
Godfather.fake_responses = {}
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
6
9
Nedomas/databound:test/crud.coffee:2:raw_corpus
raw_corpus
fakeResponse = (resp, action = 'where') -> Godfather.fake_responses[action] = resp Godfather::request = (action, params) -> fakePromise Godfather.fake_responses[action] # Configs Godfather.API_URL = 'http://godfatherjs-testing.com'
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fakeResponse = (resp, action = 'where') -> Godfather.fake_responses[action] = resp Godfather::request = (action, params) -> fakePromise Godfather.fake_responses[action] # Configs Godfather.API_URL = 'http://godfatherjs-testing.com' ```
var fakeResponse; fakeResponse = function(resp, action = 'where') { Godfather.fake_responses[action] = resp; return Godfather.prototype.request = function(action, params) { return fakePromise(Godfather.fake_responses[action]); }; }; // Configs Godfather.API_URL = 'http://godfatherjs-testing.com';
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fakeResponse; fakeResponse = function(resp, action = 'where') { Godfather.fake_responses[action] = resp; return Godfather.prototype.request = function(action, params) { return fakePromise(Godfather.fake_responses[action]); }; }; // Configs Godfather...
fakeResponse = (resp, action = 'where') -> Godfather.fake_responses[action] = resp Godfather::request = (action, params) -> fakePromise Godfather.fake_responses[action] # Configs Godfather.API_URL = 'http://godfatherjs-testing.com'
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:2:completion
completion
fakeResponse = (resp, action = 'where') -> Godfather.fake_responses[action] = resp Godfather::request = (action, params) ->
fakePromise Godfather.fake_responses[action] # Configs Godfather.API_URL = 'http://godfatherjs-testing.com'
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
10
17
Nedomas/databound:test/crud.coffee:3:raw_corpus
raw_corpus
Godfather::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Godfather '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they ex...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Godfather::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Godfather '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).t...
Godfather.prototype.promise = function(result) { return fakePromise(result); }; describe('CRUD', function() { var User; User = new Godfather('/users'); describe('#where', function() { it('should return zero initial records', function() { fakeResponse([]); return User.where().then(function(users...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Godfather.prototype.promise = function(result) { return fakePromise(result); }; describe('CRUD', function() { var User; User = new Godfather('/users'); describe('#where', function() { it('should return zero initial records', function() { fakeResp...
Godfather::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Godfather '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they ex...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:3:completion
completion
Godfather::promise = (result) -> fakePromise(result) describe 'CRUD', -> User = new Godfather '/users' describe '#where', -> it 'should return zero initial records', -> fakeResponse([]) User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they ex...
describe '#find', -> it 'should single record when it exists', -> resp =[ { id: 1, name: 'Nikki' } { id: 2, name: 'John' } ] fakeResponse(resp) User.find(1).then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist',...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
526413f35811a6ec0b5caaa579e69536f6de9bd6
452
https://github.com/Nedomas/databound/blob/526413f35811a6ec0b5caaa579e69536f6de9bd6/test/crud.coffee
19
68
Nedomas/databound:test/crud.coffee:4:raw_corpus
raw_corpus
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
9b6d7905a7d007eb0b2257a4b68b825db49b5b76
452
https://github.com/Nedomas/databound/blob/9b6d7905a7d007eb0b2257a4b68b825db49b5b76/test/crud.coffee
69
100
Nedomas/databound:test/crud.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) des...
User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql(void 0); }); }); ...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
9b6d7905a7d007eb0b2257a4b68b825db49b5b76
452
https://github.com/Nedomas/databound/blob/9b6d7905a7d007eb0b2257a4b68b825db49b5b76/test/crud.coffee
69
100
Nedomas/databound:test/crud.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript User.findBy({ name: 'John' }).then(function(user) { return expect(user).to.eql({ id: 1, name: 'Nikki' }); }); it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.findBy({ name: 'John' }).then(function(user...
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
9b6d7905a7d007eb0b2257a4b68b825db49b5b76
452
https://github.com/Nedomas/databound/blob/9b6d7905a7d007eb0b2257a4b68b825db49b5b76/test/crud.coffee
69
100
Nedomas/databound:test/crud.coffee:4:completion
completion
User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined) describe '#create', -> it 'should create a record and re...
describe '#update', -> it 'should update a record and return it', -> fakeResponse({ success: true, id: 2 }, 'update') fakeResponse([{ id: 2, name: 'Peter' }], 'where') User.update(id: 2, name: 'Peter').then (user) -> expect(user).to.eql({ id: 2, name: 'Peter' }) describe '#destroy', ->...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
9b6d7905a7d007eb0b2257a4b68b825db49b5b76
452
https://github.com/Nedomas/databound/blob/9b6d7905a7d007eb0b2257a4b68b825db49b5b76/test/crud.coffee
69
100
Nedomas/databound:test/crud.coffee:1:raw_corpus
raw_corpus
chai = require 'chai' expect = chai.expect # Helpers fakePromise = (result) -> then: (callback) -> callback(result) fakeResponse = (resp) -> Godfather::request = -> fakePromise resp # Configs Godfather = require('../src/godfather') Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (r...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
1
50
Nedomas/databound:test/crud.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript chai = require 'chai' expect = chai.expect # Helpers fakePromise = (result) -> then: (callback) -> callback(result) fakeResponse = (resp) -> Godfather::request = -> fakePromise resp # Configs Godfather = require('../src/godfather') Godfather.API_URL = ...
var Godfather, chai, expect, fakePromise, fakeResponse; chai = require('chai'); expect = chai.expect; // Helpers fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; fakeResponse = function(resp) { return Godfather.prototype.request = function() {...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
1
50
Nedomas/databound:test/crud.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Godfather, chai, expect, fakePromise, fakeResponse; chai = require('chai'); expect = chai.expect; // Helpers fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; fakeResponse = function(resp...
chai = require 'chai' expect = chai.expect # Helpers fakePromise = (result) -> then: (callback) -> callback(result) fakeResponse = (resp) -> Godfather::request = -> fakePromise resp # Configs Godfather = require('../src/godfather') Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (r...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
1
50
Nedomas/databound:test/crud.coffee:1:completion
completion
chai = require 'chai' expect = chai.expect # Helpers fakePromise = (result) -> then: (callback) -> callback(result) fakeResponse = (resp) -> Godfather::request = -> fakePromise resp # Configs Godfather = require('../src/godfather') Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (r...
User.where().then (users) -> expect(users).to.eql([]) it 'should return all records when they exist', -> resp =[ { id: 1, name: 'Nikki' } { id: 2, name: 'John' } ] fakeResponse(resp) User.where().then (users) -> expect(users).to.eql(resp) describe '#find...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
1
50
Nedomas/databound:test/crud.coffee:2:raw_corpus
raw_corpus
it 'should undefined when it doesnt exist', -> fakeResponse([]) User.find(1).then (user) -> expect(user).to.eql(undefined) describe '#findBy', -> it 'should single record when it exists', -> resp =[ { id: 1, name: 'Nikki' } ] fakeResponse(resp) User.findBy(n...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
51
73
Nedomas/databound:test/crud.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should undefined when it doesnt exist', -> fakeResponse([]) User.find(1).then (user) -> expect(user).to.eql(undefined) describe '#findBy', -> it 'should single record when it exists', -> resp =[ { id: 1, name: 'Nikki'...
it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.find(1).then(function(user) { return expect(user).to.eql(void 0); }); }); describe('#findBy', function() { it('should single record when it exists', function() { var resp; resp = [ { id: 1, ...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
51
73
Nedomas/databound:test/crud.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should undefined when it doesnt exist', function() { fakeResponse([]); return User.find(1).then(function(user) { return expect(user).to.eql(void 0); }); }); describe('#findBy', function() { it('should single record when it exists', function() { ...
it 'should undefined when it doesnt exist', -> fakeResponse([]) User.find(1).then (user) -> expect(user).to.eql(undefined) describe '#findBy', -> it 'should single record when it exists', -> resp =[ { id: 1, name: 'Nikki' } ] fakeResponse(resp) User.findBy(n...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
51
73
Nedomas/databound:test/crud.coffee:2:completion
completion
it 'should undefined when it doesnt exist', -> fakeResponse([]) User.find(1).then (user) -> expect(user).to.eql(undefined) describe '#findBy', -> it 'should single record when it exists', -> resp =[ { id: 1, name: 'Nikki' } ]
fakeResponse(resp) User.findBy(name: 'John').then (user) -> expect(user).to.eql({ id: 1, name: 'Nikki' }) it 'should undefined when it doesnt exist', -> fakeResponse([]) User.findBy(name: 'John').then (user) -> expect(user).to.eql(undefined)
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
09eb5fdeb9b493db7538e8c67edf5b447c895a0c
452
https://github.com/Nedomas/databound/blob/09eb5fdeb9b493db7538e8c67edf5b447c895a0c/test/crud.coffee
51
73
Nedomas/databound:test/crud.coffee:1:raw_corpus
raw_corpus
Godfather = require('../src/godfather') # Helpers fakePromise = (result) -> then: (callback) -> callback(result) # Configs Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (result) -> fakePromise(result) chai = require 'chai' expect = chai.expect describe 'CRUD', -> User = new Godfath...
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
e971063540b0a40ebfb8342eabb12b800945fa10
452
https://github.com/Nedomas/databound/blob/e971063540b0a40ebfb8342eabb12b800945fa10/test/crud.coffee
1
36
Nedomas/databound:test/crud.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Godfather = require('../src/godfather') # Helpers fakePromise = (result) -> then: (callback) -> callback(result) # Configs Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (result) -> fakePromise(result) chai = require 'chai' expec...
var Godfather, chai, expect, fakePromise; Godfather = require('../src/godfather'); // Helpers fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; // Configs Godfather.API_URL = 'http://godfatherjs-testing.com'; Godfather.prototype.promise = functio...
CoffeeScript
JavaScript
Nedomas/databound
test/crud.coffee
MIT
e971063540b0a40ebfb8342eabb12b800945fa10
452
https://github.com/Nedomas/databound/blob/e971063540b0a40ebfb8342eabb12b800945fa10/test/crud.coffee
1
36
Nedomas/databound:test/crud.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Godfather, chai, expect, fakePromise; Godfather = require('../src/godfather'); // Helpers fakePromise = function(result) { return { then: function(callback) { return callback(result); } }; }; // Configs Godfather.API_URL = 'http://godfather...
Godfather = require('../src/godfather') # Helpers fakePromise = (result) -> then: (callback) -> callback(result) # Configs Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (result) -> fakePromise(result) chai = require 'chai' expect = chai.expect describe 'CRUD', -> User = new Godfath...
JavaScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
e971063540b0a40ebfb8342eabb12b800945fa10
452
https://github.com/Nedomas/databound/blob/e971063540b0a40ebfb8342eabb12b800945fa10/test/crud.coffee
1
36
Nedomas/databound:test/crud.coffee:1:completion
completion
Godfather = require('../src/godfather') # Helpers fakePromise = (result) -> then: (callback) -> callback(result) # Configs Godfather.API_URL = 'http://godfatherjs-testing.com' Godfather::promise = (result) -> fakePromise(result) chai = require 'chai' expect = chai.expect describe 'CRUD', -> User = new Godfath...
it 'should return zero initial records', -> Godfather::request = (result) -> fakePromise [] User.where().then (users) -> expect(users).to.eql([]) it 'should return some records when they exist', -> server_resp =[ { id: 1, name: 'Nikki' } { id: 2, name: 'John' } ...
CoffeeScript
CoffeeScript
Nedomas/databound
test/crud.coffee
MIT
e971063540b0a40ebfb8342eabb12b800945fa10
452
https://github.com/Nedomas/databound/blob/e971063540b0a40ebfb8342eabb12b800945fa10/test/crud.coffee
1
36
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:raw_corpus
raw_corpus
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->close', -> it 'should be a funct...
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test...
var Subscriber, createClient; ({createClient} = require('../../lib/redis')); Subscriber = require('../../lib/Subscriber'); describe('Subscriber', function() { return describe('when a message is pubbed to the channel', function() { beforeEach(function() { this.redis = createClient(); return this.sut...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Subscriber, createClient; ({createClient} = require('../../lib/redis')); Subscriber = require('../../lib/Subscriber'); describe('Subscriber', function() { return describe('when a message is pubbed to the channel', function() { beforeEach(function() { ...
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->close', -> it 'should be a funct...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:completion
completion
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->close', -> it 'should be a funct...
describe 'when subscribing to something else', -> beforeEach (done) -> @sut.once 'message', (@channel, @message) => done() @sut.subscribe 'sent', 'bum-id', => message = JSON.stringify(collapsingShelf: 'There! My brick collection, for all to see!') @redis.publish 'test...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:raw_corpus
raw_corpus
beforeEach (done) -> @sut.subscribe 'blah', 'vagrant-id', done describe 'when called with that id', -> beforeEach (done) -> @sut.unsubscribe 'blah', 'vagrant-id', done @onMessage = sinon.spy() @sut.on 'message', @onMessage beforeEach (done) ->...
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
51
65
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript beforeEach (done) -> @sut.subscribe 'blah', 'vagrant-id', done describe 'when called with that id', -> beforeEach (done) -> @sut.unsubscribe 'blah', 'vagrant-id', done @onMessage = sinon.spy() @sut...
beforeEach(function(done) { return this.sut.subscribe('blah', 'vagrant-id', done); }); describe('when called with that id', function() { beforeEach(function(done) { this.sut.unsubscribe('blah', 'vagrant-id', done); this.onMessage = sinon.spy(); return this.sut.on('message', this.onMessage); }); bef...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
51
65
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript beforeEach(function(done) { return this.sut.subscribe('blah', 'vagrant-id', done); }); describe('when called with that id', function() { beforeEach(function(done) { this.sut.unsubscribe('blah', 'vagrant-id', done); this.onMessage = sinon.spy(); ret...
beforeEach (done) -> @sut.subscribe 'blah', 'vagrant-id', done describe 'when called with that id', -> beforeEach (done) -> @sut.unsubscribe 'blah', 'vagrant-id', done @onMessage = sinon.spy() @sut.on 'message', @onMessage beforeEach (done) ->...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
51
65
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:completion
completion
beforeEach (done) -> @sut.subscribe 'blah', 'vagrant-id', done describe 'when called with that id', -> beforeEach (done) -> @sut.unsubscribe 'blah', 'vagrant-id', done
@onMessage = sinon.spy() @sut.on 'message', @onMessage beforeEach (done) -> @redis.publish 'test:blah:vagrant-id', JSON.stringify(defenestration: 'Look it up.'), done it 'should never call @onMessage', -> expect(@onMessage).not.to.have.been.called.like?.ever?
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Subscriber-spec.coffee
51
65
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:raw_corpus
raw_corpus
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->close', -> it 'should be a funct...
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test...
var Subscriber, createClient; ({createClient} = require('../../lib/redis')); Subscriber = require('../../lib/Subscriber'); describe('Subscriber', function() { return describe('when a message is pubbed to the channel', function() { beforeEach(function() { this.redis = createClient(); return this.sut...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Subscriber, createClient; ({createClient} = require('../../lib/redis')); Subscriber = require('../../lib/Subscriber'); describe('Subscriber', function() { return describe('when a message is pubbed to the channel', function() { beforeEach(function() { ...
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->close', -> it 'should be a funct...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:completion
completion
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->close', -> it 'should be a funct...
describe 'when subscribing to something else', -> beforeEach (done) -> @sut.once 'message', (@channel, @message) => done() @sut.subscribe 'sent', 'bum-id', => message = JSON.stringify(collapsingShelf: 'There! My brick collection, for all to see!') @redis.publish 'test...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:raw_corpus
raw_corpus
beforeEach (done) -> @redis.publish 'test:blah:vagrant-id', JSON.stringify(defenestration: 'Look it up.'), done it 'should never call @onMessage', -> expect(@onMessage).not.to.have.been.called.like?.ever?
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
51
56
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript beforeEach (done) -> @redis.publish 'test:blah:vagrant-id', JSON.stringify(defenestration: 'Look it up.'), done it 'should never call @onMessage', -> expect(@onMessage).not.to.have.been.called.like?.ever? ```
beforeEach(function(done) { return this.redis.publish('test:blah:vagrant-id', JSON.stringify({ defenestration: 'Look it up.' }), done); }); it('should never call @onMessage', function() { var ref; return ((ref = expect(this.onMessage).not.to.have.been.called.like) != null ? ref.ever : void 0) != null; });
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
51
56
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript beforeEach(function(done) { return this.redis.publish('test:blah:vagrant-id', JSON.stringify({ defenestration: 'Look it up.' }), done); }); it('should never call @onMessage', function() { var ref; return ((ref = expect(this.onMessage).not.to.have.been....
beforeEach (done) -> @redis.publish 'test:blah:vagrant-id', JSON.stringify(defenestration: 'Look it up.'), done it 'should never call @onMessage', -> expect(@onMessage).not.to.have.been.called.like?.ever?
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
51
56
octoblu/meshblu:test/lib/Subscriber-spec.coffee:2:completion
completion
beforeEach (done) -> @redis.publish 'test:blah:vagrant-id', JSON.stringify(defenestration: 'Look it up.'), done
it 'should never call @onMessage', -> expect(@onMessage).not.to.have.been.called.like?.ever?
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
522227fcd1396af7d488c8b34d61bd045bd0c85b
815
https://github.com/octoblu/meshblu/blob/522227fcd1396af7d488c8b34d61bd045bd0c85b/test/lib/Subscriber-spec.coffee
51
56
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:raw_corpus
raw_corpus
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->subscribe', -> describe 'when su...
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test...
var Subscriber, createClient; ({createClient} = require('../../lib/redis')); Subscriber = require('../../lib/Subscriber'); describe('Subscriber', function() { return describe('when a message is pubbed to the channel', function() { beforeEach(function() { this.redis = createClient(); return this.sut...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Subscriber, createClient; ({createClient} = require('../../lib/redis')); Subscriber = require('../../lib/Subscriber'); describe('Subscriber', function() { return describe('when a message is pubbed to the channel', function() { beforeEach(function() { ...
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->subscribe', -> describe 'when su...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Subscriber-spec.coffee
1
50
octoblu/meshblu:test/lib/Subscriber-spec.coffee:1:completion
completion
{createClient} = require '../../lib/redis' Subscriber = require '../../lib/Subscriber' describe 'Subscriber', -> describe 'when a message is pubbed to the channel', -> beforeEach -> @redis = createClient() @sut = new Subscriber namespace: 'test' describe '->subscribe', -> describe 'when su...
@sut.once 'message', (@channel, @message) => done() @sut.subscribe 'sent', 'bum-id', => message = JSON.stringify(collapsingShelf: 'There! My brick collection, for all to see!') @redis.publish 'test:sent:bum-id', message it 'should receive it', -> expect(@message).to....
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Subscriber-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Subscriber-spec.coffee
1
50
gterrono/houston:server/methods.coffee:1:raw_corpus
raw_corpus
# shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: ...
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/server/methods.coffee
1
45
gterrono/houston:server/methods.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods)...
// shared meteor methods var require_admin; require_admin = function(func) { return function() { if (Houston._user_is_admin(this.userId)) { return func.apply(this, arguments); } }; }; Houston.methods = function(collection, raw_methods) { var collection_name, func, func_name, method_names, methods;...
CoffeeScript
JavaScript
gterrono/houston
server/methods.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/server/methods.coffee
1
45
gterrono/houston:server/methods.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // shared meteor methods var require_admin; require_admin = function(func) { return function() { if (Houston._user_is_admin(this.userId)) { return func.apply(this, arguments); } }; }; Houston.methods = function(collection, raw_methods) { var c...
# shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: ...
JavaScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/server/methods.coffee
1
45
gterrono/houston:server/methods.coffee:1:completion
completion
# shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: ...
methods[Houston._houstonize "#{name}_update"] = require_admin (id, update_dict) -> check id, Match.Any check update_dict, Object if collection.findOne(id) collection.update(id, update_dict) else id = collection.findOne(new Meteor.Collection.ObjectID(id)) collection.update(id, update_di...
CoffeeScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/server/methods.coffee
1
45
gterrono/houston:server/methods.coffee:1:raw_corpus
raw_corpus
# shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: ...
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
5a3601c41dee96f7cc7d419ecb0e2cc30d513de9
802
https://github.com/gterrono/houston/blob/5a3601c41dee96f7cc7d419ecb0e2cc30d513de9/server/methods.coffee
1
42
gterrono/houston:server/methods.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods)...
// shared meteor methods var require_admin; require_admin = function(func) { return function() { if (Houston._user_is_admin(this.userId)) { return func.apply(this, arguments); } }; }; Houston.methods = function(collection, raw_methods) { var collection_name, func, func_name, method_names, methods;...
CoffeeScript
JavaScript
gterrono/houston
server/methods.coffee
MIT
5a3601c41dee96f7cc7d419ecb0e2cc30d513de9
802
https://github.com/gterrono/houston/blob/5a3601c41dee96f7cc7d419ecb0e2cc30d513de9/server/methods.coffee
1
42
gterrono/houston:server/methods.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // shared meteor methods var require_admin; require_admin = function(func) { return function() { if (Houston._user_is_admin(this.userId)) { return func.apply(this, arguments); } }; }; Houston.methods = function(collection, raw_methods) { var c...
# shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: ...
JavaScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
5a3601c41dee96f7cc7d419ecb0e2cc30d513de9
802
https://github.com/gterrono/houston/blob/5a3601c41dee96f7cc7d419ecb0e2cc30d513de9/server/methods.coffee
1
42
gterrono/houston:server/methods.coffee:1:completion
completion
# shared meteor methods require_admin = (func) -> -> func.apply(@, arguments) if Houston._user_is_admin @userId Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: ...
methods[Houston._houstonize "#{name}_update"] = require_admin (id, update_dict) -> check id, Match.Any check update_dict, Object if collection.findOne(id) collection.update(id, update_dict) else id = collection.findOne(new Meteor.Collection.ObjectID(id)) collection.update(id, update_di...
CoffeeScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
5a3601c41dee96f7cc7d419ecb0e2cc30d513de9
802
https://github.com/gterrono/houston/blob/5a3601c41dee96f7cc7d419ecb0e2cc30d513de9/server/methods.coffee
1
42
gterrono/houston:server/methods.coffee:1:raw_corpus
raw_corpus
# shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: collection_name}, {$set: {method_names}}) methods = {} for func_name, func of raw_met...
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
88416c2f00292e941d6c6b8ce328f7e318738106
802
https://github.com/gterrono/houston/blob/88416c2f00292e941d6c6b8ce328f7e318738106/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: collection_name}, {$set: {method_...
// shared meteor methods Houston.methods = function(collection, raw_methods) { var collection_name, func, func_name, method_names, methods; collection_name = collection.name || collection._name || collection; method_names = _(raw_methods).keys(); Houston._collections.collections.update({ name: collection_na...
CoffeeScript
JavaScript
gterrono/houston
server/methods.coffee
MIT
88416c2f00292e941d6c6b8ce328f7e318738106
802
https://github.com/gterrono/houston/blob/88416c2f00292e941d6c6b8ce328f7e318738106/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // shared meteor methods Houston.methods = function(collection, raw_methods) { var collection_name, func, func_name, method_names, methods; collection_name = collection.name || collection._name || collection; method_names = _(raw_methods).keys(); Houston._c...
# shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: collection_name}, {$set: {method_names}}) methods = {} for func_name, func of raw_met...
JavaScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
88416c2f00292e941d6c6b8ce328f7e318738106
802
https://github.com/gterrono/houston/blob/88416c2f00292e941d6c6b8ce328f7e318738106/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:completion
completion
# shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() Houston._collections.collections.update({name: collection_name}, {$set: {method_names}}) methods = {} for func_name, func of raw_met...
methods[Houston._houstonize "#{name}_update"] = (id, update_dict) -> check id, Match.Any check update_dict, Object return unless Houston._user_is_admin @userId if collection.findOne(id) collection.update(id, update_dict) else id = collection.findOne(new Meteor.Collection.ObjectID(id)) ...
CoffeeScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
88416c2f00292e941d6c6b8ce328f7e318738106
802
https://github.com/gterrono/houston/blob/88416c2f00292e941d6c6b8ce328f7e318738106/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:raw_corpus
raw_corpus
# shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() console.log "updating, so help me god" console.log collection_name Houston._collections.collections.update({name: collection_name}, {...
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
8f416fb6523cad5a96d7b372639c6b24b2138b10
802
https://github.com/gterrono/houston/blob/8f416fb6523cad5a96d7b372639c6b24b2138b10/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() console.log "updating, so help me god" console.log collection_name Houston._...
// shared meteor methods Houston.methods = function(collection, raw_methods) { var collection_name, func, func_name, method_names, methods; collection_name = collection.name || collection._name || collection; method_names = _(raw_methods).keys(); console.log("updating, so help me god"); console.log(collection...
CoffeeScript
JavaScript
gterrono/houston
server/methods.coffee
MIT
8f416fb6523cad5a96d7b372639c6b24b2138b10
802
https://github.com/gterrono/houston/blob/8f416fb6523cad5a96d7b372639c6b24b2138b10/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // shared meteor methods Houston.methods = function(collection, raw_methods) { var collection_name, func, func_name, method_names, methods; collection_name = collection.name || collection._name || collection; method_names = _(raw_methods).keys(); console.lo...
# shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() console.log "updating, so help me god" console.log collection_name Houston._collections.collections.update({name: collection_name}, {...
JavaScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
8f416fb6523cad5a96d7b372639c6b24b2138b10
802
https://github.com/gterrono/houston/blob/8f416fb6523cad5a96d7b372639c6b24b2138b10/server/methods.coffee
1
43
gterrono/houston:server/methods.coffee:1:completion
completion
# shared meteor methods Houston.methods = (collection, raw_methods) -> collection_name = collection.name or collection._name or collection method_names = _(raw_methods).keys() console.log "updating, so help me god" console.log collection_name Houston._collections.collections.update({name: collection_name}, {...
collection.insert(doc) methods[Houston._houstonize "#{name}_update"] = (id, update_dict) -> check id, Match.Any check update_dict, Object return unless Houston._user_is_admin @userId if collection.findOne(id) collection.update(id, update_dict) else id = collection.findOne(new Meteor.C...
CoffeeScript
CoffeeScript
gterrono/houston
server/methods.coffee
MIT
8f416fb6523cad5a96d7b372639c6b24b2138b10
802
https://github.com/gterrono/houston/blob/8f416fb6523cad5a96d7b372639c6b24b2138b10/server/methods.coffee
1
43
soyjavi/QuoJS:src/quo.vendor.coffee:1:raw_corpus
raw_corpus
### QuoJS (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)" _vendor = -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
3742ee4605295dc1823773b55a3ab9f34cdd021a
2,055
https://github.com/soyjavi/QuoJS/blob/3742ee4605295dc1823773b55a3ab9f34cdd021a/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### QuoJS (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapH...
/* QuoJS (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com */ (function($) { var CSS_PROPERTIES, VENDORS, _vendor; VENDORS = ["webkit", "moz", "ms", "o", ""]; CSS_PROPERTIES = { userSelect: "none", touchCallout: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)"...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
3742ee4605295dc1823773b55a3ab9f34cdd021a
2,055
https://github.com/soyjavi/QuoJS/blob/3742ee4605295dc1823773b55a3ab9f34cdd021a/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* QuoJS (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com */ (function($) { var CSS_PROPERTIES, VENDORS, _vendor; VENDORS = ["webkit", "moz", "ms", "o", ""]; CSS_PROPERTIES = { userSelect: "none", touchCallout: "none", u...
### QuoJS (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)" _vendor = -> ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
3742ee4605295dc1823773b55a3ab9f34cdd021a
2,055
https://github.com/soyjavi/QuoJS/blob/3742ee4605295dc1823773b55a3ab9f34cdd021a/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:completion
completion
### QuoJS (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)"
_vendor = -> properties = "" i = 0 while i < VENDORS.length for property of CSS_PROPERTIES properties = property properties = VENDORS[i] + properties.substring(0, 1).toUpperCase() + properties.substring(1) if VENDORS[i] #@style(proper...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
3742ee4605295dc1823773b55a3ab9f34cdd021a
2,055
https://github.com/soyjavi/QuoJS/blob/3742ee4605295dc1823773b55a3ab9f34cdd021a/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:raw_corpus
raw_corpus
### QuoJS 2.2.0 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)" _vendor = -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
e640f494375e859b542ad25aaa2b6f7682ab941b
2,055
https://github.com/soyjavi/QuoJS/blob/e640f494375e859b542ad25aaa2b6f7682ab941b/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### QuoJS 2.2.0 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" ...
/* QuoJS 2.2.0 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com */ (function($) { var CSS_PROPERTIES, VENDORS, _vendor; VENDORS = ["webkit", "moz", "ms", "o", ""]; CSS_PROPERTIES = { userSelect: "none", touchCallout: "none", userDrag: "none", tapHighlightColor: "rgba(0,0...
CoffeeScript
JavaScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
e640f494375e859b542ad25aaa2b6f7682ab941b
2,055
https://github.com/soyjavi/QuoJS/blob/e640f494375e859b542ad25aaa2b6f7682ab941b/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* QuoJS 2.2.0 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com */ (function($) { var CSS_PROPERTIES, VENDORS, _vendor; VENDORS = ["webkit", "moz", "ms", "o", ""]; CSS_PROPERTIES = { userSelect: "none", touchCallout: "none",...
### QuoJS 2.2.0 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)" _vendor = -> ...
JavaScript
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
e640f494375e859b542ad25aaa2b6f7682ab941b
2,055
https://github.com/soyjavi/QuoJS/blob/e640f494375e859b542ad25aaa2b6f7682ab941b/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:completion
completion
### QuoJS 2.2.0 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)"
_vendor = -> properties = "" i = 0 while i < VENDORS.length for property of CSS_PROPERTIES properties = property properties = VENDORS[i] + properties.substring(0, 1).toUpperCase() + properties.substring(1) if VENDORS[i] #@style(proper...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
e640f494375e859b542ad25aaa2b6f7682ab941b
2,055
https://github.com/soyjavi/QuoJS/blob/e640f494375e859b542ad25aaa2b6f7682ab941b/src/quo.vendor.coffee
1
31
soyjavi/QuoJS:src/quo.vendor.coffee:1:raw_corpus
raw_corpus
### QuoJS 2.1 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($) -> VENDORS = [ "webkit", "moz", "ms", "o", "" ] CSS_PROPERTIES = userSelect: "none" touchCallout: "none" userDrag: "none" tapHighlightColor: "rgba(0,0,0,0)" _vendor = -> ...
CoffeeScript
soyjavi/QuoJS
src/quo.vendor.coffee
MIT
27a6117dbd521ad5d555abf20e120556c6000301
2,055
https://github.com/soyjavi/QuoJS/blob/27a6117dbd521ad5d555abf20e120556c6000301/src/quo.vendor.coffee
1
31