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
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:raw_corpus
raw_corpus
result = spawnSync( coffeeCommand, [initialSpaceExtraArgsScript, 'arg'], spawnOptions) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a shebang line with more than one/m [_, firstLine, fil...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
88
114
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:completion
completion
result = spawnSync( coffeeCommand, [initialSpaceExtraArgsScript, 'arg'], spawnOptions) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a shebang line with more than one/m [_, firstLine, fil...
result = spawnSync( coffeeCommand, [initialSpaceExtraArgsScript, '--', 'arg'], spawnOptions) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a shebang line with more than one/m [_, firstLin...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
88
114
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:raw_corpus
raw_corpus
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' # Fo...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
04959162c64d7e4212ffcb90026aec5a5b059ee2
16,577
https://github.com/jashkenas/coffeescript/blob/04959162c64d7e4212ffcb90026aec5a5b059ee2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinF...
var coffeeBinFolder, coffeeCommand, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, path, shebangScript, spawnOptions, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({execFileSync, spawnSync} = require('child_process')); // G...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
04959162c64d7e4212ffcb90026aec5a5b059ee2
16,577
https://github.com/jashkenas/coffeescript/blob/04959162c64d7e4212ffcb90026aec5a5b059ee2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var coffeeBinFolder, coffeeCommand, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, path, shebangScript, spawnOptions, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({exec...
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' # Fo...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
04959162c64d7e4212ffcb90026aec5a5b059ee2
16,577
https://github.com/jashkenas/coffeescript/blob/04959162c64d7e4212ffcb90026aec5a5b059ee2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:completion
completion
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' # Fo...
test "parse arguments for shebang scripts correctly (on *nix platforms)", -> return if isWindows() stdout = execFileSync shebangScript, ['-abck'], spawnOptions expectedArgs = ['coffee', shebangScript, '-abck'] realArgs = JSON.parse stdout arrayEq expectedArgs, realArgs stdout = execFileSync initialSpaceSc...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
04959162c64d7e4212ffcb90026aec5a5b059ee2
16,577
https://github.com/jashkenas/coffeescript/blob/04959162c64d7e4212ffcb90026aec5a5b059ee2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:raw_corpus
raw_corpus
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' spaw...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
1
41
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinF...
var coffeeBinFolder, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, path, shebangScript, spawnOptions, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({execFileSync, spawnSync} = require('child_process')); // Get the folder c...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
1
41
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var coffeeBinFolder, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, path, shebangScript, spawnOptions, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({execFileSync, spawn...
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' spaw...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
1
41
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:completion
completion
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' spaw...
test "parse arguments for shebang scripts correctly (on unix platforms)", -> return if isWindows() stdout = execFileSync shebangScript, ['-abck'], spawnOptions expectedArgs = ['coffee', shebangScript, '-abck'] realArgs = JSON.parse stdout arrayEq expectedArgs, realArgs stdout = execFileSync initialSpaceSc...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
1
41
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:2:raw_corpus
raw_corpus
result = spawnSync 'coffee', ['-b', shebangScript, '--'], spawnOptions stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', shebangScript] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: (.*)$/m)[1] arrayEq JSON.parse(posArgs)...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
43
84
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:2:completion
completion
result = spawnSync 'coffee', ['-b', shebangScript, '--'], spawnOptions stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', shebangScript] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: (.*)$/m)[1] arrayEq JSON.parse(posArgs)...
arrayEq expectedArgs, realArgs ok result.stderr.toString() is '' ok result.status is 0 test "warn about non-portable shebang lines", -> result = spawnSync 'coffee', [extraArgsScript, 'arg'], spawnOptions stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', extraArgsScript, 'arg'] ...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
43
84
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:raw_corpus
raw_corpus
result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, 'arg'], spawnOptions) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a shebang line with more than one/m [_, firstLine, file] = ...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
86
112
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:completion
completion
result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, 'arg'], spawnOptions) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a shebang line with more than one/m [_, firstLine, file] = ...
result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, '--', 'arg'], spawnOptions) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a shebang line with more than one/m [_, firstLine, fi...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
694e69d872fc849a9c04dfdad0be33b946df2c4e
16,577
https://github.com/jashkenas/coffeescript/blob/694e69d872fc849a9c04dfdad0be33b946df2c4e/test/invocation_argument_parsing.coffee
86
112
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:raw_corpus
raw_corpus
return unless require? path = require 'path' {spawnSync, execFileSync} = require 'child_process' # Get directory containing the compiled `coffee` executable and prepend it to # the path so `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinDir = path.dirname require.resolve('../bin/coffee') patchedP...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
1
45
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return unless require? path = require 'path' {spawnSync, execFileSync} = require 'child_process' # Get directory containing the compiled `coffee` executable and prepend it to # the path so `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinDir...
var coffeeBinDir, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, patchedEnv, patchedPath, path, shebangScript, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({spawnSync, execFileSync} = require('child_process')); // Get dire...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
1
45
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var coffeeBinDir, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, patchedEnv, patchedPath, path, shebangScript, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({spawnSync, ...
return unless require? path = require 'path' {spawnSync, execFileSync} = require 'child_process' # Get directory containing the compiled `coffee` executable and prepend it to # the path so `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinDir = path.dirname require.resolve('../bin/coffee') patchedP...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
1
45
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:completion
completion
return unless require? path = require 'path' {spawnSync, execFileSync} = require 'child_process' # Get directory containing the compiled `coffee` executable and prepend it to # the path so `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinDir = path.dirname require.resolve('../bin/coffee') patchedP...
arrayEq expectedArgs, realArgs stdout = execFileSync initialSpaceScript, ['-abck'], {env: patchedEnv} expectedArgs = ['coffee', initialSpaceScript, '-abck'] realArgs = JSON.parse stdout arrayEq expectedArgs, realArgs test "warn and remove -- if it is the second positional argument", -> result = spawnSync 'c...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
1
45
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:2:raw_corpus
raw_corpus
result = spawnSync( 'coffee', ['-b', shebangScript, '--', 'ANOTHER ONE'], {env: patchedEnv}) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', shebangScript, 'ANOTHER ONE'] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: ...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
47
92
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:2:completion
completion
result = spawnSync( 'coffee', ['-b', shebangScript, '--', 'ANOTHER ONE'], {env: patchedEnv}) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', shebangScript, 'ANOTHER ONE'] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: ...
ok (firstLine is '#!/usr/bin/env coffee --') ok (file is extraArgsScript) args = stderr.match(/^The arguments were: (.*)$/m)[1] arrayEq JSON.parse(args), ['coffee', '--'] ok result.status is 0 result = spawnSync 'coffee', [initialSpaceScript, 'arg'], {env: patchedEnv} stderr = result.stderr.toString() ok...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
47
92
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:raw_corpus
raw_corpus
test "both warnings will be shown at once", -> result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, '--', 'arg'], {env: patchedEnv}) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
94
108
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test "both warnings will be shown at once", -> result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, '--', 'arg'], {env: patchedEnv}) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg...
test("both warnings will be shown at once", function() { var _, args, file, firstLine, posArgs, result, stderr; result = spawnSync('coffee', [initialSpaceExtraArgsScript, '--', 'arg'], { env: patchedEnv }); stderr = result.stderr.toString(); arrayEq(JSON.parse(result.stdout), ['coffee', initialSpaceExtraA...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
94
108
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript test("both warnings will be shown at once", function() { var _, args, file, firstLine, posArgs, result, stderr; result = spawnSync('coffee', [initialSpaceExtraArgsScript, '--', 'arg'], { env: patchedEnv }); stderr = result.stderr.toString(); arrayEq(J...
test "both warnings will be shown at once", -> result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, '--', 'arg'], {env: patchedEnv}) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
94
108
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:3:completion
completion
test "both warnings will be shown at once", -> result = spawnSync( 'coffee', [initialSpaceExtraArgsScript, '--', 'arg'], {env: patchedEnv}) stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', initialSpaceExtraArgsScript, 'arg'] ok stderr.match /^The script to be run begins with a...
ok (firstLine is '#! /usr/bin/env coffee extra') ok (file is initialSpaceExtraArgsScript) args = stderr.match(/^The arguments were: (.*)$/m)[1] arrayEq JSON.parse(args), ['coffee', 'extra'] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: (.*)$/m)[1] a...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/invocation_argument_parsing.coffee
94
108
Nedomas/databound:spec/errors/unrescued.coffee:1:raw_corpus
raw_corpus
describe 'unrescued error', -> it 'does not return a hash', -> stubResponse null, -> expect(-> User.find(name: 'John')).to.throw(Error, 'Error in the backend') it '#find', -> stubResponse { success: false scoped_records: [] }, -> expect(-> User.find(name: 'John')).to.th...
CoffeeScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
1
50
Nedomas/databound:spec/errors/unrescued.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'unrescued error', -> it 'does not return a hash', -> stubResponse null, -> expect(-> User.find(name: 'John')).to.throw(Error, 'Error in the backend') it '#find', -> stubResponse { success: false scoped_records: [] ...
describe('unrescued error', function() { it('does not return a hash', function() { return stubResponse(null, function() { return expect(function() { return User.find({ name: 'John' }); }).to.throw(Error, 'Error in the backend'); }); }); it('#find', function() { re...
CoffeeScript
JavaScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
1
50
Nedomas/databound:spec/errors/unrescued.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('unrescued error', function() { it('does not return a hash', function() { return stubResponse(null, function() { return expect(function() { return User.find({ name: 'John' }); }).to.throw(Error, 'Error in the bac...
describe 'unrescued error', -> it 'does not return a hash', -> stubResponse null, -> expect(-> User.find(name: 'John')).to.throw(Error, 'Error in the backend') it '#find', -> stubResponse { success: false scoped_records: [] }, -> expect(-> User.find(name: 'John')).to.th...
JavaScript
CoffeeScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
1
50
Nedomas/databound:spec/errors/unrescued.coffee:1:completion
completion
describe 'unrescued error', -> it 'does not return a hash', -> stubResponse null, -> expect(-> User.find(name: 'John')).to.throw(Error, 'Error in the backend') it '#find', -> stubResponse { success: false scoped_records: [] }, -> expect(-> User.find(name: 'John')).to.th...
stubResponse { success: false scoped_records: [{ id: 2, name: 'Peter' }] }, -> expect(-> User.where(name: 'John')).to.throw(Error, 'Error in the backend') it '#create', -> stubResponse { success: false scoped_records: [{ id: 2, name: 'Peter' }] }, -> expect(-...
CoffeeScript
CoffeeScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
1
50
Nedomas/databound:spec/errors/unrescued.coffee:2:raw_corpus
raw_corpus
it '#destroy', -> stubResponse { success: false scoped_records: [{ id: 2, name: 'Peter' }] }, -> expect(-> User.destroy(2)).to.throw(Error, 'Error in the backend') it 'backend with rejected promise', -> stubResponse { status: 401, responseJSON: { message: 'Something...
CoffeeScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
51
70
Nedomas/databound:spec/errors/unrescued.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it '#destroy', -> stubResponse { success: false scoped_records: [{ id: 2, name: 'Peter' }] }, -> expect(-> User.destroy(2)).to.throw(Error, 'Error in the backend') it 'backend with rejected promise', -> stubResponse { statu...
it('#destroy', function() { return stubResponse({ success: false, scoped_records: [ { id: 2, name: 'Peter' } ] }, function() { return expect(function() { return User.destroy(2); }).to.throw(Error, 'Error in the backend'); }); }); it('backend with rejected pro...
CoffeeScript
JavaScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
51
70
Nedomas/databound:spec/errors/unrescued.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('#destroy', function() { return stubResponse({ success: false, scoped_records: [ { id: 2, name: 'Peter' } ] }, function() { return expect(function() { return User.destroy(2); }).to.throw(Error, 'Error in ...
it '#destroy', -> stubResponse { success: false scoped_records: [{ id: 2, name: 'Peter' }] }, -> expect(-> User.destroy(2)).to.throw(Error, 'Error in the backend') it 'backend with rejected promise', -> stubResponse { status: 401, responseJSON: { message: 'Something...
JavaScript
CoffeeScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
51
70
Nedomas/databound:spec/errors/unrescued.coffee:2:completion
completion
it '#destroy', -> stubResponse { success: false scoped_records: [{ id: 2, name: 'Peter' }] }, -> expect(-> User.destroy(2)).to.throw(Error, 'Error in the backend') it 'backend with rejected promise', ->
stubResponse { status: 401, responseJSON: { message: 'Something went wrong' } }, (-> expect(-> User.destroy(1)).to.throw(Error, 'Error in the backend with status 401') ), 'reject'
CoffeeScript
CoffeeScript
Nedomas/databound
spec/errors/unrescued.coffee
MIT
a02f231f1c3964eb8584adf55d7709b656e7e4a4
452
https://github.com/Nedomas/databound/blob/a02f231f1c3964eb8584adf55d7709b656e7e4a4/spec/errors/unrescued.coffee
51
70
nevir/groc:lib/styles/gilt.coffee:1:raw_corpus
raw_corpus
fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', 'model', 'nav', 'tracking', 'user', 'validator', 'vendor',...
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
9dce1b4df29a83360b242816659edca3b74f5dce
579
https://github.com/nevir/groc/blob/9dce1b4df29a83360b242816659edca3b74f5dce/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', '...
var Default, GITWEB_URL, Gilt, JIRA_TICKET_REGEX, JIRA_TICKET_URL, UI_DOCS_MODULE_URL, UI_STAR_GROUPS, UI_STAR_REGEX, fs, getPackageJson, jade, path; fs = require('fs'); path = require('path'); jade = require('jade'); Default = require('./default'); JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g; JIRA_TICKET_URL = 'https://...
CoffeeScript
JavaScript
nevir/groc
lib/styles/gilt.coffee
MIT
9dce1b4df29a83360b242816659edca3b74f5dce
579
https://github.com/nevir/groc/blob/9dce1b4df29a83360b242816659edca3b74f5dce/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Default, GITWEB_URL, Gilt, JIRA_TICKET_REGEX, JIRA_TICKET_URL, UI_DOCS_MODULE_URL, UI_STAR_GROUPS, UI_STAR_REGEX, fs, getPackageJson, jade, path; fs = require('fs'); path = require('path'); jade = require('jade'); Default = require('./default'); JIRA_TICKE...
fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', 'model', 'nav', 'tracking', 'user', 'validator', 'vendor',...
JavaScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
9dce1b4df29a83360b242816659edca3b74f5dce
579
https://github.com/nevir/groc/blob/9dce1b4df29a83360b242816659edca3b74f5dce/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:1:completion
completion
fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', 'model', 'nav', 'tracking', 'user', 'validator', 'vendor',...
# In addition to everything that Default gives us (like doc tags) # this style will look for certain patterns (like jira tickets) # and replace them with links, example: FEDUI-1234 should be a link # to JIRA and "common.logger" should be a link to ui-docs module.exports = class Gilt extends Default constructor: (args...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
9dce1b4df29a83360b242816659edca3b74f5dce
579
https://github.com/nevir/groc/blob/9dce1b4df29a83360b242816659edca3b74f5dce/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:2:raw_corpus
raw_corpus
else revision = 'HEAD' @project.gitwebURL = "#{GITWEB_URL}p=#{repo_name}.git;hb=#{revision};f=#{path_to_module}" @sourceAssets = path.join __dirname, 'gilt' templateData = fs.readFileSync path.join(@sourceAssets, 'docPage.jade'), 'utf-8' @templateFunc = jade.compile templateData renderD...
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
9dce1b4df29a83360b242816659edca3b74f5dce
579
https://github.com/nevir/groc/blob/9dce1b4df29a83360b242816659edca3b74f5dce/lib/styles/gilt.coffee
51
71
nevir/groc:lib/styles/gilt.coffee:2:completion
completion
else revision = 'HEAD' @project.gitwebURL = "#{GITWEB_URL}p=#{repo_name}.git;hb=#{revision};f=#{path_to_module}" @sourceAssets = path.join __dirname, 'gilt' templateData = fs.readFileSync path.join(@sourceAssets, 'docPage.jade'), 'utf-8' @templateFunc = jade.compile templateData
renderDocTags: (segments) -> super segments for segment, segmentIndex in segments output = segment.comments.join '\n' output = output.replace JIRA_TICKET_REGEX, "<a href=\"#{JIRA_TICKET_URL}$1\">$1</a>" output = output.replace UI_STAR_REGEX, (all, q, fn, pn) -> "<a href=\"#{UI_DOCS_MODULE_U...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
9dce1b4df29a83360b242816659edca3b74f5dce
579
https://github.com/nevir/groc/blob/9dce1b4df29a83360b242816659edca3b74f5dce/lib/styles/gilt.coffee
51
71
nevir/groc:lib/styles/gilt.coffee:1:raw_corpus
raw_corpus
fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', 'model', 'nav', 'tracking', 'user', 'validator', 'vendor',...
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
08d8995a6a024575549aec7facf0c1f4a6c9f6cd
579
https://github.com/nevir/groc/blob/08d8995a6a024575549aec7facf0c1f4a6c9f6cd/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', '...
var Default, GITWEB_URL, Gilt, JIRA_TICKET_REGEX, JIRA_TICKET_URL, UI_DOCS_MODULE_URL, UI_STAR_GROUPS, UI_STAR_REGEX, fs, getPackageJson, jade, path; fs = require('fs'); path = require('path'); jade = require('jade'); Default = require('./default'); JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g; JIRA_TICKET_URL = 'https://...
CoffeeScript
JavaScript
nevir/groc
lib/styles/gilt.coffee
MIT
08d8995a6a024575549aec7facf0c1f4a6c9f6cd
579
https://github.com/nevir/groc/blob/08d8995a6a024575549aec7facf0c1f4a6c9f6cd/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Default, GITWEB_URL, Gilt, JIRA_TICKET_REGEX, JIRA_TICKET_URL, UI_DOCS_MODULE_URL, UI_STAR_GROUPS, UI_STAR_REGEX, fs, getPackageJson, jade, path; fs = require('fs'); path = require('path'); jade = require('jade'); Default = require('./default'); JIRA_TICKE...
fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', 'model', 'nav', 'tracking', 'user', 'validator', 'vendor',...
JavaScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
08d8995a6a024575549aec7facf0c1f4a6c9f6cd
579
https://github.com/nevir/groc/blob/08d8995a6a024575549aec7facf0c1f4a6c9f6cd/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:1:completion
completion
fs = require 'fs' path = require 'path' jade = require 'jade' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' UI_STAR_GROUPS = ['admin', 'common', 'controller', 'dom', 'formatter', 'less', 'model', 'nav', 'tracking', 'user', 'validator', 'vendor',...
# In addition to everything that Default gives us (like doc tags) # this style will look for certain patterns (like jira tickets) # and replace them with links, example: FEDUI-1234 should be a link # to JIRA and "common.logger" should be a link to ui-docs module.exports = class Gilt extends Default constructor: (args...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
08d8995a6a024575549aec7facf0c1f4a6c9f6cd
579
https://github.com/nevir/groc/blob/08d8995a6a024575549aec7facf0c1f4a6c9f6cd/lib/styles/gilt.coffee
1
50
nevir/groc:lib/styles/gilt.coffee:2:raw_corpus
raw_corpus
@templateFunc = jade.compile templateData renderDocTags: (segments) -> super segments for segment, segmentIndex in segments output = segment.comments.join '\n' output = output.replace JIRA_TICKET_REGEX, "<a href=\"#{JIRA_TICKET_URL}$1\">$1</a>" output = output.replace UI_STAR_REGEX, (all...
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
08d8995a6a024575549aec7facf0c1f4a6c9f6cd
579
https://github.com/nevir/groc/blob/08d8995a6a024575549aec7facf0c1f4a6c9f6cd/lib/styles/gilt.coffee
51
63
nevir/groc:lib/styles/gilt.coffee:2:completion
completion
@templateFunc = jade.compile templateData renderDocTags: (segments) -> super segments for segment, segmentIndex in segments
output = segment.comments.join '\n' output = output.replace JIRA_TICKET_REGEX, "<a href=\"#{JIRA_TICKET_URL}$1\">$1</a>" output = output.replace UI_STAR_REGEX, (all, q, fn, pn) -> "<a href=\"#{UI_DOCS_MODULE_URL}#{pn.replace(/\./g, '/')}\">#{q}#{fn}#{q}</a>" segment.comments = output.split '\n'
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
08d8995a6a024575549aec7facf0c1f4a6c9f6cd
579
https://github.com/nevir/groc/blob/08d8995a6a024575549aec7facf0c1f4a6c9f6cd/lib/styles/gilt.coffee
51
63
nevir/groc:lib/styles/gilt.coffee:1:raw_corpus
raw_corpus
path = require 'path' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' # In addition to everything that Default gives us (like doc tags) # this style will look for certain patterns (like jira tickets) # and replace them with links, example: FEDUI-123...
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
a77e93ed1fc5131ab244668b0e90e5f5e18f20ab
579
https://github.com/nevir/groc/blob/a77e93ed1fc5131ab244668b0e90e5f5e18f20ab/lib/styles/gilt.coffee
1
25
nevir/groc:lib/styles/gilt.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript path = require 'path' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' # In addition to everything that Default gives us (like doc tags) # this style will look for certain patterns (like jira t...
var Default, Gilt, JIRA_TICKET_REGEX, JIRA_TICKET_URL, path; path = require('path'); Default = require('./default'); JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g; JIRA_TICKET_URL = 'https://jira.gilt.com/browse/'; // In addition to everything that Default gives us (like doc tags) // this style will look for certain pattern...
CoffeeScript
JavaScript
nevir/groc
lib/styles/gilt.coffee
MIT
a77e93ed1fc5131ab244668b0e90e5f5e18f20ab
579
https://github.com/nevir/groc/blob/a77e93ed1fc5131ab244668b0e90e5f5e18f20ab/lib/styles/gilt.coffee
1
25
nevir/groc:lib/styles/gilt.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Default, Gilt, JIRA_TICKET_REGEX, JIRA_TICKET_URL, path; path = require('path'); Default = require('./default'); JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g; JIRA_TICKET_URL = 'https://jira.gilt.com/browse/'; // In addition to everything that Default gives us (lik...
path = require 'path' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' # In addition to everything that Default gives us (like doc tags) # this style will look for certain patterns (like jira tickets) # and replace them with links, example: FEDUI-123...
JavaScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
a77e93ed1fc5131ab244668b0e90e5f5e18f20ab
579
https://github.com/nevir/groc/blob/a77e93ed1fc5131ab244668b0e90e5f5e18f20ab/lib/styles/gilt.coffee
1
25
nevir/groc:lib/styles/gilt.coffee:1:completion
completion
path = require 'path' Default = require './default' JIRA_TICKET_REGEX = /([A-Z]+-\d+)/g JIRA_TICKET_URL = 'https://jira.gilt.com/browse/' # In addition to everything that Default gives us (like doc tags) # this style will look for certain patterns (like jira tickets) # and replace them with links, example: FEDUI-123...
super args... @sourceAssets = path.join __dirname, 'gilt' renderDocTags: (segments) -> super segments for segment, segmentIndex in segments output = segment.comments.join('\n') output = output.replace(JIRA_TICKET_REGEX, "<a href=\"#{JIRA_TICKET_URL}$1\">$1</a>") segment.comments = o...
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/gilt.coffee
MIT
a77e93ed1fc5131ab244668b0e90e5f5e18f20ab
579
https://github.com/nevir/groc/blob/a77e93ed1fc5131ab244668b0e90e5f5e18f20ab/lib/styles/gilt.coffee
1
25
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:1:raw_corpus
raw_corpus
should = require 'should' app = require '../app' limbo = require 'limbo' async = require 'async' {prepare, cleanup} = app { MessageModel } = limbo.use 'talk' describe 'Schemas#Message', -> _newMessage = -> new MessageModel creator: app.user1._id team: app.team1._id room: app.room1._id be...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should = require 'should' app = require '../app' limbo = require 'limbo' async = require 'async' {prepare, cleanup} = app { MessageModel } = limbo.use 'talk' describe 'Schemas#Message', -> _newMessage = -> new MessageModel creator: app.user1._id ...
var MessageModel, app, async, cleanup, limbo, prepare, should; should = require('should'); app = require('../app'); limbo = require('limbo'); async = require('async'); ({prepare, cleanup} = app); ({MessageModel} = limbo.use('talk')); describe('Schemas#Message', function() { var _newMessage; _newMessage = fun...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MessageModel, app, async, cleanup, limbo, prepare, should; should = require('should'); app = require('../app'); limbo = require('limbo'); async = require('async'); ({prepare, cleanup} = app); ({MessageModel} = limbo.use('talk')); describe('Schemas#Messag...
should = require 'should' app = require '../app' limbo = require 'limbo' async = require 'async' {prepare, cleanup} = app { MessageModel } = limbo.use 'talk' describe 'Schemas#Message', -> _newMessage = -> new MessageModel creator: app.user1._id team: app.team1._id room: app.room1._id be...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:1:completion
completion
should = require 'should' app = require '../app' limbo = require 'limbo' async = require 'async' {prepare, cleanup} = app { MessageModel } = limbo.use 'talk' describe 'Schemas#Message', -> _newMessage = -> new MessageModel creator: app.user1._id team: app.team1._id room: app.room1._id be...
app.createRooms ], done it 'should save basic message', (done) -> message = _newMessage() message.body = "Hello <$at|1|@someone$>" message.save (err, message) -> message.should.have.properties 'body', 'isSystem' message.isSystem.should.eql false message.getAlert().should.eql "Hello...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:2:raw_corpus
raw_corpus
message.attachments = [file] message.save (err, message) -> return done err if err MessageModel.findOne _id: message._id, (err, message) -> message.attachments.length.should.eql 1 message.attachments[0].should.have.properties 'category', 'data', '_id' message.attachments[0].data...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
46
95
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:2:completion
completion
message.attachments = [file] message.save (err, message) -> return done err if err MessageModel.findOne _id: message._id, (err, message) -> message.attachments.length.should.eql 1 message.attachments[0].should.have.properties 'category', 'data', '_id' message.attachments[0].data...
it 'should update the attachments', (done) -> message = _newMessage() file1 = category: 'file' data: fileKey: "2a4a216c6095750ec4840925a14ebad1" file2 = category: 'file' data: fileKey: '2a4a216c6095750ec4840925a14ebad2' message.attachments = [file1] message.save (err, message...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
46
95
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:3:raw_corpus
raw_corpus
it 'should save displayType propertype and provied with default value', (done) -> message = _newMessage() message.save (err, message) -> message.should.have.properties 'displayType' message.displayType.should.eql 'text' done err after cleanup
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
97
105
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should save displayType propertype and provied with default value', (done) -> message = _newMessage() message.save (err, message) -> message.should.have.properties 'displayType' message.displayType.should.eql 'text' done err afte...
it('should save displayType propertype and provied with default value', function(done) { var message; message = _newMessage(); return message.save(function(err, message) { message.should.have.properties('displayType'); message.displayType.should.eql('text'); return done(err); }); }); after(cleanup)...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
97
105
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should save displayType propertype and provied with default value', function(done) { var message; message = _newMessage(); return message.save(function(err, message) { message.should.have.properties('displayType'); message.displayType.should.eql('...
it 'should save displayType propertype and provied with default value', (done) -> message = _newMessage() message.save (err, message) -> message.should.have.properties 'displayType' message.displayType.should.eql 'text' done err after cleanup
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
97
105
jianliaoim/talk-os:talk-api2x/test/schemas/message.coffee:3:completion
completion
it 'should save displayType propertype and provied with default value', (done) -> message = _newMessage() message.save (err, message) ->
message.should.have.properties 'displayType' message.displayType.should.eql 'text' done err after cleanup
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/schemas/message.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/schemas/message.coffee
97
105
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:completion
completion
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# # EncryptString controller -- for modal dialog # cyclotronApp.controller 'EncryptStringController', ($scope, $uibModalInstance, cryptoService, configService) -> $scope.fields = {} $scope.encrypt = -> return if _.isEmpty $scope.fields.value cryptoService.encrypt($scope.fields.value).then (res...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:completion
completion
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# # EncryptString controller -- for modal dialog # cyclotronApp.controller 'EncryptStringController', ($scope, $uibModalInstance, cryptoService, configService) -> $scope.fields = {} $scope.encrypt = -> return if _.isEmpty $scope.fields.value cryptoService.encrypt($scope.fields.value).then (res...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee:1:completion
completion
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# # EncryptString controller -- for modal dialog # cyclotronApp.controller 'EncryptStringController', ($scope, $modalInstance, cryptoService, configService) -> $scope.fields = {} $scope.encrypt = -> return if _.isEmpty $scope.fields.value cryptoService.encrypt($scope.fields.value).then (result...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.encryptString.coffee
1
30
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:1:raw_corpus
raw_corpus
_postMessage = ({message, integration}) -> {url, token} = integration msg = _.clone message msg.token = token if token?.length msg.event = 'message.create' $body = @httpPost url, msg, retryTimes: 5 Promise.all [$body, $service] .spread (body = {}, service) -> return unless body.text or body.content...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
17
66
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _postMessage = ({message, integration}) -> {url, token} = integration msg = _.clone message msg.token = token if token?.length msg.event = 'message.create' $body = @httpPost url, msg, retryTimes: 5 Promise.all [$body, $service] .spread (body = {}...
var _postMessage; _postMessage = function({message, integration}) { var $body, msg, token, url; ({url, token} = integration); msg = _.clone(message); if (token != null ? token.length : void 0) { msg.token = token; } msg.event = 'message.create'; $body = this.httpPost(url, msg, { retryTimes: 5 }...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
17
66
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _postMessage; _postMessage = function({message, integration}) { var $body, msg, token, url; ({url, token} = integration); msg = _.clone(message); if (token != null ? token.length : void 0) { msg.token = token; } msg.event = 'message.create'; ...
_postMessage = ({message, integration}) -> {url, token} = integration msg = _.clone message msg.token = token if token?.length msg.event = 'message.create' $body = @httpPost url, msg, retryTimes: 5 Promise.all [$body, $service] .spread (body = {}, service) -> return unless body.text or body.content...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
17
66
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:1:completion
completion
_postMessage = ({message, integration}) -> {url, token} = integration msg = _.clone message msg.token = token if token?.length msg.event = 'message.create' $body = @httpPost url, msg, retryTimes: 5 Promise.all [$body, $service] .spread (body = {}, service) -> return unless body.text or body.content...
replyMessage.team = integration._teamId replyMessage.$save() .then (message) -> # Reset errorTimes return message unless integration.errorTimes > 0 integration.errorTimes = 0 integration.lastErrorInfo = undefined integration.errorInfo = undefined integration.$save().then -> message .ca...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
17
66
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:2:raw_corpus
raw_corpus
@action 'sendMsgToOutgoing', (req, res, message) -> return unless message._roomId $integrations = IntegrationModel.findAsync room: message._roomId category: 'outgoing' errorInfo: null $replyMessages = $integrations.map (integration) -> $service.then (service) -> req.integr...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
67
83
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @action 'sendMsgToOutgoing', (req, res, message) -> return unless message._roomId $integrations = IntegrationModel.findAsync room: message._roomId category: 'outgoing' errorInfo: null $replyMessages = $integrations.map (integration...
this.action('sendMsgToOutgoing', function(req, res, message) { var $integrations, $replyMessages; if (!message._roomId) { return; } $integrations = IntegrationModel.findAsync({ room: message._roomId, category: 'outgoing', errorInfo: null }); return $replyMessages = $integrations.map(function...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
67
83
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.action('sendMsgToOutgoing', function(req, res, message) { var $integrations, $replyMessages; if (!message._roomId) { return; } $integrations = IntegrationModel.findAsync({ room: message._roomId, category: 'outgoing', errorInfo: null }...
@action 'sendMsgToOutgoing', (req, res, message) -> return unless message._roomId $integrations = IntegrationModel.findAsync room: message._roomId category: 'outgoing' errorInfo: null $replyMessages = $integrations.map (integration) -> $service.then (service) -> req.integr...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
67
83
jianliaoim/talk-os:talk-api2x/server/services/outgoing.coffee:2:completion
completion
@action 'sendMsgToOutgoing', (req, res, message) -> return unless message._roomId $integrations = IntegrationModel.findAsync room: message._roomId category: 'outgoing' errorInfo: null
$replyMessages = $integrations.map (integration) -> $service.then (service) -> req.integration = integration req.message = message service.receiveEvent 'message.create', req .catch (err) -> logger.warn err.stack
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/services/outgoing.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/outgoing.coffee
67
83
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:raw_corpus
raw_corpus
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = atom.project...
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
8
57
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:completion
completion
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = atom.project...
relativePath = path.relative(@rootPath, loadedPath) for sourceName in @sourceNames return true if sourceName.match(relativePath) isIgnored: (loadedPath, stats) -> relativePath = path.relative(@rootPath, loadedPath) if @repo?.isPathIgnored(relativePath) true else for ignoredName in @...
CoffeeScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
8
57
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:2:raw_corpus
raw_corpus
if @isKnown(loadedPath) @paths.push(loadedPath) if @hasChanged(loadedPath, stats) else @paths.push(loadedPath) else @lostPaths.push(loadedPath) if loadedPath in @knownPaths @flushPaths() if @paths.length + @lostPaths.length is PathsChunkSize done() flushPaths: -> emit('lo...
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
58
102
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:2:completion
completion
if @isKnown(loadedPath) @paths.push(loadedPath) if @hasChanged(loadedPath, stats) else @paths.push(loadedPath) else @lostPaths.push(loadedPath) if loadedPath in @knownPaths @flushPaths() if @paths.length + @lostPaths.length is PathsChunkSize done() flushPaths: -> emit('lo...
return done() if error? if stats.isFile() @pathLoaded(pathToLoad, stats, done) else if stats.isDirectory() if @traverseSymlinkDirectories @loadFolder(pathToLoad, done) else done() else if stats.isDirectory() @loadFolder(pa...
CoffeeScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
58
102
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:3:raw_corpus
raw_corpus
module.exports = (config) -> newConf = ignoreVcsIgnores: config.ignoreVcsIgnores traverseSymlinkDirectories: config.traverseSymlinkDirectories knownPaths: config.knownPaths ignoredNames: [] sourceNames: [] if config.timestamp? newConf.timestamp = new Date(Date.parse(config.timestamp)) fo...
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
104
132
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (config) -> newConf = ignoreVcsIgnores: config.ignoreVcsIgnores traverseSymlinkDirectories: config.traverseSymlinkDirectories knownPaths: config.knownPaths ignoredNames: [] sourceNames: [] if config.timestamp? newConf...
module.exports = function(config) { var error, i, ignore, j, len, len1, newConf, ref, ref1, source; newConf = { ignoreVcsIgnores: config.ignoreVcsIgnores, traverseSymlinkDirectories: config.traverseSymlinkDirectories, knownPaths: config.knownPaths, ignoredNames: [], sourceNames: [] }; if (co...
CoffeeScript
JavaScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
104
132
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(config) { var error, i, ignore, j, len, len1, newConf, ref, ref1, source; newConf = { ignoreVcsIgnores: config.ignoreVcsIgnores, traverseSymlinkDirectories: config.traverseSymlinkDirectories, knownPaths: config.knownPaths, ...
module.exports = (config) -> newConf = ignoreVcsIgnores: config.ignoreVcsIgnores traverseSymlinkDirectories: config.traverseSymlinkDirectories knownPaths: config.knownPaths ignoredNames: [] sourceNames: [] if config.timestamp? newConf.timestamp = new Date(Date.parse(config.timestamp)) fo...
JavaScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
104
132
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:3:completion
completion
module.exports = (config) -> newConf = ignoreVcsIgnores: config.ignoreVcsIgnores traverseSymlinkDirectories: config.traverseSymlinkDirectories knownPaths: config.knownPaths ignoredNames: [] sourceNames: [] if config.timestamp? newConf.timestamp = new Date(Date.parse(config.timestamp)) fo...
catch error console.warn "Error parsing source pattern (#{source}): #{error.message}" for ignore in config.ignoredNames when ignore try newConf.ignoredNames.push(new Minimatch(ignore, matchBase: true, dot: true)) catch error console.warn "Error parsing ignore pattern (#{ignore}): #{error.me...
CoffeeScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4
518
https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/tasks/load-paths-handler.coffee
104
132
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:raw_corpus
raw_corpus
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = GitRepositor...
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
175bc32dd3023287d06c279fe523257c418696d1
518
https://github.com/abe33/atom-pigments/blob/175bc32dd3023287d06c279fe523257c418696d1/lib/tasks/load-paths-handler.coffee
9
58
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:completion
completion
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = GitRepositor...
relativePath = path.relative(@rootPath, loadedPath) for sourceName in @sourceNames return true if sourceName.match(relativePath) isIgnored: (loadedPath, stats) -> relativePath = path.relative(@rootPath, loadedPath) if @repo?.isPathIgnored(relativePath) true else for ignoredName in @...
CoffeeScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
175bc32dd3023287d06c279fe523257c418696d1
518
https://github.com/abe33/atom-pigments/blob/175bc32dd3023287d06c279fe523257c418696d1/lib/tasks/load-paths-handler.coffee
9
58
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:raw_corpus
raw_corpus
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = GitRepositor...
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
9
58
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo...
var PathLoader, indexOf = [].indexOf; PathLoader = class PathLoader { constructor(rootPath, config) { var ignoreVcsIgnores, repo; this.rootPath = rootPath; ({timestamp: this.timestamp, sourceNames: this.sourceNames, ignoreVcsIgnores, traverseSymlinkDirectories: this.traverseSymlinkDirectories, ignoredN...
CoffeeScript
JavaScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
9
58
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PathLoader, indexOf = [].indexOf; PathLoader = class PathLoader { constructor(rootPath, config) { var ignoreVcsIgnores, repo; this.rootPath = rootPath; ({timestamp: this.timestamp, sourceNames: this.sourceNames, ignoreVcsIgnores, traverseSymlin...
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = GitRepositor...
JavaScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
9
58
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:1:completion
completion
class PathLoader constructor: (@rootPath, config) -> {@timestamp, @sourceNames, ignoreVcsIgnores, @traverseSymlinkDirectories, @ignoredNames, @knownPaths} = config @knownPaths ?= [] @paths = [] @lostPaths = [] @scannedPaths = [] @repo = null if ignoreVcsIgnores repo = GitRepositor...
isSource: (loadedPath) -> relativePath = path.relative(@rootPath, loadedPath) for sourceName in @sourceNames return true if sourceName.match(relativePath) isIgnored: (loadedPath, stats) -> relativePath = path.relative(@rootPath, loadedPath) if @repo?.isPathIgnored(relativePath) true e...
CoffeeScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
9
58
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:2:raw_corpus
raw_corpus
if @isSource(loadedPath) and !@isIgnored(loadedPath, stats) if @isKnown(loadedPath) @paths.push(loadedPath) if @hasChanged(loadedPath, stats) else @paths.push(loadedPath) else @lostPaths.push(loadedPath) if loadedPath in @knownPaths @flushPaths() if @paths.length + @lostPaths....
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
59
104
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if @isSource(loadedPath) and !@isIgnored(loadedPath, stats) if @isKnown(loadedPath) @paths.push(loadedPath) if @hasChanged(loadedPath, stats) else @paths.push(loadedPath) else @lostPaths.push(loadedPath) if loadedPath in @kno...
var indexOf = [].indexOf; if (this.isSource(loadedPath) && !this.isIgnored(loadedPath, stats)) { if (this.isKnown(loadedPath)) { if (this.hasChanged(loadedPath, stats)) { this.paths.push(loadedPath); } } else { this.paths.push(loadedPath); } } else { if (indexOf.call(this.knownPaths, loadedPa...
CoffeeScript
JavaScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
59
104
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var indexOf = [].indexOf; if (this.isSource(loadedPath) && !this.isIgnored(loadedPath, stats)) { if (this.isKnown(loadedPath)) { if (this.hasChanged(loadedPath, stats)) { this.paths.push(loadedPath); } } else { this.paths.push(loadedPath); ...
if @isSource(loadedPath) and !@isIgnored(loadedPath, stats) if @isKnown(loadedPath) @paths.push(loadedPath) if @hasChanged(loadedPath, stats) else @paths.push(loadedPath) else @lostPaths.push(loadedPath) if loadedPath in @knownPaths @flushPaths() if @paths.length + @lostPaths....
JavaScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
59
104
abe33/atom-pigments:lib/tasks/load-paths-handler.coffee:2:completion
completion
if @isSource(loadedPath) and !@isIgnored(loadedPath, stats) if @isKnown(loadedPath) @paths.push(loadedPath) if @hasChanged(loadedPath, stats) else @paths.push(loadedPath) else @lostPaths.push(loadedPath) if loadedPath in @knownPaths @flushPaths() if @paths.length + @lostPaths....
return done() if error? if stats.isFile() @pathLoaded(pathToLoad, stats, done) else if stats.isDirectory() if @traverseSymlinkDirectories @loadFolder(pathToLoad, done) else done() else if stats.isDirectory() @loadFolder(pa...
CoffeeScript
CoffeeScript
abe33/atom-pigments
lib/tasks/load-paths-handler.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/tasks/load-paths-handler.coffee
59
104
jashkenas/coffeescript:test/parser.coffee:1:raw_corpus
raw_corpus
# Parser # --------- test "operator precedence for logical operators", -> source = ''' a or b and c ''' {body: block} = CoffeeScript.nodes source [expression] = block.expressions eq expression.first.base.value, 'a' eq expression.operator, '||' eq expression.second.first.base.value, 'b' eq expressio...
CoffeeScript
jashkenas/coffeescript
test/parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/parser.coffee
1
50
jashkenas/coffeescript:test/parser.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Parser # --------- test "operator precedence for logical operators", -> source = ''' a or b and c ''' {body: block} = CoffeeScript.nodes source [expression] = block.expressions eq expression.first.base.value, 'a' eq expression.operator, '||' ...
// Parser // --------- test("operator precedence for logical operators", function() { var block, expression, source; source = `a or b and c`; ({ body: block } = CoffeeScript.nodes(source)); [expression] = block.expressions; eq(expression.first.base.value, 'a'); eq(expression.operator, '||'); eq(expr...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/parser.coffee
1
50
jashkenas/coffeescript:test/parser.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Parser // --------- test("operator precedence for logical operators", function() { var block, expression, source; source = `a or b and c`; ({ body: block } = CoffeeScript.nodes(source)); [expression] = block.expressions; eq(expression.first.base....
# Parser # --------- test "operator precedence for logical operators", -> source = ''' a or b and c ''' {body: block} = CoffeeScript.nodes source [expression] = block.expressions eq expression.first.base.value, 'a' eq expression.operator, '||' eq expression.second.first.base.value, 'b' eq expressio...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/parser.coffee
1
50
jashkenas/coffeescript:test/parser.coffee:1:completion
completion
# Parser # --------- test "operator precedence for logical operators", -> source = ''' a or b and c ''' {body: block} = CoffeeScript.nodes source [expression] = block.expressions eq expression.first.base.value, 'a' eq expression.operator, '||' eq expression.second.first.base.value, 'b' eq expressio...
eq expression.second.second.first.base.value, 'c' eq expression.second.second.operator, '&' eq expression.second.second.second.base.value, 'd' test "operator precedence for binary ? operator", -> source = ''' a ? b and c ''' {body: block} = CoffeeScript.nodes source [expression] = block.expressions ...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/parser.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/parser.coffee
1
50