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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
maxwells/bootstrap-tags:src/templates/3/input.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var base;
window.Tags || (window.Tags = {});
Tags.Templates || (Tags.Templates = {});
(base = Tags.Templates)["3"] || (base["3"] = {});
Tags.Templates["3"].input = function(options = {}) {
return "<input type='text' class='form-control tags-input' />";
};
``` | window.Tags ||= {}
Tags.Templates ||= {}
Tags.Templates["3"] ||= {}
Tags.Templates["3"].input = (options = {}) ->
"<input type='text' class='form-control tags-input' />" | JavaScript | CoffeeScript | maxwells/bootstrap-tags | src/templates/3/input.coffee | MIT | 23509c0e8bcb2e9bf7a4e5558dfbca7fc5c353b1 | 543 | https://github.com/maxwells/bootstrap-tags/blob/23509c0e8bcb2e9bf7a4e5558dfbca7fc5c353b1/src/templates/3/input.coffee | 1 | 5 |
maxwells/bootstrap-tags:src/templates/3/input.coffee:1:completion | completion | window.Tags ||= {}
Tags.Templates ||= {} | Tags.Templates["3"] ||= {}
Tags.Templates["3"].input = (options = {}) ->
"<input type='text' class='form-control tags-input' />" | CoffeeScript | CoffeeScript | maxwells/bootstrap-tags | src/templates/3/input.coffee | MIT | 23509c0e8bcb2e9bf7a4e5558dfbca7fc5c353b1 | 543 | https://github.com/maxwells/bootstrap-tags/blob/23509c0e8bcb2e9bf7a4e5558dfbca7fc5c353b1/src/templates/3/input.coffee | 1 | 5 |
lmaccherone/node-localstorage:test/recursive-mkdir-test.coffee:1:raw_corpus | raw_corpus | {LocalStorage} = require('../')
fs = require('fs')
path = require('path')
semver = require('semver')
tape = require('tape')
tape('recursive mkdir', (test) =>
non_existent_directory = path.resolve('./does_not_exist');
test.notOk(fs.existsSync(non_existent_directory), 'directory does not exist');
non_existent_subd... | CoffeeScript | lmaccherone/node-localstorage | test/recursive-mkdir-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/recursive-mkdir-test.coffee | 1 | 26 | ||
lmaccherone/node-localstorage:test/recursive-mkdir-test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{LocalStorage} = require('../')
fs = require('fs')
path = require('path')
semver = require('semver')
tape = require('tape')
tape('recursive mkdir', (test) =>
non_existent_directory = path.resolve('./does_not_exist');
test.notOk(fs.existsSync(non_existent_dir... | var LocalStorage, fs, path, semver, tape;
({LocalStorage} = require('../'));
fs = require('fs');
path = require('path');
semver = require('semver');
tape = require('tape');
tape('recursive mkdir', (test) => {
var f, ls1, non_existent_directory, non_existent_subdirectory;
non_existent_directory = path.resolve(... | CoffeeScript | JavaScript | lmaccherone/node-localstorage | test/recursive-mkdir-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/recursive-mkdir-test.coffee | 1 | 26 |
lmaccherone/node-localstorage:test/recursive-mkdir-test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage, fs, path, semver, tape;
({LocalStorage} = require('../'));
fs = require('fs');
path = require('path');
semver = require('semver');
tape = require('tape');
tape('recursive mkdir', (test) => {
var f, ls1, non_existent_directory, non_existent... | {LocalStorage} = require('../')
fs = require('fs')
path = require('path')
semver = require('semver')
tape = require('tape')
tape('recursive mkdir', (test) =>
non_existent_directory = path.resolve('./does_not_exist');
test.notOk(fs.existsSync(non_existent_directory), 'directory does not exist');
non_existent_subd... | JavaScript | CoffeeScript | lmaccherone/node-localstorage | test/recursive-mkdir-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/recursive-mkdir-test.coffee | 1 | 26 |
lmaccherone/node-localstorage:test/recursive-mkdir-test.coffee:1:completion | completion | {LocalStorage} = require('../')
fs = require('fs')
path = require('path')
semver = require('semver')
tape = require('tape')
tape('recursive mkdir', (test) =>
non_existent_directory = path.resolve('./does_not_exist');
test.notOk(fs.existsSync(non_existent_directory), 'directory does not exist');
non_existent_subd... | ls1 = new LocalStorage(non_existent_subdirectory);
test.ok(fs.existsSync(non_existent_directory), 'directory now exists');
test.ok(fs.existsSync(non_existent_subdirectory), 'subdirectory now exists');
ls1._deleteLocation()
test.notOk(fs.existsSync(non_existent_subdirectory), 'subdirectory has been remov... | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | test/recursive-mkdir-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/recursive-mkdir-test.coffee | 1 | 26 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:raw_corpus | raw_corpus | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs, indent_size, indent_ch... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/nginx-beautify.coffee | 1 | 36 | ||
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size",... | "use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, reject) {
var Beautify, error, instance;
... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/nginx-beautify.coffee | 1 | 36 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, re... | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs, indent_size, indent_ch... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/nginx-beautify.coffee | 1 | 36 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:completion | completion | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs, indent_size, indent_ch... | else
0
]
dontJoinCurlyBracet: true
}
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beautify = require("nginxbeautify")
instance = new Beautify(options)
try
resolve(instance.parse(text))
catch error
# Error oc... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/nginx-beautify.coffee | 1 | 36 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:raw_corpus | raw_corpus | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
isPreInstalled: false
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 7e958d0db0d4e6256308a509dcc6a2fa8c457aeb | 1,503 | https://github.com/Glavin001/atom-beautify/blob/7e958d0db0d4e6256308a509dcc6a2fa8c457aeb/src/beautifiers/nginx-beautify.coffee | 1 | 37 | ||
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
isPreInstalled: false
options: {
Nginx: {
spaces: ["indent_wi... | "use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, reject) {
var Beautify, error, instance;
... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 7e958d0db0d4e6256308a509dcc6a2fa8c457aeb | 1,503 | https://github.com/Glavin001/atom-beautify/blob/7e958d0db0d4e6256308a509dcc6a2fa8c457aeb/src/beautifiers/nginx-beautify.coffee | 1 | 37 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, re... | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
isPreInstalled: false
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 7e958d0db0d4e6256308a509dcc6a2fa8c457aeb | 1,503 | https://github.com/Glavin001/atom-beautify/blob/7e958d0db0d4e6256308a509dcc6a2fa8c457aeb/src/beautifiers/nginx-beautify.coffee | 1 | 37 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:completion | completion | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
isPreInstalled: false
options: {
Nginx: {
spaces: ["indent_with_tabs", "indent_size", "indent_char", (indent_with_tabs... | indent_size
else
0
]
dontJoinCurlyBracet: true
}
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beautify = require("nginxbeautify")
instance = new Beautify(options)
try
resolve(instance.parse(text))
catch erro... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 7e958d0db0d4e6256308a509dcc6a2fa8c457aeb | 1,503 | https://github.com/Glavin001/atom-beautify/blob/7e958d0db0d4e6256308a509dcc6a2fa8c457aeb/src/beautifiers/nginx-beautify.coffee | 1 | 37 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:raw_corpus | raw_corpus | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beaut... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 5a4349d486c1b901cbc486a50c5860a9964defd0 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/5a4349d486c1b901cbc486a50c5860a9964defd0/src/beautifiers/nginx-beautify.coffee | 1 | 22 | ||
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
}
beautify: (text, language, options) ->
... | "use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, reject) {
var Beautify, error, instance;
... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 5a4349d486c1b901cbc486a50c5860a9964defd0 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/5a4349d486c1b901cbc486a50c5860a9964defd0/src/beautifiers/nginx-beautify.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, re... | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beaut... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 5a4349d486c1b901cbc486a50c5860a9964defd0 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/5a4349d486c1b901cbc486a50c5860a9964defd0/src/beautifiers/nginx-beautify.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:completion | completion | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
} | beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beautify = require("nginxbeautify")
instance = new Beautify(options)
try
resolve(instance.parse(text))
catch error
# Error occurred
reject(error)
) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | 5a4349d486c1b901cbc486a50c5860a9964defd0 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/5a4349d486c1b901cbc486a50c5860a9964defd0/src/beautifiers/nginx-beautify.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:raw_corpus | raw_corpus | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beaut... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | afee0a47c9ff662203ea0f12725706b2372b3bcc | 1,503 | https://github.com/Glavin001/atom-beautify/blob/afee0a47c9ff662203ea0f12725706b2372b3bcc/src/beautifiers/nginx-beautify.coffee | 1 | 22 | ||
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
}
beautify: (text, language, options) ->
... | "use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, reject) {
var Beautify, error, instance;
... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | afee0a47c9ff662203ea0f12725706b2372b3bcc | 1,503 | https://github.com/Glavin001/atom-beautify/blob/afee0a47c9ff662203ea0f12725706b2372b3bcc/src/beautifiers/nginx-beautify.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, NginxBeautify;
Beautifier = require('./beautifier');
module.exports = NginxBeautify = (function() {
class NginxBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, re... | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beaut... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | afee0a47c9ff662203ea0f12725706b2372b3bcc | 1,503 | https://github.com/Glavin001/atom-beautify/blob/afee0a47c9ff662203ea0f12725706b2372b3bcc/src/beautifiers/nginx-beautify.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/nginx-beautify.coffee:1:completion | completion | "use strict"
Beautifier = require('./beautifier')
module.exports = class NginxBeautify extends Beautifier
name: "Nginx Beautify"
link: "https://github.com/denysvitali/nginxbeautify"
options: {
Nginx: true
} | beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
Beautify = require("nginxbeautify")
instance = new Beautify(options);
try
resolve(instance.parse(text))
catch error
# Error occurred
reject(error)
) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/nginx-beautify.coffee | MIT | afee0a47c9ff662203ea0f12725706b2372b3bcc | 1,503 | https://github.com/Glavin001/atom-beautify/blob/afee0a47c9ff662203ea0f12725706b2372b3bcc/src/beautifiers/nginx-beautify.coffee | 1 | 22 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
updateIfAuthorized = (fromDevice, query, params, options, callback, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uuid: query.uuid
device.fetch (error, toDevice) =>
... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 19eb3aa62745bef5b23eb9bbac006063fdf2fd8e | 815 | https://github.com/octoblu/meshblu/blob/19eb3aa62745bef5b23eb9bbac006063fdf2fd8e/lib/updateIfAuthorized.coffee | 1 | 24 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
updateIfAuthorized = (fromDevice, query, params, options, callback, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Dev... | var _, updateIfAuthorized;
_ = require('lodash');
updateIfAuthorized = function(fromDevice, query, params, options, callback, dependencies = {}) {
var Device, device, ref, ref1, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl');
Device = (ref1 = dependen... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 19eb3aa62745bef5b23eb9bbac006063fdf2fd8e | 815 | https://github.com/octoblu/meshblu/blob/19eb3aa62745bef5b23eb9bbac006063fdf2fd8e/lib/updateIfAuthorized.coffee | 1 | 24 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, updateIfAuthorized;
_ = require('lodash');
updateIfAuthorized = function(fromDevice, query, params, options, callback, dependencies = {}) {
var Device, device, ref, ref1, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : re... | _ = require 'lodash'
updateIfAuthorized = (fromDevice, query, params, options, callback, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uuid: query.uuid
device.fetch (error, toDevice) =>
... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 19eb3aa62745bef5b23eb9bbac006063fdf2fd8e | 815 | https://github.com/octoblu/meshblu/blob/19eb3aa62745bef5b23eb9bbac006063fdf2fd8e/lib/updateIfAuthorized.coffee | 1 | 24 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
updateIfAuthorized = (fromDevice, query, params, options, callback, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uuid: query.uuid
device.fetch (error, toDevice) =>
... | device.update params, options, (error) =>
return callback error if error?
callback()
#Figure it out. I dare you!
module.exports = module.exports = (fromDevice, query, params, rest...) ->
[callback, dependencies] = rest
[options, callback, dependencies] = rest if _.isPlainObject callback
options ?... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 19eb3aa62745bef5b23eb9bbac006063fdf2fd8e | 815 | https://github.com/octoblu/meshblu/blob/19eb3aa62745bef5b23eb9bbac006063fdf2fd8e/lib/updateIfAuthorized.coffee | 1 | 24 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uuid: query.uuid
device.fetch (error, toDevice) =>
se... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/updateIfAuthorized.coffee | 1 | 15 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uu... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, device, ref, ref1, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl');
Device = (ref1 = dependencies.Device) != null ? r... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/updateIfAuthorized.coffee | 1 | 15 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, device, ref, ref1, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uuid: query.uuid
device.fetch (error, toDevice) =>
se... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/updateIfAuthorized.coffee | 1 | 15 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
Device = dependencies.Device ? require('./models/device')
device = new Device uuid: query.uuid | device.fetch (error, toDevice) =>
securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
device.update params, (error) =>
return cal... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/updateIfAuthorized.coffee | 1 | 15 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 120edc46afda165ae582cb89c9262c0a80ee7b22 | 815 | https://github.com/octoblu/meshblu/blob/120edc46afda165ae582cb89c9262c0a80ee7b22/lib/updateIfAuthorized.coffee | 1 | 20 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, ref4, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl')... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 120edc46afda165ae582cb89c9262c0a80ee7b22 | 815 | https://github.com/octoblu/meshblu/blob/120edc46afda165ae582cb89c9262c0a80ee7b22/lib/updateIfAuthorized.coffee | 1 | 20 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, ref4, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.sec... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 120edc46afda165ae582cb89c9262c0a80ee7b22 | 815 | https://github.com/octoblu/meshblu/blob/120edc46afda165ae582cb89c9262c0a80ee7b22/lib/updateIfAuthorized.coffee | 1 | 20 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
clearCache toDevice.uuid, =>
newDevice = new Device(uuid: toDevice.uuid)
... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 120edc46afda165ae582cb89c9262c0a80ee7b22 | 815 | https://github.com/octoblu/meshblu/blob/120edc46afda165ae582cb89c9262c0a80ee7b22/lib/updateIfAuthorized.coffee | 1 | 20 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/lib/updateIfAuthorized.coffee | 1 | 18 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, ref4, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl')... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/lib/updateIfAuthorized.coffee | 1 | 18 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, ref4, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.sec... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/lib/updateIfAuthorized.coffee | 1 | 18 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | getDevice query.uuid, (error, toDevice) =>
securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
clearCache toDevice.uuid, =>
newDe... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/lib/updateIfAuthorized.coffee | 1 | 18 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 5b4e756d4d3449079e0268bf84f693a05ef4ff2e | 815 | https://github.com/octoblu/meshblu/blob/5b4e756d4d3449079e0268bf84f693a05ef4ff2e/lib/updateIfAuthorized.coffee | 1 | 19 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, ref4, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl')... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 5b4e756d4d3449079e0268bf84f693a05ef4ff2e | 815 | https://github.com/octoblu/meshblu/blob/5b4e756d4d3449079e0268bf84f693a05ef4ff2e/lib/updateIfAuthorized.coffee | 1 | 19 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, ref4, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.sec... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 5b4e756d4d3449079e0268bf84f693a05ef4ff2e | 815 | https://github.com/octoblu/meshblu/blob/5b4e756d4d3449079e0268bf84f693a05ef4ff2e/lib/updateIfAuthorized.coffee | 1 | 19 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | getDevice query.uuid, (error, toDevice) =>
securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
clearCache toDevice.uuid
newDevice ... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 5b4e756d4d3449079e0268bf84f693a05ef4ff2e | 815 | https://github.com/octoblu/meshblu/blob/5b4e756d4d3449079e0268bf84f693a05ef4ff2e/lib/updateIfAuthorized.coffee | 1 | 19 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0 | 815 | https://github.com/octoblu/meshblu/blob/67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0/lib/updateIfAuthorized.coffee | 1 | 17 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl');
getDevice = (ref1 = de... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0 | 815 | https://github.com/octoblu/meshblu/blob/67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0/lib/updateIfAuthorized.coffee | 1 | 17 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, clearCache, getDevice, ref, ref1, ref2, ref3, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref :... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0 | 815 | https://github.com/octoblu/meshblu/blob/67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0/lib/updateIfAuthorized.coffee | 1 | 17 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
clearCache = depen... | getDevice query.uuid, (error, toDevice) =>
securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
clearCache toDevice.uuid
newDevice ... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0 | 815 | https://github.com/octoblu/meshblu/blob/67fe79bdd62b3bd1f5e75354c2af9a59dfbf85b0/lib/updateIfAuthorized.coffee | 1 | 17 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
getDevice query.u... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | b06a489701bfd2bbfa77c9e51738b580c3d5a880 | 815 | https://github.com/octoblu/meshblu/blob/b06a489701bfd2bbfa77c9e51738b580c3d5a880/lib/updateIfAuthorized.coffee | 1 | 13 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, getDevice, ref, ref1, ref2, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl');
getDevice = (ref1 = dependencies.getDevi... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | b06a489701bfd2bbfa77c9e51738b580c3d5a880 | 815 | https://github.com/octoblu/meshblu/blob/b06a489701bfd2bbfa77c9e51738b580c3d5a880/lib/updateIfAuthorized.coffee | 1 | 13 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, getDevice, ref, ref1, ref2, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSec... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device')
getDevice query.u... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | b06a489701bfd2bbfa77c9e51738b580c3d5a880 | 815 | https://github.com/octoblu/meshblu/blob/b06a489701bfd2bbfa77c9e51738b580c3d5a880/lib/updateIfAuthorized.coffee | 1 | 13 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/device') | getDevice query.uuid, (error, toDevice) =>
securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
newDevice = new Device(uuid: toDevice.uuid)... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | b06a489701bfd2bbfa77c9e51738b580c3d5a880 | 815 | https://github.com/octoblu/meshblu/blob/b06a489701bfd2bbfa77c9e51738b580c3d5a880/lib/updateIfAuthorized.coffee | 1 | 13 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/Device')
getDevice query.u... | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 3c8a4955df38165b1bbcd1d261cd6e3fad96245f | 815 | https://github.com/octoblu/meshblu/blob/3c8a4955df38165b1bbcd1d261cd6e3fad96245f/lib/updateIfAuthorized.coffee | 1 | 13 | ||
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies... | var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, getDevice, ref, ref1, ref2, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurityImpl');
getDevice = (ref1 = dependencies.getDevi... | CoffeeScript | JavaScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 3c8a4955df38165b1bbcd1d261cd6e3fad96245f | 815 | https://github.com/octoblu/meshblu/blob/3c8a4955df38165b1bbcd1d261cd6e3fad96245f/lib/updateIfAuthorized.coffee | 1 | 13 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(fromDevice, query, params, callback = _.noop, dependencies = {}) {
var Device, getDevice, ref, ref1, ref2, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSec... | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/Device')
getDevice query.u... | JavaScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 3c8a4955df38165b1bbcd1d261cd6e3fad96245f | 815 | https://github.com/octoblu/meshblu/blob/3c8a4955df38165b1bbcd1d261cd6e3fad96245f/lib/updateIfAuthorized.coffee | 1 | 13 |
octoblu/meshblu:lib/updateIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (fromDevice, query, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require('./getSecurityImpl')
getDevice = dependencies.getDevice ? require('./getDevice')
Device = dependencies.Device ? require('./models/Device') | getDevice query.uuid, (error, toDevice) =>
securityImpl.canConfigure fromDevice, toDevice, query, (error, permission) =>
return callback error if error?
return callback new Error('Device does not have sufficient permissions for update') unless permission
newDevice = new Device(uuid: toDevice.uuid)... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/updateIfAuthorized.coffee | MIT | 3c8a4955df38165b1bbcd1d261cd6e3fad96245f | 815 | https://github.com/octoblu/meshblu/blob/3c8a4955df38165b1bbcd1d261cd6e3fad96245f/lib/updateIfAuthorized.coffee | 1 | 13 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | ad962edee28ac53c2d72aeb3a2c0bdef94432670 | 5,250 | https://github.com/ichord/At.js/blob/ad962edee28ac53c2d72aeb3a2c0bdef94432670/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.auth... | CoffeeScript | JavaScript | ichord/At.js | Gruntfile.coffee | MIT | ad962edee28ac53c2d72aeb3a2c0bdef94432670 | 5,250 | https://github.com/ichord/At.js/blob/ad962edee28ac53c2d72aeb3a2c0bdef94432670/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | JavaScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | ad962edee28ac53c2d72aeb3a2c0bdef94432670 | 5,250 | https://github.com/ichord/At.js/blob/ad962edee28ac53c2d72aeb3a2c0bdef94432670/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | 'src/editableController.coffee',
'src/model.coffee',
'src/view.coffee',
'src/default.coffee',
'src/api.coffee'
]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: ... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | ad962edee28ac53c2d72aeb3a2c0bdef94432670 | 5,250 | https://github.com/ichord/At.js/blob/ad962edee28ac53c2d72aeb3a2c0bdef94432670/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 4c1048b7673b48ca6d458aea1f916c1acf29a72b | 5,250 | https://github.com/ichord/At.js/blob/4c1048b7673b48ca6d458aea1f916c1acf29a72b/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.auth... | CoffeeScript | JavaScript | ichord/At.js | Gruntfile.coffee | MIT | 4c1048b7673b48ca6d458aea1f916c1acf29a72b | 5,250 | https://github.com/ichord/At.js/blob/4c1048b7673b48ca6d458aea1f916c1acf29a72b/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | JavaScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 4c1048b7673b48ca6d458aea1f916c1acf29a72b | 5,250 | https://github.com/ichord/At.js/blob/4c1048b7673b48ca6d458aea1f916c1acf29a72b/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | 'src/editableController.coffee',
'src/model.coffee',
'src/view.coffee',
'src/default.coffee',
'src/api.coffee'
]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: ... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 4c1048b7673b48ca6d458aea1f916c1acf29a72b | 5,250 | https://github.com/ichord/At.js/blob/4c1048b7673b48ca6d458aea1f916c1acf29a72b/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0 | 5,250 | https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.auth... | CoffeeScript | JavaScript | ichord/At.js | Gruntfile.coffee | MIT | b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0 | 5,250 | https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | JavaScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0 | 5,250 | https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | 'src/editableController.coffee',
'src/model.coffee',
'src/view.coffee',
'src/default.coffee',
'src/api.coffee'
]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: ... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0 | 5,250 | https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 8d2768587cd8032017b7fe0f0d494969cfb5c53d | 5,250 | https://github.com/ichord/At.js/blob/8d2768587cd8032017b7fe0f0d494969cfb5c53d/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.auth... | CoffeeScript | JavaScript | ichord/At.js | Gruntfile.coffee | MIT | 8d2768587cd8032017b7fe0f0d494969cfb5c53d | 5,250 | https://github.com/ichord/At.js/blob/8d2768587cd8032017b7fe0f0d494969cfb5c53d/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
name: 'jquery.atwho',
meta: {
banner: `/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | JavaScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 8d2768587cd8032017b7fe0f0d494969cfb5c53d | 5,250 | https://github.com/ichord/At.js/blob/8d2768587cd8032017b7fe0f0d494969cfb5c53d/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner: """
/*! <%= name %> - v<%= pkg.version %> %>
* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %> <<%=pkg.author... | 'src/default.coffee',
'src/api.coffee'
]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: 'spec/build/javascripts',
},
src: 'spec/spec_helper.coffee', dest: 'spec/build/spec_help... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 8d2768587cd8032017b7fe0f0d494969cfb5c53d | 5,250 | https://github.com/ichord/At.js/blob/8d2768587cd8032017b7fe0f0d494969cfb5c53d/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner:
"/*! <%= name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yy... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 5174f2335ffb8a33f13da1e2444c9293e72551c5 | 5,250 | https://github.com/ichord/At.js/blob/5174f2335ffb8a33f13da1e2444c9293e72551c5/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: 'jquery.atwho'
meta:
banner:
"/*! <%= name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yy... | 'src/api.coffee'
]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: 'spec/build/javascripts',
},
src: 'spec/spec_helper.coffee', dest: 'spec/build/spec_helper.js'
]
copy:
... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 5174f2335ffb8a33f13da1e2444c9293e72551c5 | 5,250 | https://github.com/ichord/At.js/blob/5174f2335ffb8a33f13da1e2444c9293e72551c5/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner:
"/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.auth... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 7af55aabb19c2beb7d376123a9b89caa4b901084 | 5,250 | https://github.com/ichord/At.js/blob/7af55aabb19c2beb7d376123a9b89caa4b901084/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner:
"/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyrig... | module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: "/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" + "* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.... | CoffeeScript | JavaScript | ichord/At.js | Gruntfile.coffee | MIT | 7af55aabb19c2beb7d376123a9b89caa4b901084 | 5,250 | https://github.com/ichord/At.js/blob/7af55aabb19c2beb7d376123a9b89caa4b901084/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: "/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" + "* Copyr... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner:
"/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.auth... | JavaScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 7af55aabb19c2beb7d376123a9b89caa4b901084 | 5,250 | https://github.com/ichord/At.js/blob/7af55aabb19c2beb7d376123a9b89caa4b901084/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner:
"/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.auth... | ]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: 'spec/build/javascripts',
},
src: 'spec/spec_helper.coffee', dest: 'spec/build/spec_helper.js'
]
copy:
css: {src: 'src/jquery.atwh... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 7af55aabb19c2beb7d376123a9b89caa4b901084 | 5,250 | https://github.com/ichord/At.js/blob/7af55aabb19c2beb7d376123a9b89caa4b901084/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner:
"/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.auth... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | c20324f4c14d6fb27a3d36060933b52b3b62ffb5 | 5,250 | https://github.com/ichord/At.js/blob/c20324f4c14d6fb27a3d36060933b52b3b62ffb5/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner:
"/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.auth... | ]
specs:
files:[
{
expand: true, cwd: 'spec/javascripts', ext: ".spec.js",
src: '*.spec.coffee', dest: 'spec/build/javascripts',
},
src: 'spec/spec_helper.coffee', dest: 'spec/build/spec_helper.js'
]
copy:
css: {src: 'src/jquery.atwh... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | c20324f4c14d6fb27a3d36060933b52b3b62ffb5 | 5,250 | https://github.com/ichord/At.js/blob/c20324f4c14d6fb27a3d36060933b52b3b62ffb5/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | e028042d0045d491b94bc51ecbb8462ac71ff902 | 5,250 | https://github.com/ichord/At.js/blob/e028042d0045d491b94bc51ecbb8462ac71ff902/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | dist:
src: 'dist/js/<%= pkg.name %>.js', dest: 'dist/js/<%= pkg.name %>.min.js'
watch:
coffee:
files: ['src/*.coffee', 'spec/javascripts/*.spec.coffee', 'spec/spec_helper.coffee']
tasks: ['coffee', 'uglify', 'notify']
test:
options:
debounceDelay: 250
f... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | e028042d0045d491b94bc51ecbb8462ac71ff902 | 5,250 | https://github.com/ichord/At.js/blob/e028042d0045d491b94bc51ecbb8462ac71ff902/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 05e394acfa13937353bf03db2e478e55e245df71 | 5,250 | https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | dist:
src: 'dist/js/<%= pkg.name %>.js', dest: 'dist/js/<%= pkg.name %>.min.js'
watch:
coffee:
files: ['src/*.coffee', 'spec/coffeescripts/*.spec.coffee', 'spec/spec_helper.coffee']
tasks: ['coffee', 'uglify', 'notify']
test:
options:
debounceDelay: 250
... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 05e394acfa13937353bf03db2e478e55e245df71 | 5,250 | https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 73d978e662131c7dfe8691b5aa019e54c36f040f | 5,250 | https://github.com/ichord/At.js/blob/73d978e662131c7dfe8691b5aa019e54c36f040f/Gruntfile.coffee | 1 | 50 | ||
ichord/At.js:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
... | module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " + "<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" + "<%= pkg.homepage ? \"* \" + pkg.homepage + \... | CoffeeScript | JavaScript | ichord/At.js | Gruntfile.coffee | MIT | 73d978e662131c7dfe8691b5aa019e54c36f040f | 5,250 | https://github.com/ichord/At.js/blob/73d978e662131c7dfe8691b5aa019e54c36f040f/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
return grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " + "<%= grunt.template.today(\"yyyy-mm-dd\"... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | JavaScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 73d978e662131c7dfe8691b5aa019e54c36f040f | 5,250 | https://github.com/ichord/At.js/blob/73d978e662131c7dfe8691b5aa019e54c36f040f/Gruntfile.coffee | 1 | 50 |
ichord/At.js:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
"<%= pkg.homepage ? \"* \" + pkg.homepage + \"\n\... | watch:
src:
files: 'src/*.coffee'
tasks: ['coffee', 'uglify', 'notify']
test:
options:
debounceDelay: 250
files: 'spec/javascripts/*.spec.coffee'
tasks: ['test', 'notify']
jasmine:
dist:
src: 'dist/js/<%= pkg.name %>.js',
options:
... | CoffeeScript | CoffeeScript | ichord/At.js | Gruntfile.coffee | MIT | 73d978e662131c7dfe8691b5aa019e54c36f040f | 5,250 | https://github.com/ichord/At.js/blob/73d978e662131c7dfe8691b5aa019e54c36f040f/Gruntfile.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/util/ease.coffee:1:raw_corpus | raw_corpus | exports.default = (value) ->
if value < 0.5
Math.pow(value * 2, 2) / 2
else
1 - Math.pow((1 - value) * 2, 2) / 2 | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/ease.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/ease.coffee | 1 | 5 | ||
jianliaoim/talk-os:talk-web/client/util/ease.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.default = (value) ->
if value < 0.5
Math.pow(value * 2, 2) / 2
else
1 - Math.pow((1 - value) * 2, 2) / 2
``` | exports.default = function(value) {
if (value < 0.5) {
return Math.pow(value * 2, 2) / 2;
} else {
return 1 - Math.pow((1 - value) * 2, 2) / 2;
}
}; | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/util/ease.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/ease.coffee | 1 | 5 |
jianliaoim/talk-os:talk-web/client/util/ease.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.default = function(value) {
if (value < 0.5) {
return Math.pow(value * 2, 2) / 2;
} else {
return 1 - Math.pow((1 - value) * 2, 2) / 2;
}
};
``` | exports.default = (value) ->
if value < 0.5
Math.pow(value * 2, 2) / 2
else
1 - Math.pow((1 - value) * 2, 2) / 2 | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/ease.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/ease.coffee | 1 | 5 |
jianliaoim/talk-os:talk-web/client/util/ease.coffee:1:completion | completion | exports.default = (value) ->
if value < 0.5 | Math.pow(value * 2, 2) / 2
else
1 - Math.pow((1 - value) * 2, 2) / 2 | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/ease.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/ease.coffee | 1 | 5 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:1:raw_corpus | raw_corpus | "use strict"
Beautifier = require('./beautifier')
path = require('path')
fs = require("fs")
temp = require("temp").track()
module.exports = class LatexBeautify extends Beautifier
name: "Latex Beautify"
link: "https://github.com/cmhughes/latexindent.pl"
isPreInstalled: false
options: {
LaTeX: true
}
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 1 | 50 | ||
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
Beautifier = require('./beautifier')
path = require('path')
fs = require("fs")
temp = require("temp").track()
module.exports = class LatexBeautify extends Beautifier
name: "Latex Beautify"
link: "https://github.com/cmhughes/latexindent.pl"
is... | "use strict";
var Beautifier, LatexBeautify, fs, path, temp;
Beautifier = require('./beautifier');
path = require('path');
fs = require("fs");
temp = require("temp").track();
module.exports = LatexBeautify = (function() {
class LatexBeautify extends Beautifier {
// There are too many options with latexmk, I ... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, LatexBeautify, fs, path, temp;
Beautifier = require('./beautifier');
path = require('path');
fs = require("fs");
temp = require("temp").track();
module.exports = LatexBeautify = (function() {
class LatexBeautify extends Beautifi... | "use strict"
Beautifier = require('./beautifier')
path = require('path')
fs = require("fs")
temp = require("temp").track()
module.exports = class LatexBeautify extends Beautifier
name: "Latex Beautify"
link: "https://github.com/cmhughes/latexindent.pl"
isPreInstalled: false
options: {
LaTeX: true
}
... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:1:completion | completion | "use strict"
Beautifier = require('./beautifier')
path = require('path')
fs = require("fs")
temp = require("temp").track()
module.exports = class LatexBeautify extends Beautifier
name: "Latex Beautify"
link: "https://github.com/cmhughes/latexindent.pl"
isPreInstalled: false
options: {
LaTeX: true
}
... | defaultIndent: \"#{indentChar}\"
alwaysLookforSplitBraces: #{+options.always_look_for_split_braces}
alwaysLookforSplitBrackets: #{+options.always_look_for_split_brackets}
indentPreamble: #{+options.indent_preamble}
removeTrailingWhitespace: #{+options.remove_trailing_... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:2:raw_corpus | raw_corpus | #Beautifier does not currently have a method for creating directories, so we call temp directly.
beautify: (text, language, options) ->
new @Promise((resolve, reject) ->
temp.mkdir("latex", (err, dirPath) ->
return reject(err) if err
resolve(dirPath)
)
)
.then((dirPath)=>
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 51 | 74 | ||
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#Beautifier does not currently have a method for creating directories, so we call temp directly.
beautify: (text, language, options) ->
new @Promise((resolve, reject) ->
temp.mkdir("latex", (err, dirPath) ->
return reject(err) if err
r... | //Beautifier does not currently have a method for creating directories, so we call temp directly.
({
beautify: function(text, language, options) {
return new this.Promise(function(resolve, reject) {
return temp.mkdir("latex", function(err, dirPath) {
if (err) {
return reject(err);
... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 51 | 74 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//Beautifier does not currently have a method for creating directories, so we call temp directly.
({
beautify: function(text, language, options) {
return new this.Promise(function(resolve, reject) {
return temp.mkdir("latex", function(err, dirPath) {
... | #Beautifier does not currently have a method for creating directories, so we call temp directly.
beautify: (text, language, options) ->
new @Promise((resolve, reject) ->
temp.mkdir("latex", (err, dirPath) ->
return reject(err) if err
resolve(dirPath)
)
)
.then((dirPath)=>
... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 51 | 74 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:2:completion | completion | #Beautifier does not currently have a method for creating directories, so we call temp directly.
beautify: (text, language, options) ->
new @Promise((resolve, reject) ->
temp.mkdir("latex", (err, dirPath) ->
return reject(err) if err
resolve(dirPath)
)
)
.then((dirPath)=>
... | "-l" #Tell latexindent we have a local configuration file
"-c=" + dirPath #Tell latexindent to place the log file in this directory
@texFile
"-o" #Output to the same location as file, -w creates a backup file, whereas this does not
@texFile
], help: {
... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/latex-beautify.coffee | 51 | 74 |
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:2:raw_corpus | raw_corpus | #Beautifier does not currently have a method for creating directories, so we call temp directly.
beautify: (text, language, options) ->
new @Promise((resolve, reject) ->
temp.mkdir("latex", (err, dirPath) ->
return reject(err) if err
resolve(dirPath)
)
)
.then((dirPath)=>
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | ba2198675cbcc1ecd05f18e28e97133cdd2d5319 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/latex-beautify.coffee | 51 | 74 | ||
Glavin001/atom-beautify:src/beautifiers/latex-beautify.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#Beautifier does not currently have a method for creating directories, so we call temp directly.
beautify: (text, language, options) ->
new @Promise((resolve, reject) ->
temp.mkdir("latex", (err, dirPath) ->
return reject(err) if err
r... | //Beautifier does not currently have a method for creating directories, so we call temp directly.
({
beautify: function(text, language, options) {
return new this.Promise(function(resolve, reject) {
return temp.mkdir("latex", function(err, dirPath) {
if (err) {
return reject(err);
... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/latex-beautify.coffee | MIT | ba2198675cbcc1ecd05f18e28e97133cdd2d5319 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/latex-beautify.coffee | 51 | 74 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.