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
linemanjs/lineman:config/plugins/jshint.coffee:1:raw_corpus
raw_corpus
module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true...
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/jshint.coffee
1
19
linemanjs/lineman:config/plugins/jshint.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options ...
module.exports = function(lineman) { return { config: { jshint: { files: ["<%= files.js.app %>"], options: { // enforcing options curly: true, eqeqeq: true, latedef: true, newcap: true, noarg: true, // relaxing options ...
CoffeeScript
JavaScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/jshint.coffee
1
19
linemanjs/lineman:config/plugins/jshint.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(lineman) { return { config: { jshint: { files: ["<%= files.js.app %>"], options: { // enforcing options curly: true, eqeqeq: true, latedef: true, newcap: true, ...
module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true...
JavaScript
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/jshint.coffee
1
19
linemanjs/lineman:config/plugins/jshint.coffee:1:completion
completion
module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true
newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true # environment/globals browser: true # Toggle on support for recent JavaScript esversion: 6
CoffeeScript
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/jshint.coffee
1
19
linemanjs/lineman:config/plugins/jshint.coffee:1:raw_corpus
raw_corpus
module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true...
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
933adfea4b35d36c79ddfacdfc6c2b5330dd6e81
1,168
https://github.com/linemanjs/lineman/blob/933adfea4b35d36c79ddfacdfc6c2b5330dd6e81/config/plugins/jshint.coffee
1
17
linemanjs/lineman:config/plugins/jshint.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options ...
module.exports = function(lineman) { return { config: { jshint: { files: ["<%= files.js.app %>"], options: { // enforcing options curly: true, eqeqeq: true, latedef: true, newcap: true, noarg: true, // relaxing options ...
CoffeeScript
JavaScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
933adfea4b35d36c79ddfacdfc6c2b5330dd6e81
1,168
https://github.com/linemanjs/lineman/blob/933adfea4b35d36c79ddfacdfc6c2b5330dd6e81/config/plugins/jshint.coffee
1
17
linemanjs/lineman:config/plugins/jshint.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(lineman) { return { config: { jshint: { files: ["<%= files.js.app %>"], options: { // enforcing options curly: true, eqeqeq: true, latedef: true, newcap: true, ...
module.exports = (lineman) -> config: jshint: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true...
JavaScript
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
933adfea4b35d36c79ddfacdfc6c2b5330dd6e81
1,168
https://github.com/linemanjs/lineman/blob/933adfea4b35d36c79ddfacdfc6c2b5330dd6e81/config/plugins/jshint.coffee
1
17
linemanjs/lineman:config/plugins/jshint.coffee:1:raw_corpus
raw_corpus
module.exports = (lineman) -> config: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true # environment/globals b...
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
94365fc4e4b804de8672585c254895fbd9cb514e
1,168
https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/jshint.coffee
1
16
linemanjs/lineman:config/plugins/jshint.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (lineman) -> config: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull:...
module.exports = function(lineman) { return { config: { files: ["<%= files.js.app %>"], options: { // enforcing options curly: true, eqeqeq: true, latedef: true, newcap: true, noarg: true, // relaxing options boss: true, eqnull: t...
CoffeeScript
JavaScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
94365fc4e4b804de8672585c254895fbd9cb514e
1,168
https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/jshint.coffee
1
16
linemanjs/lineman:config/plugins/jshint.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(lineman) { return { config: { files: ["<%= files.js.app %>"], options: { // enforcing options curly: true, eqeqeq: true, latedef: true, newcap: true, noarg: true, //...
module.exports = (lineman) -> config: files: ["<%= files.js.app %>"] options: # enforcing options curly: true eqeqeq: true latedef: true newcap: true noarg: true # relaxing options boss: true eqnull: true sub: true # environment/globals b...
JavaScript
CoffeeScript
linemanjs/lineman
config/plugins/jshint.coffee
MIT
94365fc4e4b804de8672585c254895fbd9cb514e
1,168
https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/jshint.coffee
1
16
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:raw_corpus
raw_corpus
Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChannels = @channelsInfo .map (ch) -> ch.id .filter...
CoffeeScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/cmyk.coffee
1
35
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChanne...
var Color; Color = require('../color.coffee'); module.exports = { setCmykChannels: function() { this.channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ]; if (this.channels() === 5) { return this.channelsInfo....
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/cmyk.coffee
1
35
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Color; Color = require('../color.coffee'); module.exports = { setCmykChannels: function() { this.channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ]; if (t...
Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChannels = @channelsInfo .map (ch) -> ch.id .filter...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/cmyk.coffee
1
35
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:completion
completion
Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChannels = @channelsInfo .map (ch) -> ch.id .filter...
for i in [0...@numPixels] c = m = y = k = 0 a = 255 for chan, index in cmykChannels val = @channelData[i + (@channelLength * index)] switch chan when -1 then a = val when 0 then c = val when 1 then m = val when 2 then y = val when 3 t...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/cmyk.coffee
1
35
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:raw_corpus
raw_corpus
Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChannels = @channelsInfo .map (ch) -> ch.id .filter...
CoffeeScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/image_modes/cmyk.coffee
1
33
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChanne...
var Color; Color = require('../color.coffee'); module.exports = { setCmykChannels: function() { this.channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ]; if (this.channels() === 5) { return this.channelsInfo....
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/image_modes/cmyk.coffee
1
33
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Color; Color = require('../color.coffee'); module.exports = { setCmykChannels: function() { this.channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ]; if (t...
Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChannels = @channelsInfo .map (ch) -> ch.id .filter...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/image_modes/cmyk.coffee
1
33
meltingice/psd.js:lib/psd/image_modes/cmyk.coffee:1:completion
completion
Color = require '../color.coffee' module.exports = setCmykChannels: -> @channelsInfo = [ { id: 0 }, { id: 1 }, { id: 2 }, { id: 3 } ] @channelsInfo.push { id: -1 } if @channels() is 5 combineCmykChannel: -> cmykChannels = @channelsInfo .map (ch) -> ch.id .filter...
for i in [0...@numPixels] c = m = y = k = 0 a = 255 for chan, index in cmykChannels val = @channelData[i + (@channelLength * index)] switch chan when -1 then a = val when 0 then c = val when 1 then m = val when 2 then y = val when 3 t...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/image_modes/cmyk.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/image_modes/cmyk.coffee
1
33
t9md/atom-vim-mode-plus:spec/operator-modifier-spec.coffee:1:raw_corpus
raw_corpus
{getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper' settings = require '../lib/settings' describe "Operator modifier", -> [set, ensure, editor, editorElement, vimState] = [] beforeEach -> getVimState (state, vim) -> vimState = state {editor, editorElement} = vimS...
CoffeeScript
t9md/atom-vim-mode-plus
spec/operator-modifier-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/operator-modifier-spec.coffee
1
50
t9md/atom-vim-mode-plus:spec/operator-modifier-spec.coffee:1:completion
completion
{getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper' settings = require '../lib/settings' describe "Operator modifier", -> [set, ensure, editor, editorElement, vimState] = [] beforeEach -> getVimState (state, vim) -> vimState = state {editor, editorElement} = vimS...
set cursor: [0, 1] ensure "d v j", text: """ 0BCDEF EFG """ describe "when target is characterwise", -> it "operate inclusively for exclusive target", -> set cursor: [0, 9] ensure "d v b", cursor: [0, 6] text_: """ ...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/operator-modifier-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/operator-modifier-spec.coffee
1
50
t9md/atom-vim-mode-plus:spec/operator-modifier-spec.coffee:1:raw_corpus
raw_corpus
{getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper' settings = require '../lib/settings' describe "Operator modifier", -> [set, ensure, keystroke, editor, editorElement, vimState] = [] beforeEach -> getVimState (state, vim) -> vimState = state {editor, editorElem...
CoffeeScript
t9md/atom-vim-mode-plus
spec/operator-modifier-spec.coffee
MIT
3d91feba5c1d9da1ea68dab348522ad539db69a7
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/3d91feba5c1d9da1ea68dab348522ad539db69a7/spec/operator-modifier-spec.coffee
1
50
t9md/atom-vim-mode-plus:spec/operator-modifier-spec.coffee:1:completion
completion
{getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper' settings = require '../lib/settings' describe "Operator modifier", -> [set, ensure, keystroke, editor, editorElement, vimState] = [] beforeEach -> getVimState (state, vim) -> vimState = state {editor, editorElem...
set cursor: [0, 1] ensure "d v j", text: """ 0BCDEF EFG """ describe "when target is characterwise", -> it "operate inclusively for exclusive target", -> set cursor: [0, 9] ensure "d v b", cursor: [0, 6] text_: """ ...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/operator-modifier-spec.coffee
MIT
3d91feba5c1d9da1ea68dab348522ad539db69a7
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/3d91feba5c1d9da1ea68dab348522ad539db69a7/spec/operator-modifier-spec.coffee
1
50
linemanjs/lineman:lib/cli/reads-configuration.coffee:1:raw_corpus
raw_corpus
_ = require('grunt').util._ module.exports = class ReadsConfiguration read: (propertyPath) -> config = require("#{process.cwd()}/config/application") value = if propertyPath? then @traverse(propertyPath.split("."), config) else config console.log(value) traverse: (paths, value) -> if !value? || pa...
CoffeeScript
linemanjs/lineman
lib/cli/reads-configuration.coffee
MIT
b7e1cedc26c4b92eeda745e2ba57b78e54368945
1,168
https://github.com/linemanjs/lineman/blob/b7e1cedc26c4b92eeda745e2ba57b78e54368945/lib/cli/reads-configuration.coffee
1
16
linemanjs/lineman:lib/cli/reads-configuration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require('grunt').util._ module.exports = class ReadsConfiguration read: (propertyPath) -> config = require("#{process.cwd()}/config/application") value = if propertyPath? then @traverse(propertyPath.split("."), config) else config console.log(v...
var ReadsConfiguration, _; _ = require('grunt').util._; module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = require(`${process.cwd()}/config/application`); value = propertyPath != null ? this.traverse(propertyPath.split("."), config) : config...
CoffeeScript
JavaScript
linemanjs/lineman
lib/cli/reads-configuration.coffee
MIT
b7e1cedc26c4b92eeda745e2ba57b78e54368945
1,168
https://github.com/linemanjs/lineman/blob/b7e1cedc26c4b92eeda745e2ba57b78e54368945/lib/cli/reads-configuration.coffee
1
16
linemanjs/lineman:lib/cli/reads-configuration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ReadsConfiguration, _; _ = require('grunt').util._; module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = require(`${process.cwd()}/config/application`); value = propertyPath != null ? ...
_ = require('grunt').util._ module.exports = class ReadsConfiguration read: (propertyPath) -> config = require("#{process.cwd()}/config/application") value = if propertyPath? then @traverse(propertyPath.split("."), config) else config console.log(value) traverse: (paths, value) -> if !value? || pa...
JavaScript
CoffeeScript
linemanjs/lineman
lib/cli/reads-configuration.coffee
MIT
b7e1cedc26c4b92eeda745e2ba57b78e54368945
1,168
https://github.com/linemanjs/lineman/blob/b7e1cedc26c4b92eeda745e2ba57b78e54368945/lib/cli/reads-configuration.coffee
1
16
linemanjs/lineman:lib/cli/reads-configuration.coffee:1:completion
completion
_ = require('grunt').util._ module.exports = class ReadsConfiguration read: (propertyPath) -> config = require("#{process.cwd()}/config/application") value = if propertyPath? then @traverse(propertyPath.split("."), config) else config console.log(value)
traverse: (paths, value) -> if !value? || paths.length == 0 value else if _(paths[0]).include("[") [path, prop, index] = paths[0].match(/(.*)\[(\d+)\]/) @traverse(_(paths).rest(), value[prop][index]) else @traverse(_(paths).rest(), value[paths[0]])
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/cli/reads-configuration.coffee
MIT
b7e1cedc26c4b92eeda745e2ba57b78e54368945
1,168
https://github.com/linemanjs/lineman/blob/b7e1cedc26c4b92eeda745e2ba57b78e54368945/lib/cli/reads-configuration.coffee
1
16
Pagedraw/pagedraw:src/migrations/upload_to_firebase.coffee:1:raw_corpus
raw_corpus
#!/usr/bin/env coffee fs = require 'fs' _l = require 'lodash' request = require 'request' StreamObject = require 'stream-json/utils/StreamObject' ProgressBar = require 'progress' # call with something like # cjsx src/migrations/upload_to_firebase.coffee "https://pagedraw-1226.firebaseio.com/pages" < docset.json # # T...
CoffeeScript
Pagedraw/pagedraw
src/migrations/upload_to_firebase.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/migrations/upload_to_firebase.coffee
1
46
Pagedraw/pagedraw:src/migrations/upload_to_firebase.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript #!/usr/bin/env coffee fs = require 'fs' _l = require 'lodash' request = require 'request' StreamObject = require 'stream-json/utils/StreamObject' ProgressBar = require 'progress' # call with something like # cjsx src/migrations/upload_to_firebase.coffee "https:...
//!/usr/bin/env coffee var ProgressBar, StreamObject, _l, bar, done, errors, fs, inputStream, n_docs, parser, request, root; fs = require('fs'); _l = require('lodash'); request = require('request'); StreamObject = require('stream-json/utils/StreamObject'); ProgressBar = require('progress'); // call with something...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/migrations/upload_to_firebase.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/migrations/upload_to_firebase.coffee
1
46
Pagedraw/pagedraw:src/migrations/upload_to_firebase.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript //!/usr/bin/env coffee var ProgressBar, StreamObject, _l, bar, done, errors, fs, inputStream, n_docs, parser, request, root; fs = require('fs'); _l = require('lodash'); request = require('request'); StreamObject = require('stream-json/utils/StreamObject'); Pro...
#!/usr/bin/env coffee fs = require 'fs' _l = require 'lodash' request = require 'request' StreamObject = require 'stream-json/utils/StreamObject' ProgressBar = require 'progress' # call with something like # cjsx src/migrations/upload_to_firebase.coffee "https://pagedraw-1226.firebaseio.com/pages" < docset.json # # T...
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/migrations/upload_to_firebase.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/migrations/upload_to_firebase.coffee
1
46
Pagedraw/pagedraw:src/migrations/upload_to_firebase.coffee:1:completion
completion
#!/usr/bin/env coffee fs = require 'fs' _l = require 'lodash' request = require 'request' StreamObject = require 'stream-json/utils/StreamObject' ProgressBar = require 'progress' # call with something like # cjsx src/migrations/upload_to_firebase.coffee "https://pagedraw-1226.firebaseio.com/pages" < docset.json # # T...
total: n_docs width: 50 }) done = 0 parser.output.on 'data', ({key, value}) => retry = -> request.put({url: "#{root}/#{key}.json", body: value, json: true}, (err) -> if err console.error("Error on #{key}") console.error(err) console.error("Ret...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/migrations/upload_to_firebase.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/migrations/upload_to_firebase.coffee
1
46
jianliaoim/talk-os:talk-web/client/actions/discover.coffee:1:raw_corpus
raw_corpus
dispatcher = require '../dispatcher' api = require '../network/api' # http://talk.ci/doc/restful/discover.urlmeta.html exports.urlmeta = (url, success, fail) -> config = queryParams: { url } api.discover.urlmeta.get config .then (resp) -> success? resp .catch (error) -> fail? error
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/discover.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/discover.coffee
1
13
jianliaoim/talk-os:talk-web/client/actions/discover.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript dispatcher = require '../dispatcher' api = require '../network/api' # http://talk.ci/doc/restful/discover.urlmeta.html exports.urlmeta = (url, success, fail) -> config = queryParams: { url } api.discover.urlmeta.get config .then (resp) -> success...
var api, dispatcher; dispatcher = require('../dispatcher'); api = require('../network/api'); // http://talk.ci/doc/restful/discover.urlmeta.html exports.urlmeta = function(url, success, fail) { var config; config = { queryParams: {url} }; return api.discover.urlmeta.get(config).then(function(resp) { ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/discover.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/discover.coffee
1
13
jianliaoim/talk-os:talk-web/client/actions/discover.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var api, dispatcher; dispatcher = require('../dispatcher'); api = require('../network/api'); // http://talk.ci/doc/restful/discover.urlmeta.html exports.urlmeta = function(url, success, fail) { var config; config = { queryParams: {url} }; return api....
dispatcher = require '../dispatcher' api = require '../network/api' # http://talk.ci/doc/restful/discover.urlmeta.html exports.urlmeta = (url, success, fail) -> config = queryParams: { url } api.discover.urlmeta.get config .then (resp) -> success? resp .catch (error) -> fail? error
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/discover.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/discover.coffee
1
13
jianliaoim/talk-os:talk-web/client/actions/discover.coffee:1:completion
completion
dispatcher = require '../dispatcher' api = require '../network/api' # http://talk.ci/doc/restful/discover.urlmeta.html exports.urlmeta = (url, success, fail) ->
config = queryParams: { url } api.discover.urlmeta.get config .then (resp) -> success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/discover.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/discover.coffee
1
13
linemanjs/lineman:config/application.coffee:1:raw_corpus
raw_corpus
# Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile = "package.json") -> pkg = grunt.file.readJSON(packageF...
CoffeeScript
linemanjs/lineman
config/application.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile ...
// Exports an object that defines // * all of the configuration needed by the projects' // * depended-on grunt tasks. var grunt, normalizePackage, normalizedPackageJson; grunt = require("./../lib/requires-grunt").require(); normalizePackage = require("normalize-package-data"); normalizedPackageJson = function(pac...
CoffeeScript
JavaScript
linemanjs/lineman
config/application.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Exports an object that defines // * all of the configuration needed by the projects' // * depended-on grunt tasks. var grunt, normalizePackage, normalizedPackageJson; grunt = require("./../lib/requires-grunt").require(); normalizePackage = require("normaliz...
# Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile = "package.json") -> pkg = grunt.file.readJSON(packageF...
JavaScript
CoffeeScript
linemanjs/lineman
config/application.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:raw_corpus
raw_corpus
# Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile = "package.json") -> pkg = grunt.file.readJSON(packageF...
CoffeeScript
linemanjs/lineman
config/application.coffee
MIT
cb848d104be19f2252f951056855b36531f0c71e
1,168
https://github.com/linemanjs/lineman/blob/cb848d104be19f2252f951056855b36531f0c71e/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile ...
// Exports an object that defines // * all of the configuration needed by the projects' // * depended-on grunt tasks. var grunt, normalizePackage, normalizedPackageJson; grunt = require("./../lib/requires-grunt").require(); normalizePackage = require("normalize-package-data"); normalizedPackageJson = function(pac...
CoffeeScript
JavaScript
linemanjs/lineman
config/application.coffee
MIT
cb848d104be19f2252f951056855b36531f0c71e
1,168
https://github.com/linemanjs/lineman/blob/cb848d104be19f2252f951056855b36531f0c71e/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Exports an object that defines // * all of the configuration needed by the projects' // * depended-on grunt tasks. var grunt, normalizePackage, normalizedPackageJson; grunt = require("./../lib/requires-grunt").require(); normalizePackage = require("normaliz...
# Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile = "package.json") -> pkg = grunt.file.readJSON(packageF...
JavaScript
CoffeeScript
linemanjs/lineman
config/application.coffee
MIT
cb848d104be19f2252f951056855b36531f0c71e
1,168
https://github.com/linemanjs/lineman/blob/cb848d104be19f2252f951056855b36531f0c71e/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:raw_corpus
raw_corpus
# Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile = "package.json") -> pkg = grunt.file.readJSON(packageF...
CoffeeScript
linemanjs/lineman
config/application.coffee
MIT
f2c60b03427cc11a3d86eb1e000a235e2396938a
1,168
https://github.com/linemanjs/lineman/blob/f2c60b03427cc11a3d86eb1e000a235e2396938a/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile ...
// Exports an object that defines // * all of the configuration needed by the projects' // * depended-on grunt tasks. var grunt, normalizePackage, normalizedPackageJson; grunt = require("./../lib/requires-grunt").require(); normalizePackage = require("normalize-package-data"); normalizedPackageJson = function(pac...
CoffeeScript
JavaScript
linemanjs/lineman
config/application.coffee
MIT
f2c60b03427cc11a3d86eb1e000a235e2396938a
1,168
https://github.com/linemanjs/lineman/blob/f2c60b03427cc11a3d86eb1e000a235e2396938a/config/application.coffee
1
41
linemanjs/lineman:config/application.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Exports an object that defines // * all of the configuration needed by the projects' // * depended-on grunt tasks. var grunt, normalizePackage, normalizedPackageJson; grunt = require("./../lib/requires-grunt").require(); normalizePackage = require("normaliz...
# Exports an object that defines # * all of the configuration needed by the projects' # * depended-on grunt tasks. # grunt = require("./../lib/requires-grunt").require() normalizePackage = require("normalize-package-data") normalizedPackageJson = (packageFile = "package.json") -> pkg = grunt.file.readJSON(packageF...
JavaScript
CoffeeScript
linemanjs/lineman
config/application.coffee
MIT
f2c60b03427cc11a3d86eb1e000a235e2396938a
1,168
https://github.com/linemanjs/lineman/blob/f2c60b03427cc11a3d86eb1e000a235e2396938a/config/application.coffee
1
41
CaryLandholt/AngularFun:tasks/copy.coffee:1:raw_corpus
raw_corpus
###global module, require### module.exports = (grunt) -> growl = require 'growl' path = require 'path' wrench = require 'wrench' grunt.registerMultiTask 'copy', 'Copies a directory', -> src = @file.src dest = @file.dest exists = path.existsSync src return if not exists srcFullPath = path.resolve src ...
CoffeeScript
CaryLandholt/AngularFun
tasks/copy.coffee
MIT
4d1f0e38f7f87729adcf7c80bc4242ce73098f46
672
https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/copy.coffee
1
21
CaryLandholt/AngularFun:tasks/copy.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ###global module, require### module.exports = (grunt) -> growl = require 'growl' path = require 'path' wrench = require 'wrench' grunt.registerMultiTask 'copy', 'Copies a directory', -> src = @file.src dest = @file.dest exists = path.existsSync src ...
/*global module, require*/ module.exports = function(grunt) { var growl, path, wrench; growl = require('growl'); path = require('path'); wrench = require('wrench'); return grunt.registerMultiTask('copy', 'Copies a directory', function() { var dest, destFullPath, exists, message, src, srcFullPath; src ...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
tasks/copy.coffee
MIT
4d1f0e38f7f87729adcf7c80bc4242ce73098f46
672
https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/copy.coffee
1
21
CaryLandholt/AngularFun:tasks/copy.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /*global module, require*/ module.exports = function(grunt) { var growl, path, wrench; growl = require('growl'); path = require('path'); wrench = require('wrench'); return grunt.registerMultiTask('copy', 'Copies a directory', function() { var dest, de...
###global module, require### module.exports = (grunt) -> growl = require 'growl' path = require 'path' wrench = require 'wrench' grunt.registerMultiTask 'copy', 'Copies a directory', -> src = @file.src dest = @file.dest exists = path.existsSync src return if not exists srcFullPath = path.resolve src ...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
tasks/copy.coffee
MIT
4d1f0e38f7f87729adcf7c80bc4242ce73098f46
672
https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/copy.coffee
1
21
CaryLandholt/AngularFun:tasks/copy.coffee:1:completion
completion
###global module, require### module.exports = (grunt) -> growl = require 'growl' path = require 'path' wrench = require 'wrench' grunt.registerMultiTask 'copy', 'Copies a directory', -> src = @file.src dest = @file.dest
exists = path.existsSync src return if not exists srcFullPath = path.resolve src destFullPath = path.resolve dest message = "Copied #{srcFullPath} to #{destFullPath}." wrench.copyDirSyncRecursive src, dest grunt.log.writeln message growl message, title: 'Directory Copied'
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
tasks/copy.coffee
MIT
4d1f0e38f7f87729adcf7c80bc4242ce73098f46
672
https://github.com/CaryLandholt/AngularFun/blob/4d1f0e38f7f87729adcf7c80bc4242ce73098f46/tasks/copy.coffee
1
21
Pagedraw/pagedraw:src/dynamicable.coffee:1:raw_corpus
raw_corpus
exports.Dynamicable = Dynamicable = (A) -> cls_name = "dyn(#{nameForType(A)})" memoize_on dynamicableCache, cls_name, -> Model.register cls_name, class DynamicableImpl extends GenericDynamicable # if isDynamic == true, code becomes the value that will replace staticValue # at com...
CoffeeScript
Pagedraw/pagedraw
src/dynamicable.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/dynamicable.coffee
23
72
Pagedraw/pagedraw:src/dynamicable.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.Dynamicable = Dynamicable = (A) -> cls_name = "dyn(#{nameForType(A)})" memoize_on dynamicableCache, cls_name, -> Model.register cls_name, class DynamicableImpl extends GenericDynamicable # if isDynamic == true, code becomes the...
var Dynamicable; exports.Dynamicable = Dynamicable = function(A) { var cls_name; cls_name = `dyn(${nameForType(A)})`; return memoize_on(dynamicableCache, cls_name, function() { var DynamicableImpl; return Model.register(cls_name, DynamicableImpl = (function() { class DynamicableImpl extends Generic...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/dynamicable.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/dynamicable.coffee
23
72
Pagedraw/pagedraw:src/dynamicable.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Dynamicable; exports.Dynamicable = Dynamicable = function(A) { var cls_name; cls_name = `dyn(${nameForType(A)})`; return memoize_on(dynamicableCache, cls_name, function() { var DynamicableImpl; return Model.register(cls_name, DynamicableImpl = (f...
exports.Dynamicable = Dynamicable = (A) -> cls_name = "dyn(#{nameForType(A)})" memoize_on dynamicableCache, cls_name, -> Model.register cls_name, class DynamicableImpl extends GenericDynamicable # if isDynamic == true, code becomes the value that will replace staticValue # at com...
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/dynamicable.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/dynamicable.coffee
23
72
Pagedraw/pagedraw:src/dynamicable.coffee:1:completion
completion
exports.Dynamicable = Dynamicable = (A) -> cls_name = "dyn(#{nameForType(A)})" memoize_on dynamicableCache, cls_name, -> Model.register cls_name, class DynamicableImpl extends GenericDynamicable # if isDynamic == true, code becomes the value that will replace staticValue # at com...
mapStatic: (fn) -> @derivedWith(staticValue: fn(@staticValue)) ## Utility functions for when our internal repr doesn't line up with the JS thing. # FIXME these need to support more than just JS and CJSX stringified: -> @derivedWith staticValue: String(@staticValue...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/dynamicable.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/dynamicable.coffee
23
72
Pagedraw/pagedraw:src/dynamicable.coffee:2:raw_corpus
raw_corpus
"" linearGradientCssTo: (endColor, direction) -> code_for_dynamicable = (dyn) -> if dyn.isDynamic then dyn.code else JSON.stringify(dyn.staticValue) blah = new (Dynamicable String)({ staticValue: "linear-gradient(#{direction.staticV...
CoffeeScript
Pagedraw/pagedraw
src/dynamicable.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/dynamicable.coffee
73
99
Pagedraw/pagedraw:src/dynamicable.coffee:2:completion
completion
"" linearGradientCssTo: (endColor, direction) -> code_for_dynamicable = (dyn) -> if dyn.isDynamic then dyn.code else JSON.stringify(dyn.staticValue) blah = new (Dynamicable String)({ staticValue: "linear-gradient(#{direction.staticV...
# FIXME technically the source is *both* [this, endColor] blah.source = this return blah # ANGULAR TODO: might be wrong getPropCode: (name, language) -> switch language when 'JSX', 'React', 'CJSX', 'TSX' then "this.props.#{name...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/dynamicable.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/dynamicable.coffee
73
99
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['broadcast', 'config', 'rece...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
d812c3887a7e3def92d7ff9b67f07c6a11859ae2
815
https://github.com/octoblu/meshblu/blob/d812c3887a7e3def92d7ff9b67f07c6a11859ae2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
d812c3887a7e3def92d7ff9b67f07c6a11859ae2
815
https://github.com/octoblu/meshblu/blob/d812c3887a7e3def92d7ff9b67f07c6a11859ae2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['broadcast', 'config', 'rece...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
d812c3887a7e3def92d7ff9b67f07c6a11859ae2
815
https://github.com/octoblu/meshblu/blob/d812c3887a7e3def92d7ff9b67f07c6a11859ae2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['broadcast', 'config', 'rece...
return callback error if error? simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription ...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
d812c3887a7e3def92d7ff9b67f07c6a11859ae2
815
https://github.com/octoblu/meshblu/blob/d812c3887a7e3def92d7ff9b67f07c6a11859ae2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['broadcast', 'config', 'rece...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
b992899d5a799b770eb68405873495ef029605d5
815
https://github.com/octoblu/meshblu/blob/b992899d5a799b770eb68405873495ef029605d5/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
b992899d5a799b770eb68405873495ef029605d5
815
https://github.com/octoblu/meshblu/blob/b992899d5a799b770eb68405873495ef029605d5/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['broadcast', 'config', 'rece...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
b992899d5a799b770eb68405873495ef029605d5
815
https://github.com/octoblu/meshblu/blob/b992899d5a799b770eb68405873495ef029605d5/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['broadcast', 'config', 'rece...
return callback error if error? simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription ...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
b992899d5a799b770eb68405873495ef029605d5
815
https://github.com/octoblu/meshblu/blob/b992899d5a799b770eb68405873495ef029605d5/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['event', 'broadcast'], param...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
659627504a311aa1d9c528ec7529a4cef3f7ada2
815
https://github.com/octoblu/meshblu/blob/659627504a311aa1d9c528ec7529a4cef3f7ada2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
659627504a311aa1d9c528ec7529a4cef3f7ada2
815
https://github.com/octoblu/meshblu/blob/659627504a311aa1d9c528ec7529a4cef3f7ada2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['event', 'broadcast'], param...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
659627504a311aa1d9c528ec7529a4cef3f7ada2
815
https://github.com/octoblu/meshblu/blob/659627504a311aa1d9c528ec7529a4cef3f7ada2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['event', 'broadcast'], param...
return callback error if error? simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription ...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
659627504a311aa1d9c528ec7529a4cef3f7ada2
815
https://github.com/octoblu/meshblu/blob/659627504a311aa1d9c528ec7529a4cef3f7ada2/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['event', 'broadcast'], param...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
34fcd9be8665d56fe7253a9824cea239276ea0fe
815
https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
34fcd9be8665d56fe7253a9824cea239276ea0fe
815
https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['event', 'broadcast'], param...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
34fcd9be8665d56fe7253a9824cea239276ea0fe
815
https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' unless _.contains ['event', 'broadcast'], param...
return callback error if error? simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription ...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
34fcd9be8665d56fe7253a9824cea239276ea0fe
815
https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/createSubscriptionIfAuthorized.coffee
1
22
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' return callback new Error('Type must be one of ...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
83945960cf060e0da7257f8f56c4304be422598b
815
https://github.com/octoblu/meshblu/blob/83945960cf060e0da7257f8f56c4304be422598b/lib/createSubscriptionIfAuthorized.coffee
1
21
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
83945960cf060e0da7257f8f56c4304be422598b
815
https://github.com/octoblu/meshblu/blob/83945960cf060e0da7257f8f56c4304be422598b/lib/createSubscriptionIfAuthorized.coffee
1
21
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' return callback new Error('Type must be one of ...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
83945960cf060e0da7257f8f56c4304be422598b
815
https://github.com/octoblu/meshblu/blob/83945960cf060e0da7257f8f56c4304be422598b/lib/createSubscriptionIfAuthorized.coffee
1
21
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' return callback new Error('Type must be one of ...
return callback error if error? simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription ...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
83945960cf060e0da7257f8f56c4304be422598b
815
https://github.com/octoblu/meshblu/blob/83945960cf060e0da7257f8f56c4304be422598b/lib/createSubscriptionIfAuthorized.coffee
1
21
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' getDevice params.uuid, (error, toDevice) => ...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
a9aac28463fe42fc81311742a93dd245ad47d0a7
815
https://github.com/octoblu/meshblu/blob/a9aac28463fe42fc81311742a93dd245ad47d0a7/lib/createSubscriptionIfAuthorized.coffee
1
19
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
a9aac28463fe42fc81311742a93dd245ad47d0a7
815
https://github.com/octoblu/meshblu/blob/a9aac28463fe42fc81311742a93dd245ad47d0a7/lib/createSubscriptionIfAuthorized.coffee
1
19
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' getDevice params.uuid, (error, toDevice) => ...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
a9aac28463fe42fc81311742a93dd245ad47d0a7
815
https://github.com/octoblu/meshblu/blob/a9aac28463fe42fc81311742a93dd245ad47d0a7/lib/createSubscriptionIfAuthorized.coffee
1
19
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' getDevice params.uuid, (error, toDevice) => ...
simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription = {subscriberUuid: params.uuid, emitt...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
a9aac28463fe42fc81311742a93dd245ad47d0a7
815
https://github.com/octoblu/meshblu/blob/a9aac28463fe42fc81311742a93dd245ad47d0a7/lib/createSubscriptionIfAuthorized.coffee
1
19
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' getDevice params.uuid, (error, toDevice) => ...
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
c7bf021cddec4c041efa7c0360dac2ffca80acfb
815
https://github.com/octoblu/meshblu/blob/c7bf021cddec4c041efa7c0360dac2ffca80acfb/lib/createSubscriptionIfAuthorized.coffee
1
20
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getD...
var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; database = (ref = dependencies.database) != null ? ref : requ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
c7bf021cddec4c041efa7c0360dac2ffca80acfb
815
https://github.com/octoblu/meshblu/blob/c7bf021cddec4c041efa7c0360dac2ffca80acfb/lib/createSubscriptionIfAuthorized.coffee
1
20
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var SimpleAuth, _, createSubscriptionIfAuthorized; _ = require('lodash'); SimpleAuth = require('./simpleAuth'); createSubscriptionIfAuthorized = function(authedDevice, params, callback = _.noop, dependencies = {}) { var database, getDevice, ref, ref1; databa...
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' getDevice params.uuid, (error, toDevice) => ...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
c7bf021cddec4c041efa7c0360dac2ffca80acfb
815
https://github.com/octoblu/meshblu/blob/c7bf021cddec4c041efa7c0360dac2ffca80acfb/lib/createSubscriptionIfAuthorized.coffee
1
20
octoblu/meshblu:lib/createSubscriptionIfAuthorized.coffee:1:completion
completion
_ = require 'lodash' SimpleAuth = require './simpleAuth' createSubscriptionIfAuthorized = (authedDevice, params, callback=_.noop, dependencies={}) -> database = dependencies.database ? require './database' getDevice = dependencies.getDevice ? require './getDevice' getDevice params.uuid, (error, toDevice) => ...
simpleAuth = new SimpleAuth() simpleAuth.canConfigure authedDevice, toDevice, (error, canConfigure) => return callback error if error? return callback new Error('Insufficient permissions to subscribe on behalf of that device') unless canConfigure subscription = {subscriberUuid: params.uuid, emitt...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createSubscriptionIfAuthorized.coffee
MIT
c7bf021cddec4c041efa7c0360dac2ffca80acfb
815
https://github.com/octoblu/meshblu/blob/c7bf021cddec4c041efa7c0360dac2ffca80acfb/lib/createSubscriptionIfAuthorized.coffee
1
20
meltingice/psd.js:lib/psd/resources/layer_links.coffee:1:raw_corpus
raw_corpus
module.exports = class LinkLayers id: 1026 name: 'LinkLayers' constructor: (@resource) -> @file = @resource.file @linkArray = [] parse: -> end = @file.tell() + @resource.length while end > @file.tell() @linkArray.push(@file.readShort()) #in the same order as layers @linkArray....
CoffeeScript
meltingice/psd.js
lib/psd/resources/layer_links.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resources/layer_links.coffee
1
17
meltingice/psd.js:lib/psd/resources/layer_links.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class LinkLayers id: 1026 name: 'LinkLayers' constructor: (@resource) -> @file = @resource.file @linkArray = [] parse: -> end = @file.tell() + @resource.length while end > @file.tell() @linkArray.push(@file.readS...
var LinkLayers; module.exports = LinkLayers = (function() { class LinkLayers { constructor(resource) { this.resource = resource; this.file = this.resource.file; this.linkArray = []; } parse() { var end; end = this.file.tell() + this.resource.length; while (end > this....
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/resources/layer_links.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resources/layer_links.coffee
1
17
meltingice/psd.js:lib/psd/resources/layer_links.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LinkLayers; module.exports = LinkLayers = (function() { class LinkLayers { constructor(resource) { this.resource = resource; this.file = this.resource.file; this.linkArray = []; } parse() { var end; end = this.file....
module.exports = class LinkLayers id: 1026 name: 'LinkLayers' constructor: (@resource) -> @file = @resource.file @linkArray = [] parse: -> end = @file.tell() + @resource.length while end > @file.tell() @linkArray.push(@file.readShort()) #in the same order as layers @linkArray....
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/resources/layer_links.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resources/layer_links.coffee
1
17
meltingice/psd.js:lib/psd/resources/layer_links.coffee:1:completion
completion
module.exports = class LinkLayers id: 1026 name: 'LinkLayers' constructor: (@resource) -> @file = @resource.file @linkArray = []
parse: -> end = @file.tell() + @resource.length while end > @file.tell() @linkArray.push(@file.readShort()) #in the same order as layers @linkArray.reverse();
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/resources/layer_links.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resources/layer_links.coffee
1
17
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:1:raw_corpus
raw_corpus
cx = require 'classnames' React = require 'react' format = require '../util/format' {div, span, a, i} = React.DOM T = React.PropTypes isFromTeambition = (url) -> url?.match(/\/\/www.teambition.com\/project/i) module.exports = React.createClass displayName: 'message-form-quote' propTypes: lang: T.string ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cx = require 'classnames' React = require 'react' format = require '../util/format' {div, span, a, i} = React.DOM T = React.PropTypes isFromTeambition = (url) -> url?.match(/\/\/www.teambition.com\/project/i) module.exports = React.createClass displayNam...
var React, T, a, cx, div, format, i, isFromTeambition, span; cx = require('classnames'); React = require('react'); format = require('../util/format'); ({div, span, a, i} = React.DOM); T = React.PropTypes; isFromTeambition = function(url) { return url != null ? url.match(/\/\/www.teambition.com\/project/i) : voi...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var React, T, a, cx, div, format, i, isFromTeambition, span; cx = require('classnames'); React = require('react'); format = require('../util/format'); ({div, span, a, i} = React.DOM); T = React.PropTypes; isFromTeambition = function(url) { return url != nul...
cx = require 'classnames' React = require 'react' format = require '../util/format' {div, span, a, i} = React.DOM T = React.PropTypes isFromTeambition = (url) -> url?.match(/\/\/www.teambition.com\/project/i) module.exports = React.createClass displayName: 'message-form-quote' propTypes: lang: T.string ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:1:completion
completion
cx = require 'classnames' React = require 'react' format = require '../util/format' {div, span, a, i} = React.DOM T = React.PropTypes isFromTeambition = (url) -> url?.match(/\/\/www.teambition.com\/project/i) module.exports = React.createClass displayName: 'message-form-quote' propTypes: lang: T.string ...
event.stopPropagation() window.open @props.attachment.data.redirectUrl, true else if @props.attachment.data.text event.stopPropagation() @props.onClick?() renderTitle: -> return if not @props.attachment.data.title if isFromTeambition(@props.attachment.data.redirectUrl) and @props.attach...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:2:raw_corpus
raw_corpus
render: -> color = @props.attachment.color or 'default' className = cx 'attachment-quote', "is-#{color}", 'is-clickable': @props.attachment.data.text or @props.attachment.data.redirectUrl div className: className, onClick: @onClick, @renderTitle() @renderContent() @renderPicture()
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
51
61
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript render: -> color = @props.attachment.color or 'default' className = cx 'attachment-quote', "is-#{color}", 'is-clickable': @props.attachment.data.text or @props.attachment.data.redirectUrl div className: className, onClick: @onClick, @ren...
({ render: function() { var className, color; color = this.props.attachment.color || 'default'; className = cx('attachment-quote', `is-${color}`, { 'is-clickable': this.props.attachment.data.text || this.props.attachment.data.redirectUrl }); return div({ className: className, onC...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
51
61
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ render: function() { var className, color; color = this.props.attachment.color || 'default'; className = cx('attachment-quote', `is-${color}`, { 'is-clickable': this.props.attachment.data.text || this.props.attachment.data.redirectUrl });...
render: -> color = @props.attachment.color or 'default' className = cx 'attachment-quote', "is-#{color}", 'is-clickable': @props.attachment.data.text or @props.attachment.data.redirectUrl div className: className, onClick: @onClick, @renderTitle() @renderContent() @renderPicture()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
51
61
jianliaoim/talk-os:talk-web/client/module/message-rich-quote.coffee:2:completion
completion
render: -> color = @props.attachment.color or 'default' className = cx 'attachment-quote', "is-#{color}", 'is-clickable': @props.attachment.data.text or @props.attachment.data.redirectUrl
div className: className, onClick: @onClick, @renderTitle() @renderContent() @renderPicture()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-quote.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-quote.coffee
51
61
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:1:raw_corpus
raw_corpus
func: -> [a, b]: [b, a] ok func().join(' ') is '-1 -2'
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
10
13
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:1:completion
completion
func: -> [a, b]: [b, a]
ok func().join(' ') is '-1 -2'
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
10
13
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:2:raw_corpus
raw_corpus
noop: -> noop [a,b]: [c,d]: [1,2] ok a is 1 and b is 2 # Array destructuring, including splats. arr: [1, 2, 3] [a, b, c]: arr ok a is 1 ok b is 2 ok c is 3 [x,y...,z]: [1,2,3,4,5] ok x is 1 ok y.length is 3 ok z is 5 [x, [y, mids..., last], z..., end]: [1, [10, 20, 30, 40], 2,3,4, 5] ok x is 1 ok y is 10 ok m...
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
15
64
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:2:completion
completion
noop: -> noop [a,b]: [c,d]: [1,2] ok a is 1 and b is 2 # Array destructuring, including splats. arr: [1, 2, 3] [a, b, c]: arr ok a is 1 ok b is 2 ok c is 3 [x,y...,z]: [1,2,3,4,5] ok x is 1 ok y.length is 3 ok z is 5 [x, [y, mids..., last], z..., end]: [1, [10, 20, 30, 40], 2,3,4, 5] ok x is 1
ok y is 10 ok mids.length is 2 and mids[1] is 30 ok last is 40 ok z.length is 3 and z[2] is 4 ok end is 5 # Object destructuring. obj: {x: 10, y: 20, z: 30} {x: a, y: b, z: c}: obj ok a is 10 ok b is 20 ok c is 30 person: { name: "Moe" family: { 'elder-brother': { addresses: [ "first" ...
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
15
64
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:3:raw_corpus
raw_corpus
} ] } } } {name: a, family: {'elder-brother': {addresses: [one, {city: b}]}}}: person ok a is "Moe" ok b is "Moquasset NY, 10021" test: { person: { address: [ "------" "Street 101" "Apt 101" "City 101" ] } } {person: {address: [ignore, addr...]}}: test ok addr.join('...
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
65
114
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:3:completion
completion
} ] } } } {name: a, family: {'elder-brother': {addresses: [one, {city: b}]}}}: person ok a is "Moe" ok b is "Moquasset NY, 10021" test: { person: { address: [ "------" "Street 101" "Apt 101" "City 101" ] } } {person: {address: [ignore, addr...]}}: test ok addr.join('...
# Pattern matching against an expression. [a, b]: if true then [2, 1] else [1, 2] ok a is 2 ok b is 1 # Pattern matching with object shorthand. person: { name: "Bob" age: 26 dogs: ["Prince", "Bowie"] } {name, age, dogs: [first, second]}: person ok name is "Bob" ok age is 26 ok first is "Prince" ok se...
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
65
114
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee:4:raw_corpus
raw_corpus
persons: { George: { name: "Bob" }, Bob: { name: "Alice" } Christopher: { name: "Stan" } } join1: "$key: $name" for key, { name } of persons deepEqual join1, ["George: Bob", "Bob: Alice", "Christopher: Stan"] persons: [ { name: "Bob", parent: { name: "George" } }, { name: "Alice", parent: { name: "Bob" } }...
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_pattern_matching.coffee
115
139