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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ichord/At.js:spec/javascripts/settings.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable')... | it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
it('should not build query or run afterMatchFailed callback when out of minLen', function() {
var $inputor;
$inputor = $('#editable').atwho({
... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 94 | 136 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
it('should not build query or run afterMatchFailed callback when out of minLen', function() {... | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable').atwho
at: '@'
minLen: 2
callbacks:
... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 94 | 136 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:completion | completion | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable').atwho
at: '@'
minLen: 2
callbacks:
... | beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
afterEach ->
jasmine.Ajax.uninstall()
it "data should be empty at first", ->
expect(controller.model.fetch().length).toBe... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 94 | 136 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:raw_corpus | raw_corpus | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable').atwho
at: '@'
minLen: 2
callbacks:
... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8 | 5,250 | https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/spec/javascripts/settings.spec.coffee | 94 | 133 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable')... | it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
it('should not build query or run afterMatchFailed callback when out of minLen', function() {
var $inputor;
$inputor = $('#editable').atwho({
... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8 | 5,250 | https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/spec/javascripts/settings.spec.coffee | 94 | 133 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
it('should not build query or run afterMatchFailed callback when out of minLen', function() {... | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable').atwho
at: '@'
minLen: 2
callbacks:
... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8 | 5,250 | https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/spec/javascripts/settings.spec.coffee | 94 | 133 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:completion | completion | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable').atwho
at: '@'
minLen: 2
callbacks:
... | beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
it "data should be empty at first", ->
expect(controller.model.fetch().length).toBe 0
it "should load data after focus inputor"... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8 | 5,250 | https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/spec/javascripts/settings.spec.coffee | 94 | 133 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:raw_corpus | raw_corpus | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'query out of minLen', ->
$inputor.atwho
at: '@'
minLen: 2
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as ... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | f8692dc89f56d0925511cf9b7715113d49a00fef | 5,250 | https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/spec/javascripts/settings.spec.coffee | 94 | 130 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'query out of minLen', ->
$inputor.atwho
at: '@'
minLen: 2
simulateTypingIn $inputor
e... | it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
it('query out of minLen', function() {
$inputor.atwho({
at: '@',
minLen: 2
});
simulateTypingIn($inputor);
return expect(controller.... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | f8692dc89f56d0925511cf9b7715113d49a00fef | 5,250 | https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/spec/javascripts/settings.spec.coffee | 94 | 130 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
it('query out of minLen', function() {
$inputor.atwho({
at: '@',
minLen: 2
});
... | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'query out of minLen', ->
$inputor.atwho
at: '@'
minLen: 2
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as ... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | f8692dc89f56d0925511cf9b7715113d49a00fef | 5,250 | https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/spec/javascripts/settings.spec.coffee | 94 | 130 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:completion | completion | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'query out of minLen', ->
$inputor.atwho
at: '@'
minLen: 2
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as ... | controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
it "data should be empty at first", ->
expect(controller.model.fetch().length).toBe 0
it "should load data after focus inputor", ->
simulateTypingIn $inputor
reque... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | f8692dc89f56d0925511cf9b7715113d49a00fef | 5,250 | https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/spec/javascripts/settings.spec.coffee | 94 | 130 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:raw_corpus | raw_corpus | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 3c7f59385b9364e436dd11a8fef205fb6832f708 | 5,250 | https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/settings.spec.coffee | 94 | 123 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controlle... | it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
describe("`data` as url and load remote data", function() {
beforeEach(function() {
var controller;
jasmine.Ajax.install();
controller... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 3c7f59385b9364e436dd11a8fef205fb6832f708 | 5,250 | https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/settings.spec.coffee | 94 | 123 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('query out of maxLen', function() {
$inputor.atwho({
at: '@',
maxLen: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
describe("`data` as url and load remote data", function() {
beforeEach(function() {
var... | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 3c7f59385b9364e436dd11a8fef205fb6832f708 | 5,250 | https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/settings.spec.coffee | 94 | 123 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:completion | completion | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
... | data: "/atwho.json"
it "data should be empty at first", ->
expect(controller.model.fetch().length).toBe 0
it "should load data after focus inputor", ->
simulateTypingIn $inputor
request = jasmine.Ajax.requests.mostRecent()
response_data = [{"name":"Jacob"}, {"name":"Joshua"}, {"name":... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 3c7f59385b9364e436dd11a8fef205fb6832f708 | 5,250 | https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/settings.spec.coffee | 94 | 123 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:raw_corpus | raw_corpus | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532 | 5,250 | https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/settings.spec.coffee | 1 | 44 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.... | describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
data: fixtures["names"]
});
app = getAppO... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532 | 5,250 | https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/settings.spec.coffee | 1 | 44 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
... | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532 | 5,250 | https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/settings.spec.coffee | 1 | 44 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:completion | completion | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | $inputor = $("<input/>").atwho at: "@"
controller = $inputor.data('atwho').setContextFor("@").controller()
expect(controller.callbacks("filter")).toBe func
expect(controller.getOpt("limit")).toBe 8
$.extend $.fn.atwho.default.callbacks, old
it "setting empty at", ->
$inputor = $("<input/>").atwho... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532 | 5,250 | https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/settings.spec.coffee | 1 | 44 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:raw_corpus | raw_corpus | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/spec/javascripts/settings.spec.coffee | 1 | 42 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.... | describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
data: fixtures["names"]
});
app = getAppO... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/spec/javascripts/settings.spec.coffee | 1 | 42 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
... | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/spec/javascripts/settings.spec.coffee | 1 | 42 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:completion | completion | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | controller = $inputor.data('atwho').setContextFor("@").controller()
expect(controller.callbacks("filter")).toBe func
expect(controller.getOpt("limit")).toBe 8
$.extend $.fn.atwho.default.callbacks, old
it "setting empty at", ->
$inputor = $("<input/>").atwho at: ""
controller = $inputor.data('atw... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/spec/javascripts/settings.spec.coffee | 1 | 42 |
ichord/At.js:spec/javascripts/settings.spec.coffee:2:raw_corpus | raw_corpus | triggerAtwhoAt $inputor
expect(filter).toHaveBeenCalled()
expect(callbacks.filter).not.toHaveBeenCalled()
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$e... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/spec/javascripts/settings.spec.coffee | 44 | 89 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:2:completion | completion | triggerAtwhoAt $inputor
expect(filter).toHaveBeenCalled()
expect(callbacks.filter).not.toHaveBeenCalled()
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$e... | controller = $inputor.data('atwho').setContextFor("$").controller()
simulateTypingIn $inputor, "$"
expect(controller.view.visible()).toBe true
it "can be trigger with no space", ->
$inputor = $('#inputor3').atwho
at: "@"
data: fixtures["names"]
start_with_space: no
controller = $in... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/spec/javascripts/settings.spec.coffee | 44 | 89 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:raw_corpus | raw_corpus | it 'query out of max_len', ->
$inputor.atwho
at: '@'
max_len: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/spec/javascripts/settings.spec.coffee | 91 | 120 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'query out of max_len', ->
$inputor.atwho
at: '@'
max_len: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
control... | it('query out of max_len', function() {
$inputor.atwho({
at: '@',
max_len: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
describe("`data` as url and load remote data", function() {
beforeEach(function() {
var controller;
jasmine.Ajax.install();
controll... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/spec/javascripts/settings.spec.coffee | 91 | 120 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('query out of max_len', function() {
$inputor.atwho({
at: '@',
max_len: 0
});
simulateTypingIn($inputor);
return expect(controller.query).toBe(null);
});
describe("`data` as url and load remote data", function() {
beforeEach(function() {
v... | it 'query out of max_len', ->
$inputor.atwho
at: '@'
max_len: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/spec/javascripts/settings.spec.coffee | 91 | 120 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:completion | completion | it 'query out of max_len', ->
$inputor.atwho
at: '@'
max_len: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
... | data: "/atwho.json"
it "data should be empty at first", ->
expect(controller.model.fetch().length).toBe 0
it "should load data after focus inputor", ->
simulateTypingIn $inputor
request = jasmine.Ajax.requests.mostRecent()
response_data = [{"name":"Jacob"}, {"name":"Joshua"}, {"name":... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/spec/javascripts/settings.spec.coffee | 91 | 120 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:raw_corpus | raw_corpus | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | da256dbb2004fa2ee02818f92bef79d72291e44b | 5,250 | https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/spec/javascripts/settings.spec.coffee | 1 | 42 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.... | describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
data: fixtures["names"]
});
app = getAppO... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | da256dbb2004fa2ee02818f92bef79d72291e44b | 5,250 | https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/spec/javascripts/settings.spec.coffee | 1 | 42 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
... | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | da256dbb2004fa2ee02818f92bef79d72291e44b | 5,250 | https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/spec/javascripts/settings.spec.coffee | 1 | 42 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:completion | completion | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | controller = $inputor.data('atwho').set_context_for("@").controller()
expect(controller.callbacks("filter")).toBe func
expect(controller.get_opt("limit")).toBe 8
$.extend $.fn.atwho.default.callbacks, old
it "setting empty at", ->
$inputor = $("<input/>").atwho at: ""
controller = $inputor.data('... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | da256dbb2004fa2ee02818f92bef79d72291e44b | 5,250 | https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/spec/javascripts/settings.spec.coffee | 1 | 42 |
ichord/At.js:spec/javascripts/settings.spec.coffee:2:raw_corpus | raw_corpus | triggerAtwhoAt $inputor
expect(filter).toHaveBeenCalled()
expect(callbacks.filter).not.toHaveBeenCalled()
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$e... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | da256dbb2004fa2ee02818f92bef79d72291e44b | 5,250 | https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/spec/javascripts/settings.spec.coffee | 44 | 89 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:2:completion | completion | triggerAtwhoAt $inputor
expect(filter).toHaveBeenCalled()
expect(callbacks.filter).not.toHaveBeenCalled()
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$e... | controller = $inputor.data('atwho').set_context_for("$").controller()
simulateTypingIn $inputor, "$"
expect(controller.view.visible()).toBe true
it "can be trigger with no space", ->
$inputor = $('#inputor3').atwho
at: "@"
data: fixtures["names"]
start_with_space: no
controller = $... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | da256dbb2004fa2ee02818f92bef79d72291e44b | 5,250 | https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/spec/javascripts/settings.spec.coffee | 44 | 89 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:raw_corpus | raw_corpus | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 1 | 41 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.... | describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
data: fixtures["names"]
});
app = getAppO... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 1 | 41 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("settings", function() {
var $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
... | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 1 | 41 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:completion | completion | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.default.callbacks... | $inputor = $("<input/>").atwho at: "@"
controller = $inputor.data('atwho').set_context_for("@").controller()
expect(controller.callbacks("filter")).toBe func
expect(controller.get_opt("limit")).toBe 8
$.extend $.fn.atwho.default.callbacks, old
it "update specific settings", ->
$inputor.atwho at: ... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 1 | 41 |
ichord/At.js:spec/javascripts/settings.spec.coffee:2:raw_corpus | raw_corpus | it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$el
expect(view).not.toBeHidden()
jasmine.clock().tick 503
expect(view).toBeHidden()
jasmine.clock().u... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 43 | 84 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$el
expect(view).not.toBeHidden()
jasmine.clock().tic... | it("setting timeout", function() {
var view;
jasmine.clock().install();
$inputor.atwho({
at: "@",
display_timeout: 500
});
simulateTypingIn($inputor);
$inputor.trigger("blur");
view = controller.view.$el;
expect(view).not.toBeHidden();
jasmine.clock().tick(503);
expect(view).toBeHidden();
... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 43 | 84 |
ichord/At.js:spec/javascripts/settings.spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it("setting timeout", function() {
var view;
jasmine.clock().install();
$inputor.atwho({
at: "@",
display_timeout: 500
});
simulateTypingIn($inputor);
$inputor.trigger("blur");
view = controller.view.$el;
expect(view).not.toBeHidden();
jas... | it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$el
expect(view).not.toBeHidden()
jasmine.clock().tick 503
expect(view).toBeHidden()
jasmine.clock().u... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 43 | 84 |
ichord/At.js:spec/javascripts/settings.spec.coffee:2:completion | completion | it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
display_timeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$el
expect(view).not.toBeHidden()
jasmine.clock().tick 503
expect(view).toBeHidden()
jasmine.clock().u... | simulateTypingIn $inputor, "$"
expect(controller.view.visible()).toBe true
it "can be trigger with no space", ->
$inputor = $('#inputor3').atwho
at: "@"
data: fixtures["names"]
start_with_space: no
controller = $inputor.data('atwho').set_context_for("@").controller()
simulateTyping... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a0b5a6f736b8ac35765dc7b3051dce8783c755af | 5,250 | https://github.com/ichord/At.js/blob/a0b5a6f736b8ac35765dc7b3051dce8783c755af/spec/javascripts/settings.spec.coffee | 43 | 84 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:raw_corpus | raw_corpus | describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
it "data should be empty at first", ->
expect(controller.model.fetch().length... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 2fba41b12812207e180f7c3d1e11bf65f49e639f | 5,250 | https://github.com/ichord/At.js/blob/2fba41b12812207e180f7c3d1e11bf65f49e639f/spec/javascripts/settings.spec.coffee | 86 | 108 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
it "data should be empty a... | describe("`data` as url and load remote data", function() {
beforeEach(function() {
var controller;
jasmine.Ajax.install();
controller = app.controller();
controller.model.save(null);
return $inputor.atwho({
at: "@",
data: "/atwho.json"
});
});
it("data should be empty at first... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 2fba41b12812207e180f7c3d1e11bf65f49e639f | 5,250 | https://github.com/ichord/At.js/blob/2fba41b12812207e180f7c3d1e11bf65f49e639f/spec/javascripts/settings.spec.coffee | 86 | 108 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("`data` as url and load remote data", function() {
beforeEach(function() {
var controller;
jasmine.Ajax.install();
controller = app.controller();
controller.model.save(null);
return $inputor.atwho({
at: "@",
data: "/atwho.... | describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
it "data should be empty at first", ->
expect(controller.model.fetch().length... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 2fba41b12812207e180f7c3d1e11bf65f49e639f | 5,250 | https://github.com/ichord/At.js/blob/2fba41b12812207e180f7c3d1e11bf65f49e639f/spec/javascripts/settings.spec.coffee | 86 | 108 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:completion | completion | describe "`data` as url and load remote data", ->
beforeEach ->
jasmine.Ajax.install()
controller = app.controller()
controller.model.save null
$inputor.atwho
at: "@"
data: "/atwho.json"
it "data should be empty at first", -> | expect(controller.model.fetch().length).toBe 0
it "should load data after focus inputor", ->
simulateTypingIn $inputor
request = jasmine.Ajax.requests.mostRecent()
response_data = [{"name":"Jacob"}, {"name":"Joshua"}, {"name":"Jayden"}]
request.response
status: 200
response... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | 2fba41b12812207e180f7c3d1e11bf65f49e639f | 5,250 | https://github.com/ichord/At.js/blob/2fba41b12812207e180f7c3d1e11bf65f49e639f/spec/javascripts/settings.spec.coffee | 86 | 108 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:raw_corpus | raw_corpus | path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
module.exports = CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (ar... | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | ac60f4050f1bd0ee25198ac18beb22b40c1a0543 | 579 | https://github.com/nevir/groc/blob/ac60f4050f1bd0ee25198ac18beb22b40c1a0543/lib/utils/compatibility_helpers.coffee | 1 | 36 | ||
nevir/groc:lib/utils/compatibility_helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
module.exports = CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/'... | var CompatibilityHelpers, FORMAT_REGEXP, path, util;
path = require('path');
util = require('util');
FORMAT_REGEXP = /%[sdj%]/g;
module.exports = CompatibilityHelpers = {
// `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (process.platform === 'win32' ? '\\' : '/'),... | CoffeeScript | JavaScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | ac60f4050f1bd0ee25198ac18beb22b40c1a0543 | 579 | https://github.com/nevir/groc/blob/ac60f4050f1bd0ee25198ac18beb22b40c1a0543/lib/utils/compatibility_helpers.coffee | 1 | 36 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompatibilityHelpers, FORMAT_REGEXP, path, util;
path = require('path');
util = require('util');
FORMAT_REGEXP = /%[sdj%]/g;
module.exports = CompatibilityHelpers = {
// `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: p... | path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
module.exports = CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (ar... | JavaScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | ac60f4050f1bd0ee25198ac18beb22b40c1a0543 | 579 | https://github.com/nevir/groc/blob/ac60f4050f1bd0ee25198ac18beb22b40c1a0543/lib/utils/compatibility_helpers.coffee | 1 | 36 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:completion | completion | path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
module.exports = CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (ar... | str = String(args[0]).replace FORMAT_REGEXP, (x) ->
return x if i >= len
switch x
when '%s' then String args[i++]
when '%d' then Number args[i++]
when '%j' then JSON.stringify args[i++]
when '%%' then '%'
else x
while i < len
x = args[i++]
if x == nu... | CoffeeScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | ac60f4050f1bd0ee25198ac18beb22b40c1a0543 | 579 | https://github.com/nevir/groc/blob/ac60f4050f1bd0ee25198ac18beb22b40c1a0543/lib/utils/compatibility_helpers.coffee | 1 | 36 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:raw_corpus | raw_corpus | path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...) ->
ret... | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 0baa87b0141f11a3c5cd610b6039ce26ec357bf6 | 579 | https://github.com/nevir/groc/blob/0baa87b0141f11a3c5cd610b6039ce26ec357bf6/lib/utils/compatibility_helpers.coffee | 1 | 38 | ||
nevir/groc:lib/utils/compatibility_helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport... | var CompatibilityHelpers, FORMAT_REGEXP, path, util;
path = require('path');
util = require('util');
FORMAT_REGEXP = /%[sdj%]/g;
CompatibilityHelpers = {
// `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (process.platform === 'win32' ? '\\' : '/'),
// A backport ... | CoffeeScript | JavaScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 0baa87b0141f11a3c5cd610b6039ce26ec357bf6 | 579 | https://github.com/nevir/groc/blob/0baa87b0141f11a3c5cd610b6039ce26ec357bf6/lib/utils/compatibility_helpers.coffee | 1 | 38 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompatibilityHelpers, FORMAT_REGEXP, path, util;
path = require('path');
util = require('util');
FORMAT_REGEXP = /%[sdj%]/g;
CompatibilityHelpers = {
// `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (proce... | path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...) ->
ret... | JavaScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 0baa87b0141f11a3c5cd610b6039ce26ec357bf6 | 579 | https://github.com/nevir/groc/blob/0baa87b0141f11a3c5cd610b6039ce26ec357bf6/lib/utils/compatibility_helpers.coffee | 1 | 38 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:completion | completion | path = require 'path'
util = require 'util'
FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...) ->
ret... | return x if i >= len
switch x
when '%s' then String args[i++]
when '%d' then Number args[i++]
when '%j' then JSON.stringify args[i++]
when '%%' then '%'
else x
while i < len
x = args[i++]
if x == null or typeof x != 'object'
str += ' ' + x
el... | CoffeeScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 0baa87b0141f11a3c5cd610b6039ce26ec357bf6 | 579 | https://github.com/nevir/groc/blob/0baa87b0141f11a3c5cd610b6039ce26ec357bf6/lib/utils/compatibility_helpers.coffee | 1 | 38 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:raw_corpus | raw_corpus | FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
... | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 6df9f707b58eac10d9631d7184777c9ac4769a99 | 579 | https://github.com/nevir/groc/blob/6df9f707b58eac10d9631d7184777c9ac4769a99/lib/utils/compatibility_helpers.coffee | 1 | 33 | ||
nevir/groc:lib/utils/compatibility_helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...... | var CompatibilityHelpers, FORMAT_REGEXP;
FORMAT_REGEXP = /%[sdj%]/g;
CompatibilityHelpers = {
// `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (process.platform === 'win32' ? '\\' : '/'),
// A backport of Node 0.6's util.format
format: function(...args) {
va... | CoffeeScript | JavaScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 6df9f707b58eac10d9631d7184777c9ac4769a99 | 579 | https://github.com/nevir/groc/blob/6df9f707b58eac10d9631d7184777c9ac4769a99/lib/utils/compatibility_helpers.coffee | 1 | 33 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompatibilityHelpers, FORMAT_REGEXP;
FORMAT_REGEXP = /%[sdj%]/g;
CompatibilityHelpers = {
// `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (process.platform === 'win32' ? '\\' : '/'),
// A backport of Node... | FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
... | JavaScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 6df9f707b58eac10d9631d7184777c9ac4769a99 | 579 | https://github.com/nevir/groc/blob/6df9f707b58eac10d9631d7184777c9ac4769a99/lib/utils/compatibility_helpers.coffee | 1 | 33 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:completion | completion | FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# `path.sep` was introduced with Node 0.8, so make sure we have it in 0.6.
pathSep: path.sep || (if process.platform == 'win32' then '\\' else '/')
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
... | return x if i >= len
switch x
when '%s' then String args[i++]
when '%d' then Number args[i++]
when '%j' then JSON.stringify args[i++]
when '%%' then '%'
else x
while i < len
x = args[i++]
if x == null or typeof x != 'object'
str += ' ' + x
el... | CoffeeScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | 6df9f707b58eac10d9631d7184777c9ac4769a99 | 579 | https://github.com/nevir/groc/blob/6df9f707b58eac10d9631d7184777c9ac4769a99/lib/utils/compatibility_helpers.coffee | 1 | 33 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:raw_corpus | raw_corpus | FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
if typeof args[0] != 'string'
return args.map( (o) -> util.inspect o ).join ' '
i = 1
len = args.length
str = String(args[0]).replac... | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/utils/compatibility_helpers.coffee | 1 | 30 | ||
nevir/groc:lib/utils/compatibility_helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
if typeof args[0] != 'string'
return args.map( (o) -> util.inspect o ).join ' '
i =... | var CompatibilityHelpers, FORMAT_REGEXP;
FORMAT_REGEXP = /%[sdj%]/g;
CompatibilityHelpers = {
// A backport of Node 0.6's util.format
format: function(...args) {
var i, len, str, x;
if (util.format != null) {
return util.format(...args);
}
if (typeof args[0] !== 'string') {
return args... | CoffeeScript | JavaScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/utils/compatibility_helpers.coffee | 1 | 30 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompatibilityHelpers, FORMAT_REGEXP;
FORMAT_REGEXP = /%[sdj%]/g;
CompatibilityHelpers = {
// A backport of Node 0.6's util.format
format: function(...args) {
var i, len, str, x;
if (util.format != null) {
return util.format(...args);
}
... | FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
if typeof args[0] != 'string'
return args.map( (o) -> util.inspect o ).join ' '
i = 1
len = args.length
str = String(args[0]).replac... | JavaScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/utils/compatibility_helpers.coffee | 1 | 30 |
nevir/groc:lib/utils/compatibility_helpers.coffee:1:completion | completion | FORMAT_REGEXP = /%[sdj%]/g
CompatibilityHelpers =
# A backport of Node 0.6's util.format
format: (args...) ->
return util.format args... if util.format?
if typeof args[0] != 'string'
return args.map( (o) -> util.inspect o ).join ' '
i = 1
len = args.length
str = String(args[0]).replac... | switch x
when '%s' then String args[i++]
when '%d' then Number args[i++]
when '%j' then JSON.stringify args[i++]
when '%%' then '%'
else x
while i < len
x = args[i++]
if x == null or typeof x != 'object'
str += ' ' + x
else
str += ' ' + util... | CoffeeScript | CoffeeScript | nevir/groc | lib/utils/compatibility_helpers.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/utils/compatibility_helpers.coffee | 1 | 30 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | _ = require("lodash")
Driver = require('selenium-webdriver')
$ = Driver.promise
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
getItemClass: (el) ->
$.fulfilled(@itemClass)
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 1 | 50 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require("lodash")
Driver = require('selenium-webdriver')
$ = Driver.promise
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
getItemClass: (el) ->
$.fulfilled(@itemClass)
at: (opts) ->
if _.isNumber(opts... | var $, Driver, _;
_ = require("lodash");
Driver = require('selenium-webdriver');
$ = Driver.promise;
this.Widget.List = (function() {
class List extends this.Widget {
getItemClass(el) {
return $.fulfilled(this.itemClass);
}
at(opts) {
if (_.isNumber(opts)) {
return this.items().th... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var $, Driver, _;
_ = require("lodash");
Driver = require('selenium-webdriver');
$ = Driver.promise;
this.Widget.List = (function() {
class List extends this.Widget {
getItemClass(el) {
return $.fulfilled(this.itemClass);
}
at(opts) {
... | _ = require("lodash")
Driver = require('selenium-webdriver')
$ = Driver.promise
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
getItemClass: (el) ->
$.fulfilled(@itemClass)
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | _ = require("lodash")
Driver = require('selenium-webdriver')
$ = Driver.promise
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
getItemClass: (el) ->
$.fulfilled(@itemClass)
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
... | readAt: (opts) ->
if (_.isNumber(opts))
return @at(opts).then (widget) -> widget.read()
else
@at(opts.index).then (widget) -> widget.read(opts)
map: (iter) ->
@items().then (items) -> $.map(items, iter)
each: (iter) ->
@map.apply(this, arguments).then -> @items
length: ->
@items... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:2:raw_corpus | raw_corpus | @items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) =>
@_map elms, (el) =>
@getItemClass(el).then (itemClass) ->
new itemClass({
el: el
})
findWhere: (iter) ->
@filt... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 51 | 64 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) =>
@_map elms, (el) =>
@getItemClass(el).then (itemClass) ->
new itemClass({
... | this.items().then(function(items) {
return $.filter(items, iter)({
items: function() {
return this.find().then((el) => {
return el.findElements(Driver.By.css(this.itemSelector));
}).then((elms) => {
return this._map(elms, (el) => {
return this.getItemClass(el).then(function(i... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 51 | 64 |
mojotech/pioneer:src/widgets/Widget.List.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.items().then(function(items) {
return $.filter(items, iter)({
items: function() {
return this.find().then((el) => {
return el.findElements(Driver.By.css(this.itemSelector));
}).then((elms) => {
return this._map(elms, (el) => {... | @items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) =>
@_map elms, (el) =>
@getItemClass(el).then (itemClass) ->
new itemClass({
el: el
})
findWhere: (iter) ->
@filt... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 51 | 64 |
mojotech/pioneer:src/widgets/Widget.List.coffee:2:completion | completion | @items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) =>
@_map elms, (el) => | @getItemClass(el).then (itemClass) ->
new itemClass({
el: el
})
findWhere: (iter) ->
@filter(iter).then (items) -> items[0] if items | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.List.coffee | 51 | 64 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/src/widgets/Widget.List.coffee | 1 | 50 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https:... | var _;
_ = require("lodash");
this.Widget.List = (function() {
class List extends this.Widget {
at(opts) {
if (_.isNumber(opts)) {
return this.items().then(function(items) {
return items[opts];
});
} else {
throw new Error("Argument must be a number. https://github.... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require("lodash");
this.Widget.List = (function() {
class List extends this.Widget {
at(opts) {
if (_.isNumber(opts)) {
return this.items().then(function(items) {
return items[opts];
});
} else {
thro... | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | map: (iter) ->
@items().then (items) -> $.map(items, iter)
each: (iter) ->
@map.apply(this, arguments).then -> @items
length: ->
@items().then (items) -> items.length
invoke: (opts) ->
if(_.isString(opts) or _.isFunction(opts))
opts = {method: opts}
@map (item) ->
if _.isFunctio... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:2:raw_corpus | raw_corpus | .then (elms) =>
_.map elms, (el) =>
new @itemClass({
el: el
})
findWhere: (iter) ->
@filter(iter).then (items) -> items[0] if items | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/src/widgets/Widget.List.coffee | 51 | 58 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:2:completion | completion | .then (elms) =>
_.map elms, (el) =>
new @itemClass({
el: el | })
findWhere: (iter) ->
@filter(iter).then (items) -> items[0] if items | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 60080e556c0f1977ab77addd185b3fc2df81dc79 | 523 | https://github.com/mojotech/pioneer/blob/60080e556c0f1977ab77addd185b3fc2df81dc79/src/widgets/Widget.List.coffee | 51 | 58 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 9fac11c88b8833b75947ad342fdfa74e1ebbaf7b | 523 | https://github.com/mojotech/pioneer/blob/9fac11c88b8833b75947ad342fdfa74e1ebbaf7b/src/widgets/Widget.List.coffee | 1 | 50 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | map: (iter) ->
@items().then (items) -> $.map(items, iter)
each: (iter) ->
@map.apply(this, arguments).then -> @items
invoke: (opts) ->
if(_.isString(opts) or _.isFunction(opts))
opts = {method: opts}
@map (item) ->
if _.isFunction(opts.method)
opts.method.apply(item, opts.argu... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 9fac11c88b8833b75947ad342fdfa74e1ebbaf7b | 523 | https://github.com/mojotech/pioneer/blob/9fac11c88b8833b75947ad342fdfa74e1ebbaf7b/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:2:raw_corpus | raw_corpus | el: el
})
findWhere: (iter) ->
@filter(iter).then (items) -> items[0] if items | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | 9fac11c88b8833b75947ad342fdfa74e1ebbaf7b | 523 | https://github.com/mojotech/pioneer/blob/9fac11c88b8833b75947ad342fdfa74e1ebbaf7b/src/widgets/Widget.List.coffee | 51 | 55 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | d13defb203540b07f186afb1ca31b5a4ed954b6e | 523 | https://github.com/mojotech/pioneer/blob/d13defb203540b07f186afb1ca31b5a4ed954b6e/src/widgets/Widget.List.coffee | 1 | 50 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https:... | var _;
_ = require("lodash");
this.Widget.List = (function() {
class List extends this.Widget {
at(opts) {
if (_.isNumber(opts)) {
return this.items().then(function(items) {
return items[opts];
});
} else {
throw new Error("Argument must be a number. https://github.... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | d13defb203540b07f186afb1ca31b5a4ed954b6e | 523 | https://github.com/mojotech/pioneer/blob/d13defb203540b07f186afb1ca31b5a4ed954b6e/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require("lodash");
this.Widget.List = (function() {
class List extends this.Widget {
at(opts) {
if (_.isNumber(opts)) {
return this.items().then(function(items) {
return items[opts];
});
} else {
thro... | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | d13defb203540b07f186afb1ca31b5a4ed954b6e | 523 | https://github.com/mojotech/pioneer/blob/d13defb203540b07f186afb1ca31b5a4ed954b6e/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | _ = require("lodash")
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (opts) ->
if _.isNumber(opts)
@items().then (items) ->
items[opts]
else
throw new Error("Argument must be a number. https://github.com/mojotech/pioneer/blob/master/docs/list.md#at... | map: (iter) ->
@items().then (items) -> $.map(items, iter)
each: (iter) ->
@map.apply(this, arguments).then -> @items
invoke: (method) ->
@map (item) ->
if _.isString(method)
item[method]()
else
method.call(item)
filter: (iter) ->
@items().then (items) -> $.filter(it... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | d13defb203540b07f186afb1ca31b5a4ed954b6e | 523 | https://github.com/mojotech/pioneer/blob/d13defb203540b07f186afb1ca31b5a4ed954b6e/src/widgets/Widget.List.coffee | 1 | 50 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | fad63bb6d815b794a182add137beea1b242981c8 | 523 | https://github.com/mojotech/pioneer/blob/fad63bb6d815b794a182add137beea1b242981c8/src/widgets/Widget.List.coffee | 1 | 49 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, s... | this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
return widget.click(selector);
});
}
... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | fad63bb6d815b794a182add137beea1b242981c8 | 523 | https://github.com/mojotech/pioneer/blob/fad63bb6d815b794a182add137beea1b242981c8/src/widgets/Widget.List.coffee | 1 | 49 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
... | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | fad63bb6d815b794a182add137beea1b242981c8 | 523 | https://github.com/mojotech/pioneer/blob/fad63bb6d815b794a182add137beea1b242981c8/src/widgets/Widget.List.coffee | 1 | 49 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | each: (iter) ->
@map.apply(this, arguments).then -> @items
invoke: (method) ->
@map (item) ->
if _.isString(method)
item[method]()
else
method.call(item)
filter: (iter) ->
@items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElem... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | fad63bb6d815b794a182add137beea1b242981c8 | 523 | https://github.com/mojotech/pioneer/blob/fad63bb6d815b794a182add137beea1b242981c8/src/widgets/Widget.List.coffee | 1 | 49 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | dece8918637eb70738123e43e1f968d01129ecc3 | 523 | https://github.com/mojotech/pioneer/blob/dece8918637eb70738123e43e1f968d01129ecc3/src/widgets/Widget.List.coffee | 1 | 42 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, s... | this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
return widget.click(selector);
});
}
... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | dece8918637eb70738123e43e1f968d01129ecc3 | 523 | https://github.com/mojotech/pioneer/blob/dece8918637eb70738123e43e1f968d01129ecc3/src/widgets/Widget.List.coffee | 1 | 42 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
... | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | dece8918637eb70738123e43e1f968d01129ecc3 | 523 | https://github.com/mojotech/pioneer/blob/dece8918637eb70738123e43e1f968d01129ecc3/src/widgets/Widget.List.coffee | 1 | 42 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | map: (iter) ->
@items().then (items) -> $.map(items, iter)
each: (iter) ->
@map.apply(this, arguments).then -> @items
filter: (iter) ->
@items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) =>
_.m... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | dece8918637eb70738123e43e1f968d01129ecc3 | 523 | https://github.com/mojotech/pioneer/blob/dece8918637eb70738123e43e1f968d01129ecc3/src/widgets/Widget.List.coffee | 1 | 42 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | e2e2fc4f69421acece4718735a4a054c39d1c8e1 | 523 | https://github.com/mojotech/pioneer/blob/e2e2fc4f69421acece4718735a4a054c39d1c8e1/src/widgets/Widget.List.coffee | 1 | 39 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, s... | this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
return widget.click(selector);
});
}
... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | e2e2fc4f69421acece4718735a4a054c39d1c8e1 | 523 | https://github.com/mojotech/pioneer/blob/e2e2fc4f69421acece4718735a4a054c39d1c8e1/src/widgets/Widget.List.coffee | 1 | 39 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
... | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | e2e2fc4f69421acece4718735a4a054c39d1c8e1 | 523 | https://github.com/mojotech/pioneer/blob/e2e2fc4f69421acece4718735a4a054c39d1c8e1/src/widgets/Widget.List.coffee | 1 | 39 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
readAt: (index, selector, transformer) ->
args = Array.prototype.slice... | @at(index).then (widget) =>
widget.read.apply(widget, args.slice(1))
map: (iter) ->
@items().then (items) -> $.map(items, iter)
filter: (iter) ->
@items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) ... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | e2e2fc4f69421acece4718735a4a054c39d1c8e1 | 523 | https://github.com/mojotech/pioneer/blob/e2e2fc4f69421acece4718735a4a054c39d1c8e1/src/widgets/Widget.List.coffee | 1 | 39 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:raw_corpus | raw_corpus | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
map: (iter) ->
@items().then (items) -> $.map(items, iter)
filter: ... | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | db403007ddffb40c8664b86f6cf618149ef5bb48 | 523 | https://github.com/mojotech/pioneer/blob/db403007ddffb40c8664b86f6cf618149ef5bb48/src/widgets/Widget.List.coffee | 1 | 30 | ||
mojotech/pioneer:src/widgets/Widget.List.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
map: (iter) ->
... | this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
return widget.click(selector);
});
}
... | CoffeeScript | JavaScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | db403007ddffb40c8664b86f6cf618149ef5bb48 | 523 | https://github.com/mojotech/pioneer/blob/db403007ddffb40c8664b86f6cf618149ef5bb48/src/widgets/Widget.List.coffee | 1 | 30 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.Widget.List = (function() {
class List extends this.Widget {
at(index) {
return this.items().then(function(items) {
return items[index];
});
}
clickAt(index, selector) {
return this.at(index).then(function(widget) {
... | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
map: (iter) ->
@items().then (items) -> $.map(items, iter)
filter: ... | JavaScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | db403007ddffb40c8664b86f6cf618149ef5bb48 | 523 | https://github.com/mojotech/pioneer/blob/db403007ddffb40c8664b86f6cf618149ef5bb48/src/widgets/Widget.List.coffee | 1 | 30 |
mojotech/pioneer:src/widgets/Widget.List.coffee:1:completion | completion | class @Widget.List extends @Widget
itemSelector: 'li'
itemClass: World.Widget
at: (index) ->
@items().then (items) ->
items[index]
clickAt: (index, selector) ->
@at(index).then (widget) ->
widget.click(selector)
map: (iter) ->
@items().then (items) -> $.map(items, iter) | filter: (iter) ->
@items().then (items) -> $.filter(items, iter)
items: ->
@find().then (el) =>
el.findElements(Driver.By.css(@itemSelector))
.then (elms) =>
_.map elms, (el) =>
new @itemClass({
el: el
})
findWhere: (iter) ->
@filter(iter).then (items) -> item... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/widgets/Widget.List.coffee | MIT | db403007ddffb40c8664b86f6cf618149ef5bb48 | 523 | https://github.com/mojotech/pioneer/blob/db403007ddffb40c8664b86f6cf618149ef5bb48/src/widgets/Widget.List.coffee | 1 | 30 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.