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
flosse/sloc:src/formatters/cli-table.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Table, i18n; Table = require('cli-table'); i18n = require('../i18n'); module.exports = function(data) { var d, h, headers, i, keys, len, ref, table, toArray; keys = ['path', 'loc', 'sloc', 'cloc', 'scloc', 'mcloc', 'nloc']; headers = (function() { ...
Table = require 'cli-table' i18n = require '../i18n' module.exports = (data) -> keys = ['path', 'loc', 'sloc', 'cloc', 'scloc', 'mcloc', 'nloc'] headers = for h in ['Path', keys[1...]...] i18n.en[h] table = new Table head: headers toArray = (d) -> for k in keys if k is 'path' d[k] or ...
JavaScript
CoffeeScript
flosse/sloc
src/formatters/cli-table.coffee
MIT
8a6836f63b89f134d84408d5fb8178e50a6f3469
969
https://github.com/flosse/sloc/blob/8a6836f63b89f134d84408d5fb8178e50a6f3469/src/formatters/cli-table.coffee
1
24
flosse/sloc:src/formatters/cli-table.coffee:1:completion
completion
Table = require 'cli-table' i18n = require '../i18n' module.exports = (data) -> keys = ['path', 'loc', 'sloc', 'cloc', 'scloc', 'mcloc', 'nloc'] headers = for h in ['Path', keys[1...]...] i18n.en[h] table = new Table head: headers toArray = (d) ->
for k in keys if k is 'path' d[k] or i18n.en.Total else d[k] or '' if data.details table.push toArray d for d in data.details else table.push toArray data table.toString()
CoffeeScript
CoffeeScript
flosse/sloc
src/formatters/cli-table.coffee
MIT
8a6836f63b89f134d84408d5fb8178e50a6f3469
969
https://github.com/flosse/sloc/blob/8a6836f63b89f134d84408d5fb8178e50a6f3469/src/formatters/cli-table.coffee
1
24
soyjavi/QuoJS:spec/8_output.coffee:1:raw_corpus
raw_corpus
describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> """ beforeEach -> document.body.innerHTML = ""...
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> ...
describe("Output", function() { var el, markup; el = void 0; markup = `<header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer>`; beforeEach(function() { document.body.innerHTML = `<section class="...
CoffeeScript
JavaScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("Output", function() { var el, markup; el = void 0; markup = `<header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer>`; beforeEach(funct...
describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> """ beforeEach -> document.body.innerHTML = ""...
JavaScript
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:1:completion
completion
describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> """ beforeEach -> document.body.innerHTML = ""...
el.text value expect(el.text()).toEqual value it "can get html value to a given element", -> expect(el.html()).toEqual markup it "can set html value to a given element", -> new_markup = "<aside></aside>" el.html new_markup expect(el.html()).toEqual new_markup it "can remove the set of ma...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:2:raw_corpus
raw_corpus
li = ["<li>1</li>", "<li>2</li>"] el.html li[0] el.append li[1] expect(el.html()).toEqual(li[0] + li[1]) it "can prepend a html element to a given element", -> li = ["<li>1</li>", "<li>2</li>"] el.html li[0] el.prepend li[1] expect(el.html()).toEqual(li[1] + li[0]) it "can replace ea...
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/8_output.coffee
51
78
soyjavi/QuoJS:spec/8_output.coffee:2:completion
completion
li = ["<li>1</li>", "<li>2</li>"] el.html li[0] el.append li[1] expect(el.html()).toEqual(li[0] + li[1]) it "can prepend a html element to a given element", -> li = ["<li>1</li>", "<li>2</li>"] el.html li[0] el.prepend li[1] expect(el.html()).toEqual(li[1] + li[0]) it "can replace ea...
new_markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <aside></aside> """ $$("section > footer").replaceWith "<aside></aside>" expect(e...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/8_output.coffee
51
78
soyjavi/QuoJS:spec/8_output.coffee:1:raw_corpus
raw_corpus
describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> """ beforeEach -> document.body.innerHTML = ""...
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
6b4893723078eb2de2e2225e3b5de17eeb7c1051
2,055
https://github.com/soyjavi/QuoJS/blob/6b4893723078eb2de2e2225e3b5de17eeb7c1051/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> ...
describe("Output", function() { var el, markup; el = void 0; markup = `<header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer>`; beforeEach(function() { document.body.innerHTML = `<section class="...
CoffeeScript
JavaScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
6b4893723078eb2de2e2225e3b5de17eeb7c1051
2,055
https://github.com/soyjavi/QuoJS/blob/6b4893723078eb2de2e2225e3b5de17eeb7c1051/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("Output", function() { var el, markup; el = void 0; markup = `<header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer>`; beforeEach(funct...
describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> """ beforeEach -> document.body.innerHTML = ""...
JavaScript
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
6b4893723078eb2de2e2225e3b5de17eeb7c1051
2,055
https://github.com/soyjavi/QuoJS/blob/6b4893723078eb2de2e2225e3b5de17eeb7c1051/spec/8_output.coffee
1
50
soyjavi/QuoJS:spec/8_output.coffee:1:completion
completion
describe "Output", -> el = undefined markup = """ <header> <nav> <a href="#">One</a> <a href="#">Two</a> <a href="#">Three</a> </nav> </header> <article></article> <article></article> <footer></footer> """ beforeEach -> document.body.innerHTML = ""...
el.text value expect(el.text()).toEqual value it "can get html value to a given element", -> expect(el.html()).toEqual markup it "can ser html value to a given element", -> new_markup = "<aside></aside>" el.html new_markup expect(el.html()).toEqual new_markup it "can remove the set of ma...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
spec/8_output.coffee
MIT
6b4893723078eb2de2e2225e3b5de17eeb7c1051
2,055
https://github.com/soyjavi/QuoJS/blob/6b4893723078eb2de2e2225e3b5de17eeb7c1051/spec/8_output.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/title.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'title' mixins: [mixinSubscribe] getInitialState: -> @getState() componentDidMount: -> @subscribe recorder, => @setState @getState() getState: -> router = recorder.getState().get('router') _teamId = router.getIn(['data', '_teamId']) ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
16
65
jianliaoim/talk-os:talk-web/client/app/title.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'title' mixins: [mixinSubscribe] getInitialState: -> @getState() componentDidMount: -> @subscribe recorder, => @setState @getState() getState: -> router = recorder.getState().get('rou...
module.exports = React.createClass({ displayName: 'title', mixins: [mixinSubscribe], getInitialState: function() { return this.getState(); }, componentDidMount: function() { return this.subscribe(recorder, () => { return this.setState(this.getState()); }); }, getState: function() { v...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
16
65
jianliaoim/talk-os:talk-web/client/app/title.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'title', mixins: [mixinSubscribe], getInitialState: function() { return this.getState(); }, componentDidMount: function() { return this.subscribe(recorder, () => { return this.setState(this.g...
module.exports = React.createClass displayName: 'title' mixins: [mixinSubscribe] getInitialState: -> @getState() componentDidMount: -> @subscribe recorder, => @setState @getState() getState: -> router = recorder.getState().get('router') _teamId = router.getIn(['data', '_teamId']) ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
16
65
jianliaoim/talk-os:talk-web/client/app/title.coffee:1:completion
completion
module.exports = React.createClass displayName: 'title' mixins: [mixinSubscribe] getInitialState: -> @getState() componentDidMount: -> @subscribe recorder, => @setState @getState() getState: -> router = recorder.getState().get('router') _teamId = router.getIn(['data', '_teamId']) ...
notifications.reduce (sum, n) -> unreadNum = if n.get('isMute') then 0 else n.get('unreadNum') sum + unreadNum , 0 else 0 renderTitle: -> _teamId = @state.router.getIn(['data', '_teamId']) _roomId = @state.router.getIn(['data', '_roomId']) _toId = @state.router.getIn(['dat...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
16
65
jianliaoim/talk-os:talk-web/client/app/title.coffee:2:raw_corpus
raw_corpus
if _roomId? and topic? if topic.get('isGeneral') then titleBuffer += " · #{lang.getText('room-general')}" else titleBuffer += " · #{topic.get('topic')}" else if _toId? and contact? prefs = query.contactPrefsBy(recorder.getState(), _teamId, contact.get('_id')) name = prefs?....
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
66
87
jianliaoim/talk-os:talk-web/client/app/title.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if _roomId? and topic? if topic.get('isGeneral') then titleBuffer += " · #{lang.getText('room-general')}" else titleBuffer += " · #{topic.get('topic')}" else if _toId? and contact? prefs = query.contactPrefsBy(recorder.getSta...
var name, prefs, titleBuffer; if ((typeof _roomId !== "undefined" && _roomId !== null) && (typeof topic !== "undefined" && topic !== null)) { if (topic.get('isGeneral')) { titleBuffer += ` · ${lang.getText('room-general')}`; } else { titleBuffer += ` · ${topic.get('topic')}`; } } else if ((typeof _toId !...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
66
87
jianliaoim/talk-os:talk-web/client/app/title.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var name, prefs, titleBuffer; if ((typeof _roomId !== "undefined" && _roomId !== null) && (typeof topic !== "undefined" && topic !== null)) { if (topic.get('isGeneral')) { titleBuffer += ` · ${lang.getText('room-general')}`; } else { titleBuffer += ` ·...
if _roomId? and topic? if topic.get('isGeneral') then titleBuffer += " · #{lang.getText('room-general')}" else titleBuffer += " · #{topic.get('topic')}" else if _toId? and contact? prefs = query.contactPrefsBy(recorder.getState(), _teamId, contact.get('_id')) name = prefs?....
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
66
87
jianliaoim/talk-os:talk-web/client/app/title.coffee:2:completion
completion
if _roomId? and topic? if topic.get('isGeneral') then titleBuffer += " · #{lang.getText('room-general')}" else titleBuffer += " · #{topic.get('topic')}" else if _toId? and contact? prefs = query.contactPrefsBy(recorder.getState(), _teamId, contact.get('_id')) name = prefs?....
name = story.get('title') titleBuffer += " · #{name}" else notify.favicon 0 titleBuffer = lang.getText('talk') if document? and document.title isnt titleBuffer document.title = titleBuffer render: -> @renderTitle() null
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/title.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/title.coffee
66
87
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:raw_corpus
raw_corpus
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('it...
describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describe('constructor', function() { beforeEach(function()...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describ...
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:completion
completion
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
beforeEach -> @dream = new Dream(name: 'Diving with scuba') it "should return model's attributes", -> expect(@storage.create(@dream).get 'name').toEqual('Diving with scuba') it 'should generate local id', -> spyOn(@storage, 'guid').andReturn('1') @storage.create(@dream) expect(@s...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:raw_corpus
raw_corpus
it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id to "sid" attribute', -> expect(@storage.create(new...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id...
it('does not set updated_at and dirty when options = {local: true}', function() { var createdModel; createdModel = this.storage.create(this.dream, { local: true }); expect(createdModel.dirty).toBeUndefined(); return expect(createdModel.updated_at).toBeUndefined(); }); it('should save server id to "sid" a...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('does not set updated_at and dirty when options = {local: true}', function() { var createdModel; createdModel = this.storage.create(this.dream, { local: true }); expect(createdModel.dirty).toBeUndefined(); return expect(createdModel.updated_at).toB...
it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id to "sid" attribute', -> expect(@storage.create(new...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:completion
completion
it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id to "sid" attribute', -> expect(@storage.create(new...
expect(updatedModel.get 'dirty').toBeTruthy() expect(updatedModel.get 'updated_at').toBeDefined() it 'does not set updated_at and dirty when options = {local: true}', -> updatedModel = @storage.update(@dream, local: true) expect(updatedModel.dirty).toBeUndefined() expect(updatedModel.update...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:raw_corpus
raw_corpus
it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findA...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@sto...
it('should change @destroyIds', function() { this.dream.set('sid', '1'); this.storage.destroy(this.dream); return expect(this.storage.destroyIds.values).toEqual(['1']); }); describe('find', function() { return it('should return specified item', function() { var dream; dream = this.dreams.create(); ...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should change @destroyIds', function() { this.dream.set('sid', '1'); this.storage.destroy(this.dream); return expect(this.storage.destroyIds.values).toEqual(['1']); }); describe('find', function() { return it('should return specified item', function() ...
it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findA...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:completion
completion
it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findA...
it 'should call "incremental" sync', -> @storage.findAll() expect(@storage.sync.incremental).toHaveBeenCalled() it 'should call "full" sync when storage is empty', -> localStorage.clear() @storage.findAll() expect(@storage.sync.full).toHaveBeenCalled() describe 'save', -> befor...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:raw_corpus
raw_corpus
it 'should call "replaceKeyFields"', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba') @storage.remove(@dream) it 'should r...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
124
162
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should call "replaceKeyFields"', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id...
it('should call "replaceKeyFields"', function() { spyOn(this.storage, 'replaceKeyFields'); this.storage.save(this.dream); return expect(this.storage.replaceKeyFields).toHaveBeenCalledWith(this.dream, 'local'); }); describe('remove', function() { beforeEach(function() { this.dream = this.dreams.create({ ...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
124
162
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should call "replaceKeyFields"', function() { spyOn(this.storage, 'replaceKeyFields'); this.storage.save(this.dream); return expect(this.storage.replaceKeyFields).toHaveBeenCalledWith(this.dream, 'local'); }); describe('remove', function() { beforeEach...
it 'should call "replaceKeyFields"', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba') @storage.remove(@dream) it 'should r...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
124
162
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:completion
completion
it 'should call "replaceKeyFields"', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba') @storage.remove(@dream) it 'should r...
localStorage.setItem('dreams', '1,2,3') expect(@storage.isEmpty()).toBeFalsy() describe 'clear', -> beforeEach -> localStorage.setItem('dreams', '1234') localStorage.setItem('dreams-1234', 'id:0002') localStorage.setItem('other', '') it "should clear localStorage's items including co...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
124
162
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:raw_corpus
raw_corpus
it 'should reset @allIds and @destroyIds', -> spyOn(@storage.allIds, 'reset') spyOn(@storage.destroyIds, 'reset') @storage.clear() expect(@storage.allIds.reset).toHaveBeenCalled() expect(@storage.destroyIds.reset).toHaveBeenCalled() describe 'replaceKeyFields', -> beforeEach -> ...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
164
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should reset @allIds and @destroyIds', -> spyOn(@storage.allIds, 'reset') spyOn(@storage.destroyIds, 'reset') @storage.clear() expect(@storage.allIds.reset).toHaveBeenCalled() expect(@storage.destroyIds.reset).toHaveBeenCalled()...
it('should reset @allIds and @destroyIds', function() { spyOn(this.storage.allIds, 'reset'); spyOn(this.storage.destroyIds, 'reset'); this.storage.clear(); expect(this.storage.allIds.reset).toHaveBeenCalled(); return expect(this.storage.destroyIds.reset).toHaveBeenCalled(); }); describe('replaceKeyFields', f...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
164
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should reset @allIds and @destroyIds', function() { spyOn(this.storage.allIds, 'reset'); spyOn(this.storage.destroyIds, 'reset'); this.storage.clear(); expect(this.storage.allIds.reset).toHaveBeenCalled(); return expect(this.storage.destroyIds.reset)....
it 'should reset @allIds and @destroyIds', -> spyOn(@storage.allIds, 'reset') spyOn(@storage.destroyIds, 'reset') @storage.clear() expect(@storage.allIds.reset).toHaveBeenCalled() expect(@storage.destroyIds.reset).toHaveBeenCalled() describe 'replaceKeyFields', -> beforeEach -> ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
164
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:completion
completion
it 'should reset @allIds and @destroyIds', -> spyOn(@storage.allIds, 'reset') spyOn(@storage.destroyIds, 'reset') @storage.clear() expect(@storage.allIds.reset).toHaveBeenCalled() expect(@storage.destroyIds.reset).toHaveBeenCalled() describe 'replaceKeyFields', -> beforeEach -> ...
@storage2 = new Offline.Storage('child-dreams', @childDreams, autoSync: false, keys: {parent_id: @dreams}) @childDreams.storage = @storage2 @dream = @dreams.create name: 'Visit Norway', sid: '1' describe 'when method is "local"', -> it 'should replace server ids to local', -> item = @stor...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
7aeb9ce727a10de4a556753a8be33e13665ba598
717
https://github.com/alekseykulikov/backbone-offline/blob/7aeb9ce727a10de4a556753a8be33e13665ba598/spec/storage_spec.coffee
164
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:raw_corpus
raw_corpus
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
b86f2045b8242d9dbc86872bd53627a9dae61ba3
717
https://github.com/alekseykulikov/backbone-offline/blob/b86f2045b8242d9dbc86872bd53627a9dae61ba3/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('it...
describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describe('constructor', function() { beforeEach(function()...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
b86f2045b8242d9dbc86872bd53627a9dae61ba3
717
https://github.com/alekseykulikov/backbone-offline/blob/b86f2045b8242d9dbc86872bd53627a9dae61ba3/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describ...
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
b86f2045b8242d9dbc86872bd53627a9dae61ba3
717
https://github.com/alekseykulikov/backbone-offline/blob/b86f2045b8242d9dbc86872bd53627a9dae61ba3/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:completion
completion
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
beforeEach -> @dream = new Dream(name: 'Diving with scuba') it "should return model's attributes", -> expect(@storage.create(@dream).get 'name').toEqual('Diving with scuba') it 'should generate local id', -> spyOn(@storage, 'guid').andReturn('1') @storage.create(@dream) expect(@s...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
b86f2045b8242d9dbc86872bd53627a9dae61ba3
717
https://github.com/alekseykulikov/backbone-offline/blob/b86f2045b8242d9dbc86872bd53627a9dae61ba3/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:raw_corpus
raw_corpus
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('it...
describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describe('constructor', function() { beforeEach(function()...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describ...
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:completion
completion
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
beforeEach -> @dream = new Dream(name: 'Diving with scuba') it "should return model's attributes", -> expect(@storage.create(@dream).name).toEqual('Diving with scuba') it 'should generate local id', -> spyOn(@storage, 'guid').andReturn('1') @storage.create(@dream) expect(@storage...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
1
40
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:raw_corpus
raw_corpus
it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id to "sid" attribute', -> expect(@storage.create(id:...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id...
it('does not set updated_at and dirty when options = {local: true}', function() { var createdModel; createdModel = this.storage.create(this.dream, { local: true }); expect(createdModel.dirty).toBeUndefined(); return expect(createdModel.updated_at).toBeUndefined(); }); it('should save server id to "sid" a...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('does not set updated_at and dirty when options = {local: true}', function() { var createdModel; createdModel = this.storage.create(this.dream, { local: true }); expect(createdModel.dirty).toBeUndefined(); return expect(createdModel.updated_at).toB...
it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id to "sid" attribute', -> expect(@storage.create(id:...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:completion
completion
it 'does not set updated_at and dirty when options = {local: true}', -> createdModel = @storage.create(@dream, local: true) expect(createdModel.dirty).toBeUndefined() expect(createdModel.updated_at).toBeUndefined() it 'should save server id to "sid" attribute', -> expect(@storage.create(id:...
expect(updatedModel.get 'dirty').toBeTruthy() expect(updatedModel.get 'updated_at').toBeDefined() it 'does not set updated_at and dirty when options = {local: true}', -> updatedModel = @storage.update(@dream, local: true) expect(updatedModel.dirty).toBeUndefined() expect(updatedModel.update...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
42
82
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:raw_corpus
raw_corpus
it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findA...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@sto...
it('should change @destroyIds', function() { this.dream.set('sid', '1'); this.storage.destroy(this.dream); return expect(this.storage.destroyIds.values).toEqual(['1']); }); describe('find', function() { return it('should return specified item', function() { var dream; dream = this.dreams.create(); ...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should change @destroyIds', function() { this.dream.set('sid', '1'); this.storage.destroy(this.dream); return expect(this.storage.destroyIds.values).toEqual(['1']); }); describe('find', function() { return it('should return specified item', function() ...
it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findA...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:completion
completion
it 'should change @destroyIds', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyIds.values).toEqual(['1']) describe 'find', -> it 'should return specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findA...
it 'should call "incremental" sync', -> @storage.findAll() expect(@storage.sync.incremental).toHaveBeenCalled() it 'should call "full" sync when storage is empty', -> localStorage.clear() @storage.findAll() expect(@storage.sync.full).toHaveBeenCalled() describe 'save', -> befor...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
5218380e875537d4bcd04f19954acda4e553de41
717
https://github.com/alekseykulikov/backbone-offline/blob/5218380e875537d4bcd04f19954acda4e553de41/spec/storage_spec.coffee
84
122
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:raw_corpus
raw_corpus
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
1
41
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('it...
describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describe('constructor', function() { beforeEach(function()...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
1
41
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('Offline.Storage', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.storage = this.dreams.storage; }); afterEach(function() { return localStorage.clear(); }); describ...
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
1
41
alekseykulikov/backbone-offline:spec/storage_spec.coffee:1:completion
completion
describe 'Offline.Storage', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @storage = @dreams.storage afterEach -> localStorage.clear() describe 'constructor', -> beforeEach -> localStorage.setItem('items', '2,3') localStorage.setItem('items-destroy', ...
registerFakeAjax url: '/api/dreams', successData: {} storage = new Offline.Storage('dreams', @dreams) expect(storage.keys).toEqual({}) describe 'create', -> beforeEach -> @dream = new Dream(name: 'Diving with scuba') it 'returns model attributes', -> expect(@storage.create(@dream).n...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
1
41
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:raw_corpus
raw_corpus
it 'sets updated_at and dirty', -> createdModel = @storage.create(@dream) expect(createdModel.dirty).toBeTruthy() expect(createdModel.updated_at).toBeDefined() it 'does not set updated_at and dirty if local true', -> createdModel = @storage.create(@dream, local: true) expect(createdMo...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
43
84
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'sets updated_at and dirty', -> createdModel = @storage.create(@dream) expect(createdModel.dirty).toBeTruthy() expect(createdModel.updated_at).toBeDefined() it 'does not set updated_at and dirty if local true', -> createdModel = @s...
it('sets updated_at and dirty', function() { var createdModel; createdModel = this.storage.create(this.dream); expect(createdModel.dirty).toBeTruthy(); return expect(createdModel.updated_at).toBeDefined(); }); it('does not set updated_at and dirty if local true', function() { var createdModel; createdModel...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
43
84
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('sets updated_at and dirty', function() { var createdModel; createdModel = this.storage.create(this.dream); expect(createdModel.dirty).toBeTruthy(); return expect(createdModel.updated_at).toBeDefined(); }); it('does not set updated_at and dirty if local...
it 'sets updated_at and dirty', -> createdModel = @storage.create(@dream) expect(createdModel.dirty).toBeTruthy() expect(createdModel.updated_at).toBeDefined() it 'does not set updated_at and dirty if local true', -> createdModel = @storage.create(@dream, local: true) expect(createdMo...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
43
84
alekseykulikov/backbone-offline:spec/storage_spec.coffee:2:completion
completion
it 'sets updated_at and dirty', -> createdModel = @storage.create(@dream) expect(createdModel.dirty).toBeTruthy() expect(createdModel.updated_at).toBeDefined() it 'does not set updated_at and dirty if local true', -> createdModel = @storage.create(@dream, local: true) expect(createdMo...
expect(updatedModel.get 'dirty').toBeTruthy() expect(updatedModel.get 'updated_at').toBeDefined() it 'does not set updated_at and dirty if local true', -> updatedModel = @storage.update(@dream, local: true) expect(updatedModel.dirty).toBeUndefined() expect(updatedModel.updated_at).toBeUndef...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
43
84
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:raw_corpus
raw_corpus
it 'changes @destroyRecords', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyRecords.values).toEqual(['1']) describe 'find', -> it 'returns specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findAll',...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
86
124
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'changes @destroyRecords', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyRecords.values).toEqual(['1']) describe 'find', -> it 'returns specified item', -> dream = @dreams.create() expect(@storage...
it('changes @destroyRecords', function() { this.dream.set('sid', '1'); this.storage.destroy(this.dream); return expect(this.storage.destroyRecords.values).toEqual(['1']); }); describe('find', function() { return it('returns specified item', function() { var dream; dream = this.dreams.create(); retu...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
86
124
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('changes @destroyRecords', function() { this.dream.set('sid', '1'); this.storage.destroy(this.dream); return expect(this.storage.destroyRecords.values).toEqual(['1']); }); describe('find', function() { return it('returns specified item', function() { ...
it 'changes @destroyRecords', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyRecords.values).toEqual(['1']) describe 'find', -> it 'returns specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findAll',...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
86
124
alekseykulikov/backbone-offline:spec/storage_spec.coffee:3:completion
completion
it 'changes @destroyRecords', -> @dream.set 'sid', '1' @storage.destroy(@dream) expect(@storage.destroyRecords.values).toEqual(['1']) describe 'find', -> it 'returns specified item', -> dream = @dreams.create() expect(@storage.find(dream).id).toEqual(dream.id) describe 'findAll',...
it 'calls incremental sync', -> @storage.findAll() expect(@storage.sync.incremental).toHaveBeenCalled() it 'calls full sync when storage is empty', -> localStorage.clear() @storage.findAll() expect(@storage.sync.full).toHaveBeenCalled() describe 'save', -> beforeEach -> @...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
86
124
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:raw_corpus
raw_corpus
it 'calls replaceKeyFields', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba') @storage.remove(@dream) it 'removes item fro...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
126
164
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'calls replaceKeyFields', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba'...
it('calls replaceKeyFields', function() { spyOn(this.storage, 'replaceKeyFields'); this.storage.save(this.dream); return expect(this.storage.replaceKeyFields).toHaveBeenCalledWith(this.dream, 'local'); }); describe('remove', function() { beforeEach(function() { this.dream = this.dreams.create({ id: '...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
126
164
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('calls replaceKeyFields', function() { spyOn(this.storage, 'replaceKeyFields'); this.storage.save(this.dream); return expect(this.storage.replaceKeyFields).toHaveBeenCalledWith(this.dream, 'local'); }); describe('remove', function() { beforeEach(functio...
it 'calls replaceKeyFields', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba') @storage.remove(@dream) it 'removes item fro...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
126
164
alekseykulikov/backbone-offline:spec/storage_spec.coffee:4:completion
completion
it 'calls replaceKeyFields', -> spyOn(@storage, 'replaceKeyFields') @storage.save(@dream) expect(@storage.replaceKeyFields).toHaveBeenCalledWith(@dream, 'local') describe 'remove', -> beforeEach -> @dream = @dreams.create(id: 'dcba') @storage.remove(@dream) it 'removes item fro...
localStorage.setItem('dreams', '1,2,3') expect(@storage.isEmpty()).toBeFalsy() describe 'clear', -> beforeEach -> localStorage.setItem('dreams', '1234') localStorage.setItem('dreams-1234', 'id:0002') localStorage.setItem('other', '') it 'clears all localStorage items which include co...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
126
164
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:raw_corpus
raw_corpus
it 'resets @allRecords and @destroyRecords', -> spyOn(@storage.allRecords, 'reset') spyOn(@storage.destroyRecords, 'reset') @storage.clear() expect(@storage.allRecords.reset).toHaveBeenCalled() expect(@storage.destroyRecords.reset).toHaveBeenCalled() describe 'replaceKeyFields', -> ...
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
166
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'resets @allRecords and @destroyRecords', -> spyOn(@storage.allRecords, 'reset') spyOn(@storage.destroyRecords, 'reset') @storage.clear() expect(@storage.allRecords.reset).toHaveBeenCalled() expect(@storage.destroyRecords.reset)....
it('resets @allRecords and @destroyRecords', function() { spyOn(this.storage.allRecords, 'reset'); spyOn(this.storage.destroyRecords, 'reset'); this.storage.clear(); expect(this.storage.allRecords.reset).toHaveBeenCalled(); return expect(this.storage.destroyRecords.reset).toHaveBeenCalled(); }); describe('re...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
166
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('resets @allRecords and @destroyRecords', function() { spyOn(this.storage.allRecords, 'reset'); spyOn(this.storage.destroyRecords, 'reset'); this.storage.clear(); expect(this.storage.allRecords.reset).toHaveBeenCalled(); return expect(this.storage.dest...
it 'resets @allRecords and @destroyRecords', -> spyOn(@storage.allRecords, 'reset') spyOn(@storage.destroyRecords, 'reset') @storage.clear() expect(@storage.allRecords.reset).toHaveBeenCalled() expect(@storage.destroyRecords.reset).toHaveBeenCalled() describe 'replaceKeyFields', -> ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
166
188
alekseykulikov/backbone-offline:spec/storage_spec.coffee:5:completion
completion
it 'resets @allRecords and @destroyRecords', -> spyOn(@storage.allRecords, 'reset') spyOn(@storage.destroyRecords, 'reset') @storage.clear() expect(@storage.allRecords.reset).toHaveBeenCalled() expect(@storage.destroyRecords.reset).toHaveBeenCalled() describe 'replaceKeyFields', -> ...
@childDreams = new Dreams() @storage2 = new Offline.Storage('child-dreams', @childDreams, autoSync: false, keys: {parent_id: @dreams}) @childDreams.storage = @storage2 @dream = @dreams.create name: 'Visit Norway', sid: '1' it 'replaces server ids to local when method is local', -> item = @s...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/storage_spec.coffee
MIT
cfee96aee44dac212ea20309388e5c2e34841fe0
717
https://github.com/alekseykulikov/backbone-offline/blob/cfee96aee44dac212ea20309388e5c2e34841fe0/spec/storage_spec.coffee
166
188
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:3:raw_corpus
raw_corpus
clear_show_progress_line = -> return if not process.stdout.isTTY updateLine("") ## require('../coffeescript-register-web') compile = require '../compiler-blob-builder/compile' ## config = require '../src/config' ##
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
24
37
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript clear_show_progress_line = -> return if not process.stdout.isTTY updateLine("") ## require('../coffeescript-register-web') compile = require '../compiler-blob-builder/compile' ## config = require '../src/config' ## ```
var clear_show_progress_line, compile, config; clear_show_progress_line = function() { if (!process.stdout.isTTY) { return; } return updateLine(""); }; //# require('../coffeescript-register-web'); compile = require('../compiler-blob-builder/compile'); //# config = require('../src/config'); //#
CoffeeScript
JavaScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
24
37
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var clear_show_progress_line, compile, config; clear_show_progress_line = function() { if (!process.stdout.isTTY) { return; } return updateLine(""); }; //# require('../coffeescript-register-web'); compile = require('../compiler-blob-builder/compile'); ...
clear_show_progress_line = -> return if not process.stdout.isTTY updateLine("") ## require('../coffeescript-register-web') compile = require '../compiler-blob-builder/compile' ## config = require '../src/config' ##
JavaScript
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
24
37
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:3:completion
completion
clear_show_progress_line = -> return if not process.stdout.isTTY updateLine("") ## require('../coffeescript-register-web')
compile = require '../compiler-blob-builder/compile' ## config = require '../src/config' ##
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
24
37
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:5:raw_corpus
raw_corpus
print_failure = (error) -> # try to pretty up the stack a bit trace = error.stack.split('\n').map((line) -> line.trim()) assertCallIndex = _l.findLastIndex trace, (line) -> line.startsWith('at assert') if assertCallIndex == -1 # if it's not an assert failure, it's an exception; just use the fir...
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
64
113
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:5:completion
completion
print_failure = (error) -> # try to pretty up the stack a bit trace = error.stack.split('\n').map((line) -> line.trim()) assertCallIndex = _l.findLastIndex trace, (line) -> line.startsWith('at assert') if assertCallIndex == -1 # if it's not an assert failure, it's an exception; just use the fir...
promisify(fs.readFile)(path.join('test-data/docset', file), 'utf-8').then (filecontents) -> bump_progress_counter() try docjson = JSON.parse(filecontents) catch e console.log "couldn't parse", file console.log filecontents ...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
64
113
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:6:raw_corpus
raw_corpus
clear_show_progress_line() console.log "[compiling #{file}]" console.log "failed non-deterministically" print_failure(failure) for failure in B.failures at_least_one_doc_has_failed = true return # check A == B to smoke test det...
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
114
142
Pagedraw/pagedraw:e2e-tests/compile-test.coffee:6:completion
completion
clear_show_progress_line() console.log "[compiling #{file}]" console.log "failed non-deterministically" print_failure(failure) for failure in B.failures at_least_one_doc_has_failed = true return # check A == B to smoke test det...
# for {filePath, contents} in _l.sortBy(results, 'filePath') # console.log "## #{filePath}" # console.log contents at_least_one_doc_has_failed = true return )).then -> if at_least_one_doc_has_failed == false pro...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
e2e-tests/compile-test.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-test.coffee
114
142
JoelBesada/activate-power-mode:lib/switcher.coffee:1:raw_corpus
raw_corpus
module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data? @plugins[code] = data else @plugins[code] = true isOff: (code) -> not ...
CoffeeScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data? @plugins[code] = data else...
module.exports = { reset: function() { return this.onAll(); }, offAll: function() { this.default = false; return this.plugins = []; }, onAll: function() { this.default = true; return this.plugins = []; }, off: function(code) { return this.plugins[code] = false; }, on: function(...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { reset: function() { return this.onAll(); }, offAll: function() { this.default = false; return this.plugins = []; }, onAll: function() { this.default = true; return this.plugins = []; }, off: function(code) { ...
module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data? @plugins[code] = data else @plugins[code] = true isOff: (code) -> not ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:completion
completion
module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data?
@plugins[code] = data else @plugins[code] = true isOff: (code) -> not @isOn code isOn: (code) -> if not @plugins[code]? @default else true getData: (code) -> if @plugins[code]? and typeof @plugins[code] is 'object' @plugins[code] else []
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:raw_corpus
raw_corpus
module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data? @plugins[code] = data else @plugins[code] = true isOff: (code) -> not ...
CoffeeScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
34d269ed3925206492b397f2ab97aff6557d434b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data? @plugins[code] = data else...
module.exports = { reset: function() { return this.onAll(); }, offAll: function() { this.default = false; return this.plugins = []; }, onAll: function() { this.default = true; return this.plugins = []; }, off: function(code) { return this.plugins[code] = false; }, on: function(...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
34d269ed3925206492b397f2ab97aff6557d434b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { reset: function() { return this.onAll(); }, offAll: function() { this.default = false; return this.plugins = []; }, onAll: function() { this.default = true; return this.plugins = []; }, off: function(code) { ...
module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data? @plugins[code] = data else @plugins[code] = true isOff: (code) -> not ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
34d269ed3925206492b397f2ab97aff6557d434b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/switcher.coffee
1
35
JoelBesada/activate-power-mode:lib/switcher.coffee:1:completion
completion
module.exports = reset: -> @onAll() offAll: -> @default = false @plugins = [] onAll: -> @default = true @plugins = [] off: (code) -> @plugins[code] = false on: (code, data) -> if data?
@plugins[code] = data else @plugins[code] = true isOff: (code) -> not @isOn code isOn: (code) -> if not @plugins[code]? @default else true getData: (code) -> if @plugins[code]? and @plugins[code] is true [] else @plugins[code]
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/switcher.coffee
MIT
34d269ed3925206492b397f2ab97aff6557d434b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/switcher.coffee
1
35
nicolaskruchten/pivottable:locales/pivot.pt.coffee:1:raw_corpus
raw_corpus
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery") else if typeof define is "function" and define.amd # AMD define ["jquery"], pivotModule # Plain browser env else pivotModule jQuery callWithJQue...
CoffeeScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
838ec2fc38747749c28d2fd1cb6c4ace9e9cc520
4,440
https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.pt.coffee
1
50
nicolaskruchten/pivottable:locales/pivot.pt.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery") else if typeof define is "function" and define.amd # AMD define ["jquery"], pivotModule # Plain brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
838ec2fc38747749c28d2fd1cb6c4ace9e9cc520
4,440
https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.pt.coffee
1
50
nicolaskruchten/pivottable:locales/pivot.pt.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery") else if typeof define is "function" and define.amd # AMD define ["jquery"], pivotModule # Plain browser env else pivotModule jQuery callWithJQue...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
838ec2fc38747749c28d2fd1cb6c4ace9e9cc520
4,440
https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.pt.coffee
1
50
nicolaskruchten/pivottable:locales/pivot.pt.coffee:1:completion
completion
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery") else if typeof define is "function" and define.amd # AMD define ["jquery"], pivotModule # Plain browser env else pivotModule jQuery callWithJQue...
computeError: "Ocorreu um error ao computar os resultados da Tabela Dinâmica." uiRenderError: "Ocorreu um error ao renderizar a interface da Tabela Dinâmica." selectAll: "Selecionar Tudo" selectNone: "Selecionar Nenhum" tooMany: "(demais para listar)" filterRe...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
838ec2fc38747749c28d2fd1cb6c4ace9e9cc520
4,440
https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.pt.coffee
1
50
nicolaskruchten/pivottable:locales/pivot.pt.coffee:2:raw_corpus
raw_corpus
"Último": tpl.last(frFmt), "Soma sobre Soma": tpl.sumOverSum(frFmt) "Limite Superior a 80%": tpl.sumOverSumBound80(true, frFmt) "Limite Inferior a 80%": tpl.sumOverSumBoun...
CoffeeScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
838ec2fc38747749c28d2fd1cb6c4ace9e9cc520
4,440
https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.pt.coffee
51
87
nicolaskruchten/pivottable:locales/pivot.pt.coffee:2:completion
completion
"Último": tpl.last(frFmt), "Soma sobre Soma": tpl.sumOverSum(frFmt) "Limite Superior a 80%": tpl.sumOverSumBound80(true, frFmt) "Limite Inferior a 80%": tpl.sumOverSumBoun...
if gcr $.pivotUtilities.locales.pt.gchart_renderers = "Gráfico de Linhas": gcr["Line Chart"] "Gráfico de Barras": gcr["Bar Chart"] "Gráfico de Barras Empilhadas": gcr["Stacked Bar Chart"] "Gráfico de Área": gcr["Area Chart"] if d3r...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
838ec2fc38747749c28d2fd1cb6c4ace9e9cc520
4,440
https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.pt.coffee
51
87
nicolaskruchten/pivottable:locales/pivot.pt.coffee:1:raw_corpus
raw_corpus
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery") else if typeof define is "function" and define.amd # AMD define ["jquery"], pivotModule # Plain browser env else pivotModule jQuery callWithJQue...
CoffeeScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
bfb48650444f077979b75dbda48cf34c18ddb21c
4,440
https://github.com/nicolaskruchten/pivottable/blob/bfb48650444f077979b75dbda48cf34c18ddb21c/locales/pivot.pt.coffee
1
50
nicolaskruchten/pivottable:locales/pivot.pt.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery") else if typeof define is "function" and define.amd # AMD define ["jquery"], pivotModule # Plain brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
locales/pivot.pt.coffee
MIT
bfb48650444f077979b75dbda48cf34c18ddb21c
4,440
https://github.com/nicolaskruchten/pivottable/blob/bfb48650444f077979b75dbda48cf34c18ddb21c/locales/pivot.pt.coffee
1
50