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/view.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("views", function() { var $, $inputor, app; $inputor = null; app = null; $ = jQuery; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return a...
describe "views", -> $inputor = null app = null $ = jQuery beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null callback...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/view.spec.coffee
1
37
ichord/At.js:spec/javascripts/view.spec.coffee:1:completion
completion
describe "views", -> $inputor = null app = null $ = jQuery beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null callback...
controller = app.controller() callbacks = $.fn.atwho.default.callbacks simulateTypingIn $inputor it "selected no highlight(.cur); github issues#234", -> simulateTypingIn $inputor expect targetLi = controller.view.$el.find('ul li:last') .not.toHaveClass 'cur' spyOn controller.v...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/view.spec.coffee
1
37
ichord/At.js:spec/javascripts/view.spec.coffee:1:raw_corpus
raw_corpus
describe "views", -> $inputor = null app = null $ = jQuery beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null callback...
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
3c7f59385b9364e436dd11a8fef205fb6832f708
5,250
https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "views", -> $inputor = null app = null $ = jQuery beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' ...
describe("views", function() { var $, $inputor, app; $inputor = null; app = null; $ = jQuery; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return app = getAppOf($inputor); }); afterEach(function() {...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
3c7f59385b9364e436dd11a8fef205fb6832f708
5,250
https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("views", function() { var $, $inputor, app; $inputor = null; app = null; $ = jQuery; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return a...
describe "views", -> $inputor = null app = null $ = jQuery beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null callback...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
3c7f59385b9364e436dd11a8fef205fb6832f708
5,250
https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:completion
completion
describe "views", -> $inputor = null app = null $ = jQuery beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null
callbacks = null beforeEach -> controller = app.controller() callbacks = $.fn.atwho.default.callbacks simulateTypingIn $inputor it "selected no highlight(.cur); github issues#234", -> simulateTypingIn $inputor expect targetLi = controller.view.$el.find('ul li:last') .not....
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
3c7f59385b9364e436dd11a8fef205fb6832f708
5,250
https://github.com/ichord/At.js/blob/3c7f59385b9364e436dd11a8fef205fb6832f708/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:raw_corpus
raw_corpus
describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null callbacks = null ...
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532
5,250
https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "i...
describe("views", function() { var $inputor, app; $inputor = null; app = null; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return app = getAppOf($inputor); }); afterEach(function() { return $inpu...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532
5,250
https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("views", function() { var $inputor, app; $inputor = null; app = null; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return app = getAppOf($in...
describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null callbacks = null ...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532
5,250
https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:completion
completion
describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor afterEach -> $inputor.atwho 'destroy' describe "issues", -> controller = null
callbacks = null beforeEach -> controller = app.controller() callbacks = $.fn.atwho.default.callbacks simulateTypingIn $inputor it "selected no highlight(.cur); github issues#234", -> simulateTypingIn $inputor expect targetLi = controller.view.$el.find('ul li:last') .not....
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532
5,250
https://github.com/ichord/At.js/blob/4673922e4e43ccb85a3f85dbe0d8f4aae8c0a532/spec/javascripts/view.spec.coffee
1
31
ichord/At.js:spec/javascripts/view.spec.coffee:1:raw_corpus
raw_corpus
describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor describe "issues", -> controller = null callbacks = null beforeEach -> controller = app.contr...
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
5377d0ede80e160ba476083de276dd389fd00298
5,250
https://github.com/ichord/At.js/blob/5377d0ede80e160ba476083de276dd389fd00298/spec/javascripts/view.spec.coffee
1
29
ichord/At.js:spec/javascripts/view.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor describe "issues", -> controller = null callbac...
describe("views", function() { var $inputor, app; $inputor = null; app = null; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return app = getAppOf($inputor); }); return describe("issues", function() { ...
CoffeeScript
JavaScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
5377d0ede80e160ba476083de276dd389fd00298
5,250
https://github.com/ichord/At.js/blob/5377d0ede80e160ba476083de276dd389fd00298/spec/javascripts/view.spec.coffee
1
29
ichord/At.js:spec/javascripts/view.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("views", function() { var $inputor, app; $inputor = null; app = null; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return app = getAppOf($in...
describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor describe "issues", -> controller = null callbacks = null beforeEach -> controller = app.contr...
JavaScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
5377d0ede80e160ba476083de276dd389fd00298
5,250
https://github.com/ichord/At.js/blob/5377d0ede80e160ba476083de276dd389fd00298/spec/javascripts/view.spec.coffee
1
29
ichord/At.js:spec/javascripts/view.spec.coffee:1:completion
completion
describe "views", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $ "#inputor" .atwho at: "@", data: fixtures["names"] app = getAppOf $inputor describe "issues", -> controller = null callbacks = null
beforeEach -> controller = app.controller() callbacks = $.fn.atwho.default.callbacks simulateTypingIn $inputor it "selected no highlight(.cur); github issues#234", -> simulateTypingIn $inputor expect targetLi = controller.view.$el.find('ul li:last') .not.toHaveClass 'cur' ...
CoffeeScript
CoffeeScript
ichord/At.js
spec/javascripts/view.spec.coffee
MIT
5377d0ede80e160ba476083de276dd389fd00298
5,250
https://github.com/ichord/At.js/blob/5377d0ede80e160ba476083de276dd389fd00298/spec/javascripts/view.spec.coffee
1
29
jianliaoim/talk-os:talk-web/client/network/api.coffee:2:raw_corpus
raw_corpus
reqwestErrorHandler = (err) -> return if config.isGuest resp = try JSON.parse(err.response) catch {} if err.status is 400 notifyActions.warn resp.message else if err.status is 403 # code 201: NOT LOGIN # code 220: TOKEN EXPIRED if resp.code is 201 or resp.code is 220 ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
18
39
jianliaoim/talk-os:talk-web/client/network/api.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript reqwestErrorHandler = (err) -> return if config.isGuest resp = try JSON.parse(err.response) catch {} if err.status is 400 notifyActions.warn resp.message else if err.status is 403 # code 201: NOT LOGIN # code 220: TOKEN E...
var reqwestErrorHandler; reqwestErrorHandler = function(err) { var delay, firstTimeLogin, resp; if (config.isGuest) { return; } resp = (function() { try { return JSON.parse(err.response); } catch (error) { return {}; } })(); if (err.status === 400) { return notifyActions.war...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
18
39
jianliaoim/talk-os:talk-web/client/network/api.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var reqwestErrorHandler; reqwestErrorHandler = function(err) { var delay, firstTimeLogin, resp; if (config.isGuest) { return; } resp = (function() { try { return JSON.parse(err.response); } catch (error) { return {}; } })(); ...
reqwestErrorHandler = (err) -> return if config.isGuest resp = try JSON.parse(err.response) catch {} if err.status is 400 notifyActions.warn resp.message else if err.status is 403 # code 201: NOT LOGIN # code 220: TOKEN EXPIRED if resp.code is 201 or resp.code is 220 ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
18
39
jianliaoim/talk-os:talk-web/client/network/api.coffee:2:completion
completion
reqwestErrorHandler = (err) -> return if config.isGuest resp = try JSON.parse(err.response) catch {} if err.status is 400 notifyActions.warn resp.message
else if err.status is 403 # code 201: NOT LOGIN # code 220: TOKEN EXPIRED if resp.code is 201 or resp.code is 220 # 首次登录没有socket id, 不需要提示然后等3秒 firstTimeLogin = not getSocketId()? if not firstTimeLogin notifyActions.error lang.getText('force-logout') delay = if firstTimeLogin...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
18
39
jianliaoim/talk-os:talk-web/client/network/api.coffee:3:raw_corpus
raw_corpus
prepareAjaxMethod = (url, method) -> (options) -> # convert to immutable object options = Immutable.fromJS(options) or Immutable.Map() # throw error if GET request is receiving data if (method is 'get') and options.has('data') throw new Error("#{url} is a GET request, it should not get any data...
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
42
91
jianliaoim/talk-os:talk-web/client/network/api.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript prepareAjaxMethod = (url, method) -> (options) -> # convert to immutable object options = Immutable.fromJS(options) or Immutable.Map() # throw error if GET request is receiving data if (method is 'get') and options.has('data') throw new E...
var prepareAjaxMethod; prepareAjaxMethod = function(url, method) { return function(options) { var allValid, newUrl, notEmpty, pathParams, urlPart; // convert to immutable object options = Immutable.fromJS(options) || Immutable.Map(); // throw error if GET request is receiving data if ((method ===...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
42
91
jianliaoim/talk-os:talk-web/client/network/api.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var prepareAjaxMethod; prepareAjaxMethod = function(url, method) { return function(options) { var allValid, newUrl, notEmpty, pathParams, urlPart; // convert to immutable object options = Immutable.fromJS(options) || Immutable.Map(); // throw err...
prepareAjaxMethod = (url, method) -> (options) -> # convert to immutable object options = Immutable.fromJS(options) or Immutable.Map() # throw error if GET request is receiving data if (method is 'get') and options.has('data') throw new Error("#{url} is a GET request, it should not get any data...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
42
91
jianliaoim/talk-os:talk-web/client/network/api.coffee:3:completion
completion
prepareAjaxMethod = (url, method) -> (options) -> # convert to immutable object options = Immutable.fromJS(options) or Immutable.Map() # throw error if GET request is receiving data if (method is 'get') and options.has('data') throw new Error("#{url} is a GET request, it should not get any data...
# construct new url with queryParams if options.has('queryParams') notEmpty = not options.get('queryParams').isEmpty() allValid = options.get('queryParams').every (queryParam) -> queryParam? if notEmpty and allValid urlPart = options.get('queryParams') .map (value, key) -> ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
42
91
jianliaoim/talk-os:talk-web/client/network/api.coffee:5:raw_corpus
raw_corpus
constructUrl = (stringOrObject, method) -> if Immutable.Map.isMap(stringOrObject) stringOrObject.map (value) -> constructUrl value, method else url = Immutable.Map().set(method, prepareAjaxMethod(stringOrObject, method)) api = Immutable.fromJS urls .map constructUrl .reduce (prev, next) -> pr...
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
99
110
jianliaoim/talk-os:talk-web/client/network/api.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript constructUrl = (stringOrObject, method) -> if Immutable.Map.isMap(stringOrObject) stringOrObject.map (value) -> constructUrl value, method else url = Immutable.Map().set(method, prepareAjaxMethod(stringOrObject, method)) api = Immutable.fromJS ...
var api, constructUrl; constructUrl = function(stringOrObject, method) { var url; if (Immutable.Map.isMap(stringOrObject)) { return stringOrObject.map(function(value) { return constructUrl(value, method); }); } else { return url = Immutable.Map().set(method, prepareAjaxMethod(stringOrObject, me...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
99
110
jianliaoim/talk-os:talk-web/client/network/api.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var api, constructUrl; constructUrl = function(stringOrObject, method) { var url; if (Immutable.Map.isMap(stringOrObject)) { return stringOrObject.map(function(value) { return constructUrl(value, method); }); } else { return url = Immutable...
constructUrl = (stringOrObject, method) -> if Immutable.Map.isMap(stringOrObject) stringOrObject.map (value) -> constructUrl value, method else url = Immutable.Map().set(method, prepareAjaxMethod(stringOrObject, method)) api = Immutable.fromJS urls .map constructUrl .reduce (prev, next) -> pr...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
99
110
jianliaoim/talk-os:talk-web/client/network/api.coffee:5:completion
completion
constructUrl = (stringOrObject, method) -> if Immutable.Map.isMap(stringOrObject) stringOrObject.map (value) -> constructUrl value, method else url = Immutable.Map().set(method, prepareAjaxMethod(stringOrObject, method))
api = Immutable.fromJS urls .map constructUrl .reduce (prev, next) -> prev.mergeDeep next .toJS()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
99
110
jianliaoim/talk-os:talk-web/client/network/api.coffee:6:raw_corpus
raw_corpus
api.get = (url) -> options = url: url method: 'GET' headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options)
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
112
119
jianliaoim/talk-os:talk-web/client/network/api.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript api.get = (url) -> options = url: url method: 'GET' headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options) ```
api.get = function(url) { var options; options = { url: url, method: 'GET', headers: { 'X-Language': lang.getLang(), 'X-Socket-Id': getSocketId() } }; return reqwest(options); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
112
119
jianliaoim/talk-os:talk-web/client/network/api.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript api.get = function(url) { var options; options = { url: url, method: 'GET', headers: { 'X-Language': lang.getLang(), 'X-Socket-Id': getSocketId() } }; return reqwest(options); }; ```
api.get = (url) -> options = url: url method: 'GET' headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options)
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
112
119
jianliaoim/talk-os:talk-web/client/network/api.coffee:6:completion
completion
api.get = (url) -> options = url: url method: 'GET'
headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options)
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
112
119
jianliaoim/talk-os:talk-web/client/network/api.coffee:7:raw_corpus
raw_corpus
api.post = (url, data) -> options = url: url method: 'POST' data: data headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options)
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
121
129
jianliaoim/talk-os:talk-web/client/network/api.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript api.post = (url, data) -> options = url: url method: 'POST' data: data headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options) ```
api.post = function(url, data) { var options; options = { url: url, method: 'POST', data: data, headers: { 'X-Language': lang.getLang(), 'X-Socket-Id': getSocketId() } }; return reqwest(options); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
121
129
jianliaoim/talk-os:talk-web/client/network/api.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript api.post = function(url, data) { var options; options = { url: url, method: 'POST', data: data, headers: { 'X-Language': lang.getLang(), 'X-Socket-Id': getSocketId() } }; return reqwest(options); }; ```
api.post = (url, data) -> options = url: url method: 'POST' data: data headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options)
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
121
129
jianliaoim/talk-os:talk-web/client/network/api.coffee:7:completion
completion
api.post = (url, data) -> options = url: url method: 'POST'
data: data headers: 'X-Language': lang.getLang() 'X-Socket-Id': getSocketId() reqwest(options)
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/network/api.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/network/api.coffee
121
129
CaryLandholt/AngularFun:src/scripts/run.coffee:1:raw_corpus
raw_corpus
class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$rootScope', Run]
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/run.coffee
1
6
CaryLandholt/AngularFun:src/scripts/run.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$roo...
var Run; Run = class Run { constructor($log, $rootScope) { $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broadcast(`${currentRoute.controller}$routeChangeSuccess`, currentRoute, priorRoute); }); } }; angular.module('app').run(['$log', '$rootSco...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/run.coffee
1
6
CaryLandholt/AngularFun:src/scripts/run.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Run; Run = class Run { constructor($log, $rootScope) { $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broadcast(`${currentRoute.controller}$routeChangeSuccess`, currentRoute, priorRoute); })...
class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$rootScope', Run]
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/run.coffee
1
6
CaryLandholt/AngularFun:src/scripts/run.coffee:1:completion
completion
class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) ->
$rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$rootScope', Run]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/run.coffee
1
6
CaryLandholt/AngularFun:src/scripts/run.coffee:1:raw_corpus
raw_corpus
do (angular) -> 'use strict' class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$rootScope', Run]
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/run.coffee
1
9
CaryLandholt/AngularFun:src/scripts/run.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do (angular) -> 'use strict' class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angu...
(function(angular) { 'use strict'; var Run; Run = class Run { constructor($log, $rootScope) { $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broadcast(`${currentRoute.controller}$routeChangeSuccess`, currentRoute, priorRoute); }); }...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/run.coffee
1
9
CaryLandholt/AngularFun:src/scripts/run.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function(angular) { 'use strict'; var Run; Run = class Run { constructor($log, $rootScope) { $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broadcast(`${currentRoute.controller}$routeCha...
do (angular) -> 'use strict' class Run constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$rootScope', Run]
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/run.coffee
1
9
CaryLandholt/AngularFun:src/scripts/run.coffee:1:completion
completion
do (angular) -> 'use strict' class Run
constructor: ($log, $rootScope) -> $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$log', '$rootScope', Run]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/run.coffee
1
9
CaryLandholt/AngularFun:src/scripts/run.coffee:1:raw_corpus
raw_corpus
do (angular) -> 'use strict' class Run constructor: ($rootScope, $log) -> # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.modul...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/run.coffee
1
10
CaryLandholt/AngularFun:src/scripts/run.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do (angular) -> 'use strict' class Run constructor: ($rootScope, $log) -> # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$rout...
(function(angular) { 'use strict'; var Run; Run = class Run { constructor($rootScope, $log) { // fire an event related to the current route $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broadcast(`${currentRoute.controller}$routeChange...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/run.coffee
1
10
CaryLandholt/AngularFun:src/scripts/run.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function(angular) { 'use strict'; var Run; Run = class Run { constructor($rootScope, $log) { // fire an event related to the current route $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootS...
do (angular) -> 'use strict' class Run constructor: ($rootScope, $log) -> # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.modul...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/run.coffee
1
10
CaryLandholt/AngularFun:src/scripts/run.coffee:1:completion
completion
do (angular) -> 'use strict' class Run constructor: ($rootScope, $log) ->
# fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute angular.module('app').run ['$rootScope', '$log', Run]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/run.coffee
1
10
CaryLandholt/AngularFun:src/scripts/run.coffee:1:raw_corpus
raw_corpus
angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute ]
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
833563f3296d9f2c41b23fdf84dc96d5d8754cfa
672
https://github.com/CaryLandholt/AngularFun/blob/833563f3296d9f2c41b23fdf84dc96d5d8754cfa/src/scripts/run.coffee
1
5
CaryLandholt/AngularFun:src/scripts/run.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess...
angular.module('app').run([ '$rootScope', '$log', function($rootScope, $log) { // fire an event related to the current route return $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broadcast(`${currentRoute.controller}$routeChangeSuccess`, ...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
833563f3296d9f2c41b23fdf84dc96d5d8754cfa
672
https://github.com/CaryLandholt/AngularFun/blob/833563f3296d9f2c41b23fdf84dc96d5d8754cfa/src/scripts/run.coffee
1
5
CaryLandholt/AngularFun:src/scripts/run.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').run([ '$rootScope', '$log', function($rootScope, $log) { // fire an event related to the current route return $rootScope.$on('$routeChangeSuccess', function(event, currentRoute, priorRoute) { return $rootScope.$broa...
angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute ]
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
833563f3296d9f2c41b23fdf84dc96d5d8754cfa
672
https://github.com/CaryLandholt/AngularFun/blob/833563f3296d9f2c41b23fdf84dc96d5d8754cfa/src/scripts/run.coffee
1
5
CaryLandholt/AngularFun:src/scripts/run.coffee:1:completion
completion
angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> # fire an event related to the current route
$rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
833563f3296d9f2c41b23fdf84dc96d5d8754cfa
672
https://github.com/CaryLandholt/AngularFun/blob/833563f3296d9f2c41b23fdf84dc96d5d8754cfa/src/scripts/run.coffee
1
5
CaryLandholt/AngularFun:src/scripts/run.coffee:1:raw_corpus
raw_corpus
angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> $rootScope.$on 'error:unauthorized', (event, response) -> #$log.error 'unauthorized' $rootScope.$on 'error:forbidden', (event, response) -> #$log.error 'forbidden' $rootScope.$on 'error:403', (event, response) -> #$log.error '403' $root...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
94361b56b578119b372a04858dcd3ab92bb480eb
672
https://github.com/CaryLandholt/AngularFun/blob/94361b56b578119b372a04858dcd3ab92bb480eb/src/scripts/run.coffee
1
17
CaryLandholt/AngularFun:src/scripts/run.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> $rootScope.$on 'error:unauthorized', (event, response) -> #$log.error 'unauthorized' $rootScope.$on 'error:forbidden', (event, response) -> #$log.error 'forbidden' $rootScope.$on 'err...
angular.module('app').run([ '$rootScope', '$log', function($rootScope, $log) { $rootScope.$on('error:unauthorized', function(event, response) {}); //$log.error 'unauthorized' $rootScope.$on('error:forbidden', function(event, response) {}); //$log.error 'forbidden' $rootScope.$on('err...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
94361b56b578119b372a04858dcd3ab92bb480eb
672
https://github.com/CaryLandholt/AngularFun/blob/94361b56b578119b372a04858dcd3ab92bb480eb/src/scripts/run.coffee
1
17
CaryLandholt/AngularFun:src/scripts/run.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').run([ '$rootScope', '$log', function($rootScope, $log) { $rootScope.$on('error:unauthorized', function(event, response) {}); //$log.error 'unauthorized' $rootScope.$on('error:forbidden', function(event, response) {}...
angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> $rootScope.$on 'error:unauthorized', (event, response) -> #$log.error 'unauthorized' $rootScope.$on 'error:forbidden', (event, response) -> #$log.error 'forbidden' $rootScope.$on 'error:403', (event, response) -> #$log.error '403' $root...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
94361b56b578119b372a04858dcd3ab92bb480eb
672
https://github.com/CaryLandholt/AngularFun/blob/94361b56b578119b372a04858dcd3ab92bb480eb/src/scripts/run.coffee
1
17
CaryLandholt/AngularFun:src/scripts/run.coffee:1:completion
completion
angular.module('app').run ['$rootScope', '$log', ($rootScope, $log) -> $rootScope.$on 'error:unauthorized', (event, response) -> #$log.error 'unauthorized' $rootScope.$on 'error:forbidden', (event, response) -> #$log.error 'forbidden' $rootScope.$on 'error:403', (event, response) ->
#$log.error '403' $rootScope.$on 'success:ok', (event, response) -> #$log.info 'success' # fire an event related to the current route $rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) -> $rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/run.coffee
MIT
94361b56b578119b372a04858dcd3ab92bb480eb
672
https://github.com/CaryLandholt/AngularFun/blob/94361b56b578119b372a04858dcd3ab92bb480eb/src/scripts/run.coffee
1
17
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:raw_corpus
raw_corpus
skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser options x2js.addListener 'end', (r) -> checks r test.finish() if not xmlString fs.readFile fileName, (err, data) -> x2js.parseString data el...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
10
22
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser options x2js.addListener 'end', (r) -> checks r test.finish() if not xmlString fs.readFile file...
var skeleton; skeleton = function(options, checks) { return function(test) { var x2js, xmlString; xmlString = options != null ? options.__xmlString : void 0; if (options != null) { delete options.__xmlString; } x2js = new xml2js.Parser(options); x2js.addListener('end', function(r) { ...
CoffeeScript
JavaScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
10
22
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var skeleton; skeleton = function(options, checks) { return function(test) { var x2js, xmlString; xmlString = options != null ? options.__xmlString : void 0; if (options != null) { delete options.__xmlString; } x2js = new xml2js.Parser(...
skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser options x2js.addListener 'end', (r) -> checks r test.finish() if not xmlString fs.readFile fileName, (err, data) -> x2js.parseString data el...
JavaScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
10
22
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:completion
completion
skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser options x2js.addListener 'end', (r) ->
checks r test.finish() if not xmlString fs.readFile fileName, (err, data) -> x2js.parseString data else x2js.parseString xmlString
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
10
22
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:raw_corpus
raw_corpus
validator = (obj, stack, nodeName) -> if nodeName == "numbertest" return Number(obj) else if nodeName == "oneitemarray" stack[stack.length-1][nodeName] = [] else if nodeName == "validationerror" throw new xml2js.ValidationError("Validation error!") return obj
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
24
31
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript validator = (obj, stack, nodeName) -> if nodeName == "numbertest" return Number(obj) else if nodeName == "oneitemarray" stack[stack.length-1][nodeName] = [] else if nodeName == "validationerror" throw new xml2js.ValidationError("Validation error...
var validator; validator = function(obj, stack, nodeName) { if (nodeName === "numbertest") { return Number(obj); } else if (nodeName === "oneitemarray") { stack[stack.length - 1][nodeName] = []; } else if (nodeName === "validationerror") { throw new xml2js.ValidationError("Validation error!"); } ...
CoffeeScript
JavaScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
24
31
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var validator; validator = function(obj, stack, nodeName) { if (nodeName === "numbertest") { return Number(obj); } else if (nodeName === "oneitemarray") { stack[stack.length - 1][nodeName] = []; } else if (nodeName === "validationerror") { throw ...
validator = (obj, stack, nodeName) -> if nodeName == "numbertest" return Number(obj) else if nodeName == "oneitemarray" stack[stack.length-1][nodeName] = [] else if nodeName == "validationerror" throw new xml2js.ValidationError("Validation error!") return obj
JavaScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
24
31
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:completion
completion
validator = (obj, stack, nodeName) -> if nodeName == "numbertest" return Number(obj) else if nodeName == "oneitemarray"
stack[stack.length-1][nodeName] = [] else if nodeName == "validationerror" throw new xml2js.ValidationError("Validation error!") return obj
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
24
31
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:raw_corpus
raw_corpus
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + util.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
33
82
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + util.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' ...
module.exports = { 'test parse with defaults': skeleton(void 0, function(r) { console.log('Result object: ' + util.inspect(r, false, 10)); assert.equal(r['chartest']['@']['desc'], 'Test for CHARs'); assert.equal(r['chartest']['#'], 'Character data here!'); assert.equal(r['cdatatest']['@']['desc'], 'Te...
CoffeeScript
JavaScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
33
82
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { 'test parse with defaults': skeleton(void 0, function(r) { console.log('Result object: ' + util.inspect(r, false, 10)); assert.equal(r['chartest']['@']['desc'], 'Test for CHARs'); assert.equal(r['chartest']['#'], 'Character data her...
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + util.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA...
JavaScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
33
82
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:completion
completion
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + util.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA...
assert.equal r['nochartest']['@']['misc'], 'false' assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0]['#'], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1]['#'], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
33
82
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:raw_corpus
raw_corpus
'test default text handling': skeleton(undefined, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable trimming': skeleton(trim: false, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable normalize': skeleton(normalize: false, (r) -> assert.equa...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
83
132
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:completion
completion
'test default text handling': skeleton(undefined, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable trimming': skeleton(trim: false, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable normalize': skeleton(normalize: false, (r) -> assert.equa...
'test empty string result specified null': skeleton(__xmlString: ' ', (r) -> assert.equal r, null) 'test parse with custom char and attribute object keys': skeleton(attrkey: 'attrobj', charkey: 'charobj', (r) -> assert.equal r['chartest']['attrobj']['desc'], 'Test for CHARs' assert.equal r['chartest']['c...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
83
132
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:5:raw_corpus
raw_corpus
assert.deepEqual r['nochartest'], {} assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][2], 'Foo(3)' assert....
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
133
174
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:5:completion
completion
assert.deepEqual r['nochartest'], {} assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][2], 'Foo(3)' assert....
fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) -> assert.equal err, null # make sure we parsed anything assert.equal r['chartest']['#'], 'Character data here!' x2js.parseString data, (err, r) -> assert.equal err, null ...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
a644bfdc8b9b7817144cdb8bf6a8a5eea7116254
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/a644bfdc8b9b7817144cdb8bf6a8a5eea7116254/test/xml2js.test.coffee
133
174
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:raw_corpus
raw_corpus
assert.deepEqual r['nochartest'], {} assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][2], 'Foo(3)' assert....
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
91b2a94c90e8531baf40fc5ddc985e6fdecb1fad
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/91b2a94c90e8531baf40fc5ddc985e6fdecb1fad/test/xml2js.test.coffee
124
154
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:completion
completion
assert.deepEqual r['nochartest'], {} assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][2], 'Foo(3)' assert....
# just a single test to check whether we parsed anything assert.equal r['chartest']['#'], 'Character data here!' test.finish() 'test double parse': (test) -> x2js = new xml2js.Parser() fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) -> ...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
91b2a94c90e8531baf40fc5ddc985e6fdecb1fad
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/91b2a94c90e8531baf40fc5ddc985e6fdecb1fad/test/xml2js.test.coffee
124
154
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:raw_corpus
raw_corpus
'test default text handling': skeleton(undefined, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable trimming': skeleton(trim: false, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable normalize': skeleton(normalize: false, (r) -> assert.equa...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
c8a2605fd5e23f2a2ea4982265692e65289e25a6
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/c8a2605fd5e23f2a2ea4982265692e65289e25a6/test/xml2js.test.coffee
74
123
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:completion
completion
'test default text handling': skeleton(undefined, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable trimming': skeleton(trim: false, (r) -> assert.equal r['whitespacetest']['#'], 'Line One Line Two') 'test disable normalize': skeleton(normalize: false, (r) -> assert.equa...
assert.equal r, null) 'test parse with custom char and attribute object keys': skeleton(attrkey: 'attrobj', charkey: 'charobj', (r) -> assert.equal r['chartest']['attrobj']['desc'], 'Test for CHARs' assert.equal r['chartest']['charobj'], 'Character data here!' assert.equal r['cdatatest']['attrobj']['desc...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
c8a2605fd5e23f2a2ea4982265692e65289e25a6
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/c8a2605fd5e23f2a2ea4982265692e65289e25a6/test/xml2js.test.coffee
74
123
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:raw_corpus
raw_corpus
assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][2], 'Foo(3)' assert.equal r['listtest']['item'][0]['subitem']...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
c8a2605fd5e23f2a2ea4982265692e65289e25a6
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/c8a2605fd5e23f2a2ea4982265692e65289e25a6/test/xml2js.test.coffee
124
153
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:completion
completion
assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][2], 'Foo(3)' assert.equal r['listtest']['item'][0]['subitem']...
assert.equal r['chartest']['#'], 'Character data here!' test.finish() 'test double parse': (test) -> x2js = new xml2js.Parser() fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) -> assert.equal err, null # make sure we parsed anyth...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
c8a2605fd5e23f2a2ea4982265692e65289e25a6
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/c8a2605fd5e23f2a2ea4982265692e65289e25a6/test/xml2js.test.coffee
124
153
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:raw_corpus
raw_corpus
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + util.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:completion
completion
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + util.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA...
assert.equal r['nochartest']['@']['misc'], 'false' assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0]['#'], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1]['#'], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:raw_corpus
raw_corpus
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton(emptyTag: null, (r) -> assert.equal r['emptytest'], null) 'test empty string result specified null': skeleton(__xmlString: ' ...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
74
123
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:completion
completion
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton(emptyTag: null, (r) -> assert.equal r['emptytest'], null) 'test empty string result specified null': skeleton(__xmlString: ' ...
'test child node with explicitArray': skeleton(explicitArray: true, (r) -> assert.equal r['arraytest'][0]['item'][0]['subitem'][0], 'Baz.' assert.equal r['arraytest'][0]['item'][1]['subitem'][0], 'Foo.' assert.equal r['arraytest'][0]['item'][1]['subitem'][1], 'Bar.') 'test ignore attributes': skeleton(ig...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
74
123
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:raw_corpus
raw_corpus
test.finish() 'test double parse': (test) -> x2js = new xml2js.Parser() fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) -> assert.equal err, null # make sure we parsed anything assert.equal r['chartest']['#'], 'Character data her...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
124
137
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test.finish() 'test double parse': (test) -> x2js = new xml2js.Parser() fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) -> assert.equal err, null # make sure we parsed anything ...
test.finish()({ 'test double parse': function(test) { var x2js; x2js = new xml2js.Parser(); return fs.readFile(fileName, function(err, data) { assert.equal(err, null); return x2js.parseString(data, function(err, r) { assert.equal(err, null); // make sure we parsed anything ...
CoffeeScript
JavaScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
124
137
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript test.finish()({ 'test double parse': function(test) { var x2js; x2js = new xml2js.Parser(); return fs.readFile(fileName, function(err, data) { assert.equal(err, null); return x2js.parseString(data, function(err, r) { assert.equal(e...
test.finish() 'test double parse': (test) -> x2js = new xml2js.Parser() fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) -> assert.equal err, null # make sure we parsed anything assert.equal r['chartest']['#'], 'Character data her...
JavaScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
124
137
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:4:completion
completion
test.finish() 'test double parse': (test) -> x2js = new xml2js.Parser() fs.readFile fileName, (err, data) -> assert.equal err, null x2js.parseString data, (err, r) ->
assert.equal err, null # make sure we parsed anything assert.equal r['chartest']['#'], 'Character data here!' x2js.parseString data, (err, r) -> assert.equal err, null assert.equal r['chartest']['#'], 'Character data here!' test.finish()
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
e5f1719d25dd3b51c3baea7014085a7f0e86afcb
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/e5f1719d25dd3b51c3baea7014085a7f0e86afcb/test/xml2js.test.coffee
124
137
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:raw_corpus
raw_corpus
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + sys.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA'...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
d41d510ce45211ed6cc9839c81c4a92e6a5e87cf
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/d41d510ce45211ed6cc9839c81c4a92e6a5e87cf/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:completion
completion
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + sys.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA'...
assert.equal r['nochartest']['@']['misc'], 'false' assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0]['#'], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1]['#'], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
d41d510ce45211ed6cc9839c81c4a92e6a5e87cf
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/d41d510ce45211ed6cc9839c81c4a92e6a5e87cf/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:raw_corpus
raw_corpus
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton(emptyTag: null, (r) -> assert.equal r['emptytest'], null) 'test empty string result specified null': skeleton(__xmlString: ' ...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
2253fdc464e2e9ce067a480ee119deea5f5da4c6
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/2253fdc464e2e9ce067a480ee119deea5f5da4c6/test/xml2js.test.coffee
74
112
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:completion
completion
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton(emptyTag: null, (r) -> assert.equal r['emptytest'], null) 'test empty string result specified null': skeleton(__xmlString: ' ...
'test child node without explicitArray': skeleton(explicitArray: false, (r) -> assert.equal r['arraytest']['item'][0]['subitem'], 'Baz.' assert.equal r['arraytest']['item'][1]['subitem'][0], 'Foo.' assert.equal r['arraytest']['item'][1]['subitem'][1], 'Bar.') 'test child node with explicitArray': skeleto...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
2253fdc464e2e9ce067a480ee119deea5f5da4c6
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/2253fdc464e2e9ce067a480ee119deea5f5da4c6/test/xml2js.test.coffee
74
112
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:raw_corpus
raw_corpus
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + sys.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA'...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
6676a6189cde398c7190f6c90dea50c92f2d7617
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/6676a6189cde398c7190f6c90dea50c92f2d7617/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:completion
completion
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + sys.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA'...
assert.equal r['nochartest']['@']['misc'], 'false' assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0]['#'], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1]['#'], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
6676a6189cde398c7190f6c90dea50c92f2d7617
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/6676a6189cde398c7190f6c90dea50c92f2d7617/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:raw_corpus
raw_corpus
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton(emptyTag: null, (r) -> assert.equal r['emptytest'], null) 'test parse with custom char and attribute object keys': skeleton(a...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
6676a6189cde398c7190f6c90dea50c92f2d7617
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/6676a6189cde398c7190f6c90dea50c92f2d7617/test/xml2js.test.coffee
74
109
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:completion
completion
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton(emptyTag: null, (r) -> assert.equal r['emptytest'], null) 'test parse with custom char and attribute object keys': skeleton(a...
assert.equal r['arraytest']['item'][0]['subitem'], 'Baz.' assert.equal r['arraytest']['item'][1]['subitem'][0], 'Foo.' assert.equal r['arraytest']['item'][1]['subitem'][1], 'Bar.') 'test child node with explicitArray': skeleton(explicitArray: true, (r) -> assert.equal r['arraytest'][0]['item'][0]['subite...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
6676a6189cde398c7190f6c90dea50c92f2d7617
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/6676a6189cde398c7190f6c90dea50c92f2d7617/test/xml2js.test.coffee
74
109
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:raw_corpus
raw_corpus
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + sys.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA'...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
7c1f6da71941a5f64ee277facdee19a83b3405d1
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/7c1f6da71941a5f64ee277facdee19a83b3405d1/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:2:completion
completion
module.exports = 'test parse with defaults': skeleton(undefined, (r) -> console.log 'Result object: ' + sys.inspect(r, false, 10) assert.equal r['chartest']['@']['desc'], 'Test for CHARs' assert.equal r['chartest']['#'], 'Character data here!' assert.equal r['cdatatest']['@']['desc'], 'Test for CDATA'...
assert.equal r['nochartest']['@']['misc'], 'false' assert.equal r['listtest']['item'][0]['#'], 'This is character data!' assert.equal r['listtest']['item'][0]['subitem'][0]['#'], 'Foo(1)' assert.equal r['listtest']['item'][0]['subitem'][1]['#'], 'Foo(2)' assert.equal r['listtest']['item'][0]['subitem'][...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
7c1f6da71941a5f64ee277facdee19a83b3405d1
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/7c1f6da71941a5f64ee277facdee19a83b3405d1/test/xml2js.test.coffee
24
73
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:raw_corpus
raw_corpus
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton({emptyTag: null}, (r) -> assert.equal r['emptytest'], null) 'test parse with custom char and attribute object keys': skeleton...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
7c1f6da71941a5f64ee277facdee19a83b3405d1
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/7c1f6da71941a5f64ee277facdee19a83b3405d1/test/xml2js.test.coffee
74
109
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:3:completion
completion
assert.deepEqual r, {root: {}}) 'test default empty tag result': skeleton(undefined, (r) -> assert.deepEqual r['emptytest'], {}) 'test empty tag result specified null': skeleton({emptyTag: null}, (r) -> assert.equal r['emptytest'], null) 'test parse with custom char and attribute object keys': skeleton...
assert.equal r['arraytest']['item'][0]['subitem'], 'Baz.' assert.equal r['arraytest']['item'][1]['subitem'][0], 'Foo.' assert.equal r['arraytest']['item'][1]['subitem'][1], 'Bar.') 'test child node with explicitArray true': skeleton({explicitArray: true}, (r) -> assert.equal r['arraytest'][0]['item'][0][...
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
7c1f6da71941a5f64ee277facdee19a83b3405d1
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/7c1f6da71941a5f64ee277facdee19a83b3405d1/test/xml2js.test.coffee
74
109
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:raw_corpus
raw_corpus
skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser(options) x2js.addListener 'end', (r) -> checks(r) test.finish() fileName = path.join(__dirname, '/fixtures/sample.xml') if not xmlString fs.readFile...
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
fd39560b891ad04b3d6b1086eb96e8b2e937288b
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/fd39560b891ad04b3d6b1086eb96e8b2e937288b/test/xml2js.test.coffee
8
21
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser(options) x2js.addListener 'end', (r) -> checks(r) test.finish() fileName = path.join(__dirname, '/fix...
var skeleton; skeleton = function(options, checks) { return function(test) { var fileName, x2js, xmlString; xmlString = options != null ? options.__xmlString : void 0; if (options != null) { delete options.__xmlString; } x2js = new xml2js.Parser(options); x2js.addListener('end', functio...
CoffeeScript
JavaScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
fd39560b891ad04b3d6b1086eb96e8b2e937288b
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/fd39560b891ad04b3d6b1086eb96e8b2e937288b/test/xml2js.test.coffee
8
21
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var skeleton; skeleton = function(options, checks) { return function(test) { var fileName, x2js, xmlString; xmlString = options != null ? options.__xmlString : void 0; if (options != null) { delete options.__xmlString; } x2js = new xml2...
skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser(options) x2js.addListener 'end', (r) -> checks(r) test.finish() fileName = path.join(__dirname, '/fixtures/sample.xml') if not xmlString fs.readFile...
JavaScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
fd39560b891ad04b3d6b1086eb96e8b2e937288b
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/fd39560b891ad04b3d6b1086eb96e8b2e937288b/test/xml2js.test.coffee
8
21
Leonidas-from-XIV/node-xml2js:test/xml2js.test.coffee:1:completion
completion
skeleton = (options, checks) -> (test) -> xmlString = options?.__xmlString delete options?.__xmlString x2js = new xml2js.Parser(options) x2js.addListener 'end', (r) -> checks(r)
test.finish() fileName = path.join(__dirname, '/fixtures/sample.xml') if not xmlString fs.readFile fileName, (err, data) -> x2js.parseString data else x2js.parseString xmlString
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/xml2js.test.coffee
MIT
fd39560b891ad04b3d6b1086eb96e8b2e937288b
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/fd39560b891ad04b3d6b1086eb96e8b2e937288b/test/xml2js.test.coffee
8
21