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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
twilson63/express-coffee:src/index.coffee:1:completion | completion | express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.static(process.cwd() + '/public')
# Set Vie... | app.set 'view engine', 'jade'
# Initialize routes
routes = require './routes'
routes(app)
# Define Port
port = process.env.PORT or process.env.VMC_APP_PORT or 3000
# Start Server
app.listen port, -> console.log "Listening on #{port}\nPress CTRL-C to stop server." | CoffeeScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 7f74720deb4491c4628c42dcb6e54b2c299553f2 | 622 | https://github.com/twilson63/express-coffee/blob/7f74720deb4491c4628c42dcb6e54b2c299553f2/src/index.coffee | 1 | 24 |
twilson63/express-coffee:src/index.coffee:1:raw_corpus | raw_corpus | posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.stat... | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | f2972d6e5de3c8bc844c3960f8e2a944652868e1 | 622 | https://github.com/twilson63/express-coffee/blob/f2972d6e5de3c8bc844c3960f8e2a944652868e1/src/index.coffee | 1 | 28 | ||
twilson63/express-coffee:src/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Se... | var app, assets, express, mongoose, port, posts, stylus;
posts = require('./controllers/posts');
express = require('express');
stylus = require('stylus');
assets = require('connect-assets');
mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/example');
app = express();
// Add Connect Assets
a... | CoffeeScript | JavaScript | twilson63/express-coffee | src/index.coffee | MIT | f2972d6e5de3c8bc844c3960f8e2a944652868e1 | 622 | https://github.com/twilson63/express-coffee/blob/f2972d6e5de3c8bc844c3960f8e2a944652868e1/src/index.coffee | 1 | 28 |
twilson63/express-coffee:src/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var app, assets, express, mongoose, port, posts, stylus;
posts = require('./controllers/posts');
express = require('express');
stylus = require('stylus');
assets = require('connect-assets');
mongoose = require('mongoose');
mongoose.connect('mongodb://localhos... | posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.stat... | JavaScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | f2972d6e5de3c8bc844c3960f8e2a944652868e1 | 622 | https://github.com/twilson63/express-coffee/blob/f2972d6e5de3c8bc844c3960f8e2a944652868e1/src/index.coffee | 1 | 28 |
twilson63/express-coffee:src/index.coffee:1:completion | completion | posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.stat... | app.set 'view engine', 'jade'
app.get '/', (req, resp) ->
resp.render 'index'
# Get root_path return index view
app.get "/posts/", posts.index
app.get "/posts/new", posts.new
app.post "/posts/create", posts.create
# Define Port
port = process.env.PORT or process.env.VMC_APP_PORT or 3000
# Start Server
app.listen p... | CoffeeScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | f2972d6e5de3c8bc844c3960f8e2a944652868e1 | 622 | https://github.com/twilson63/express-coffee/blob/f2972d6e5de3c8bc844c3960f8e2a944652868e1/src/index.coffee | 1 | 28 |
twilson63/express-coffee:src/index.coffee:1:raw_corpus | raw_corpus | posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.stat... | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2 | 622 | https://github.com/twilson63/express-coffee/blob/5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2/src/index.coffee | 1 | 24 | ||
twilson63/express-coffee:src/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Se... | var app, assets, express, mongoose, port, posts, stylus;
posts = require('./controllers/posts');
express = require('express');
stylus = require('stylus');
assets = require('connect-assets');
mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/example');
app = express();
// Add Connect Assets
a... | CoffeeScript | JavaScript | twilson63/express-coffee | src/index.coffee | MIT | 5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2 | 622 | https://github.com/twilson63/express-coffee/blob/5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2/src/index.coffee | 1 | 24 |
twilson63/express-coffee:src/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var app, assets, express, mongoose, port, posts, stylus;
posts = require('./controllers/posts');
express = require('express');
stylus = require('stylus');
assets = require('connect-assets');
mongoose = require('mongoose');
mongoose.connect('mongodb://localhos... | posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.stat... | JavaScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2 | 622 | https://github.com/twilson63/express-coffee/blob/5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2/src/index.coffee | 1 | 24 |
twilson63/express-coffee:src/index.coffee:1:completion | completion | posts = require './controllers/posts'
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/example'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets | app.use express.static(process.cwd() + '/public')
# Set View Engine
app.set 'view engine', 'jade'
# Get root_path return index view
app.get "/", posts.index
app.get "/posts/new", posts.new
app.post "/posts/create", posts.create
# Define Port
port = process.env.PORT or process.env.VMC_APP_PORT or 3000
# Start Server
ap... | CoffeeScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2 | 622 | https://github.com/twilson63/express-coffee/blob/5cac4cf7204ad6ae97c51e68d84b493f5b7d14c2/src/index.coffee | 1 | 24 |
twilson63/express-coffee:src/index.coffee:1:raw_corpus | raw_corpus | express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.static(process.cwd() + '/public')
# Set View Engine
app.set 'view engine', 'jade'
# Get root_path return index view
app.... | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 1a567451d2d6b9844238e44e996f3d2d9a0a0506 | 622 | https://github.com/twilson63/express-coffee/blob/1a567451d2d6b9844238e44e996f3d2d9a0a0506/src/index.coffee | 1 | 18 | ||
twilson63/express-coffee:src/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.static(process.cwd() + '/public')
# Set View Engine
app.set 'vi... | var app, assets, express, port, stylus;
express = require('express');
stylus = require('stylus');
assets = require('connect-assets');
app = express();
// Add Connect Assets
app.use(assets());
// Set the public folder as static assets
app.use(express.static(process.cwd() + '/public'));
// Set View Engine
app.set(... | CoffeeScript | JavaScript | twilson63/express-coffee | src/index.coffee | MIT | 1a567451d2d6b9844238e44e996f3d2d9a0a0506 | 622 | https://github.com/twilson63/express-coffee/blob/1a567451d2d6b9844238e44e996f3d2d9a0a0506/src/index.coffee | 1 | 18 |
twilson63/express-coffee:src/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var app, assets, express, port, stylus;
express = require('express');
stylus = require('stylus');
assets = require('connect-assets');
app = express();
// Add Connect Assets
app.use(assets());
// Set the public folder as static assets
app.use(express.static(pr... | express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.static(process.cwd() + '/public')
# Set View Engine
app.set 'view engine', 'jade'
# Get root_path return index view
app.... | JavaScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 1a567451d2d6b9844238e44e996f3d2d9a0a0506 | 622 | https://github.com/twilson63/express-coffee/blob/1a567451d2d6b9844238e44e996f3d2d9a0a0506/src/index.coffee | 1 | 18 |
twilson63/express-coffee:src/index.coffee:1:completion | completion | express = require 'express'
stylus = require 'stylus'
assets = require 'connect-assets'
app = express()
# Add Connect Assets
app.use assets()
# Set the public folder as static assets
app.use express.static(process.cwd() + '/public') | # Set View Engine
app.set 'view engine', 'jade'
# Get root_path return index view
app.get '/', (req, resp) ->
resp.render 'index'
# Define Port
port = process.env.PORT or process.env.VMC_APP_PORT or 3000
# Start Server
app.listen port, -> console.log "Listening on #{port}\nPress CTRL-C to stop server." | CoffeeScript | CoffeeScript | twilson63/express-coffee | src/index.coffee | MIT | 1a567451d2d6b9844238e44e996f3d2d9a0a0506 | 622 | https://github.com/twilson63/express-coffee/blob/1a567451d2d6b9844238e44e996f3d2d9a0a0506/src/index.coffee | 1 | 18 |
Glavin001/atom-beautify:src/beautifiers/pug-beautify.coffee:1:raw_corpus | raw_corpus | "use strict"
Beautifier = require('./beautifier')
module.exports = class PugBeautify extends Beautifier
name: "Pug Beautify"
link: "https://github.com/vingorius/pug-beautify"
options: {
# Apply these options first / globally, for all languages
Jade:
fill_tab: ['indent_char', (indent_char) ->
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/pug-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/pug-beautify.coffee | 1 | 27 | ||
Glavin001/atom-beautify:src/beautifiers/pug-beautify.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
Beautifier = require('./beautifier')
module.exports = class PugBeautify extends Beautifier
name: "Pug Beautify"
link: "https://github.com/vingorius/pug-beautify"
options: {
# Apply these options first / globally, for all languages
Jade... | "use strict";
var Beautifier, PugBeautify;
Beautifier = require('./beautifier');
module.exports = PugBeautify = (function() {
class PugBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, reject) {
var error, pugBeautify;
pugBeautify =... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/pug-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/pug-beautify.coffee | 1 | 27 |
Glavin001/atom-beautify:src/beautifiers/pug-beautify.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, PugBeautify;
Beautifier = require('./beautifier');
module.exports = PugBeautify = (function() {
class PugBeautify extends Beautifier {
beautify(text, language, options) {
return new this.Promise(function(resolve, reject) ... | "use strict"
Beautifier = require('./beautifier')
module.exports = class PugBeautify extends Beautifier
name: "Pug Beautify"
link: "https://github.com/vingorius/pug-beautify"
options: {
# Apply these options first / globally, for all languages
Jade:
fill_tab: ['indent_char', (indent_char) ->
... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/pug-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/pug-beautify.coffee | 1 | 27 |
Glavin001/atom-beautify:src/beautifiers/pug-beautify.coffee:1:completion | completion | "use strict"
Beautifier = require('./beautifier')
module.exports = class PugBeautify extends Beautifier
name: "Pug Beautify"
link: "https://github.com/vingorius/pug-beautify"
options: {
# Apply these options first / globally, for all languages
Jade:
fill_tab: ['indent_char', (indent_char) ->
... | omit_div: true
tab_size: "indent_size"
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
pugBeautify = require("pug-beautify")
try
resolve(pugBeautify(text, options))
catch error
# Error occurred
reject(error)
) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/pug-beautify.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/pug-beautify.coffee | 1 | 27 |
jianliaoim/talk-os:talk-api2x/server/controllers/notification.coffee:1:raw_corpus | raw_corpus | module.exports = notificationController = app.controller 'notification', ->
editableFields = ['unreadNum', 'isPinned', 'isMute', 'isHidden', '_latestReadMessageId']
@mixin require './mixins/permission'
@ensure '_teamId', only: 'read'
@ensure '_targetId type _teamId', only: 'create'
@least editableFields, ... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/notification.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/notification.coffee | 13 | 62 | ||
jianliaoim/talk-os:talk-api2x/server/controllers/notification.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = notificationController = app.controller 'notification', ->
editableFields = ['unreadNum', 'isPinned', 'isMute', 'isHidden', '_latestReadMessageId']
@mixin require './mixins/permission'
@ensure '_teamId', only: 'read'
@ensure '_targetId... | var notificationController;
module.exports = notificationController = app.controller('notification', function() {
var editableFields;
editableFields = ['unreadNum', 'isPinned', 'isMute', 'isHidden', '_latestReadMessageId'];
this.mixin(require('./mixins/permission'));
this.ensure('_teamId', {
only: 'read'
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/controllers/notification.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/notification.coffee | 13 | 62 |
jianliaoim/talk-os:talk-api2x/server/controllers/notification.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var notificationController;
module.exports = notificationController = app.controller('notification', function() {
var editableFields;
editableFields = ['unreadNum', 'isPinned', 'isMute', 'isHidden', '_latestReadMessageId'];
this.mixin(require('./mixins/permi... | module.exports = notificationController = app.controller 'notification', ->
editableFields = ['unreadNum', 'isPinned', 'isMute', 'isHidden', '_latestReadMessageId']
@mixin require './mixins/permission'
@ensure '_teamId', only: 'read'
@ensure '_targetId type _teamId', only: 'create'
@least editableFields, ... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/notification.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/notification.coffee | 13 | 62 |
jianliaoim/talk-os:talk-api2x/server/controllers/notification.coffee:1:completion | completion | module.exports = notificationController = app.controller 'notification', ->
editableFields = ['unreadNum', 'isPinned', 'isMute', 'isHidden', '_latestReadMessageId']
@mixin require './mixins/permission'
@ensure '_teamId', only: 'read'
@ensure '_targetId type _teamId', only: 'create'
@least editableFields, ... | type: req.get 'type'
options.text = req.get('text') if req.get('text')?
NotificationModel.createByOptions options, callback
@action 'read', (req, res, callback) ->
{_sessionUserId, _teamId, limit} = req.get()
options = _.assign {}, req.get(),
user: _sessionUserId
team: _teamId
isH... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/notification.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/notification.coffee | 13 | 62 |
jianliaoim/talk-os:talk-api2x/server/controllers/notification.coffee:2:raw_corpus | raw_corpus | $unpinnedNotifications = NotificationModel.findByOptionsAsync unpinnedOptions
$notifications = Promise.all [$pinnedNotifications, $unpinnedNotifications]
.spread (pinnedNotifications = [], unpinnedNotifications = []) ->
notifications = pinnedNotifications.concat unpinnedNotifications
$notific... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/notification.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/notification.coffee | 63 | 96 | ||
jianliaoim/talk-os:talk-api2x/server/controllers/notification.coffee:2:completion | completion | $unpinnedNotifications = NotificationModel.findByOptionsAsync unpinnedOptions
$notifications = Promise.all [$pinnedNotifications, $unpinnedNotifications]
.spread (pinnedNotifications = [], unpinnedNotifications = []) ->
notifications = pinnedNotifications.concat unpinnedNotifications
$notific... | $cancelMail = $notification.then (notification) ->
return unless unreadNum? and unreadNum is 0
if notification.type is 'dms'
dmMailer.cancel notification._targetId, notification._userId, notification._teamId
else if notification.type is 'room'
rmMailer.cancel notification._userId, noti... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/notification.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/notification.coffee | 63 | 96 |
AriaMinaei/pretty-error:src/defaultStyle.coffee:1:raw_corpus | raw_corpus | module.exports = ->
'pretty-error':
display: 'block'
marginLeft: '2'
'pretty-error > header':
display: 'block'
'pretty-error > header > title > kind':
background: 'red'
color: 'bright-white'
'pretty-error > header > title > wrapper':
marginRight: '1'
color: 'grey'
'pretty-error... | CoffeeScript | AriaMinaei/pretty-error | src/defaultStyle.coffee | MIT | ae492ce4faf051741f17b689b5b4d62f41b9ccf6 | 1,524 | https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/src/defaultStyle.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:completion | completion | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | # language governing permissions and limitations under the License.
###
cyclotronDirectives.directive 'tableRow', ->
{
restrict: 'CA'
link: (scope, element, attrs) ->
$element = $(element)
$widgetBody = $element.parents '.widget-body'
if scope.widget.rowHeight?
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableRow.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | # language governing permissions and limitations under the License.
###
cyclotronDirectives.directive 'tableRow', ->
{
restrict: 'CA'
link: (scope, element, attrs) ->
$element = $(element)
$widgetBody = $element.parents '.widget-body'
if scope.widget.rowHeight?
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/table/directives.tableRow.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/widgets/table/directives.tableRow.coffee | 1 | 26 |
jnordberg/wintersmith:lib/cli/preview.coffee:1:raw_corpus | raw_corpus | async = require 'async'
{app} = require 'flatiron'
rimraf = require 'rimraf'
fs = require 'fs'
{logger} = require '../common' # lib common
{getOptions, commonOptions} = require './common' # cli common
usage = """
usage: wintersmith preview [options]
options:
-p, --port [port] port to run server... | CoffeeScript | jnordberg/wintersmith | lib/cli/preview.coffee | MIT | f01b0c9862c0cb38dbd62af492e2955581fd974e | 3,484 | https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/preview.coffee | 1 | 43 | ||
jnordberg/wintersmith:lib/cli/preview.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
async = require 'async'
{app} = require 'flatiron'
rimraf = require 'rimraf'
fs = require 'fs'
{logger} = require '../common' # lib common
{getOptions, commonOptions} = require './common' # cli common
usage = """
usage: wintersmith preview [options]
optio... | var app, async, commonOptions, fs, getOptions, logger, preview, rimraf, usage;
async = require('async');
({app} = require('flatiron'));
rimraf = require('rimraf');
fs = require('fs');
({logger} = require('../common')); // lib common
({getOptions, commonOptions} = require('./common')); // cli common
usage = `
usa... | CoffeeScript | JavaScript | jnordberg/wintersmith | lib/cli/preview.coffee | MIT | f01b0c9862c0cb38dbd62af492e2955581fd974e | 3,484 | https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/preview.coffee | 1 | 43 |
jnordberg/wintersmith:lib/cli/preview.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var app, async, commonOptions, fs, getOptions, logger, preview, rimraf, usage;
async = require('async');
({app} = require('flatiron'));
rimraf = require('rimraf');
fs = require('fs');
({logger} = require('../common')); // lib common
({getOptions, commonOption... | async = require 'async'
{app} = require 'flatiron'
rimraf = require 'rimraf'
fs = require 'fs'
{logger} = require '../common' # lib common
{getOptions, commonOptions} = require './common' # cli common
usage = """
usage: wintersmith preview [options]
options:
-p, --port [port] port to run server... | JavaScript | CoffeeScript | jnordberg/wintersmith | lib/cli/preview.coffee | MIT | f01b0c9862c0cb38dbd62af492e2955581fd974e | 3,484 | https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/preview.coffee | 1 | 43 |
jnordberg/wintersmith:lib/cli/preview.coffee:1:completion | completion | async = require 'async'
{app} = require 'flatiron'
rimraf = require 'rimraf'
fs = require 'fs'
{logger} = require '../common' # lib common
{getOptions, commonOptions} = require './common' # cli common
usage = """
usage: wintersmith preview [options]
options:
-p, --port [port] port to run server... | preview using a config file (assuming config.json is found in working directory):
$ wintersmith preview
"""
preview = ->
server = require '../server'
logger.info 'starting preview server'
async.waterfall [
# load options
async.apply getOptions, app.argv
(options, callback) ->
options.port... | CoffeeScript | CoffeeScript | jnordberg/wintersmith | lib/cli/preview.coffee | MIT | f01b0c9862c0cb38dbd62af492e2955581fd974e | 3,484 | https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/cli/preview.coffee | 1 | 43 |
jianliaoim/talk-os:talk-account/client/app/not-found.coffee:1:raw_corpus | raw_corpus | React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, input, span, a} = React.DOM
module.exports = React.createClass
displayName: 'not-found'
propTypes:
... | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/not-found.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/not-found.coffee | 1 | 29 | ||
jianliaoim/talk-os:talk-account/client/app/not-found.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, input, span, a} = React.DOM
module.exports = Re... | var Immutable, React, Space, a, ajax, controllers, div, input, locales, span;
React = require('react');
Immutable = require('immutable');
ajax = require('../ajax');
locales = require('../locales');
controllers = require('../controllers');
Space = React.createFactory(require('react-lite-space'));
({div, input, sp... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/client/app/not-found.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/not-found.coffee | 1 | 29 |
jianliaoim/talk-os:talk-account/client/app/not-found.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Immutable, React, Space, a, ajax, controllers, div, input, locales, span;
React = require('react');
Immutable = require('immutable');
ajax = require('../ajax');
locales = require('../locales');
controllers = require('../controllers');
Space = React.create... | React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, input, span, a} = React.DOM
module.exports = React.createClass
displayName: 'not-found'
propTypes:
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/not-found.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/not-found.coffee | 1 | 29 |
jianliaoim/talk-os:talk-account/client/app/not-found.coffee:1:completion | completion | React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, input, span, a} = React.DOM
module.exports = React.createClass
displayName: 'not-found' | propTypes:
store: React.PropTypes.instanceOf(Immutable.Map).isRequired
getLanguage: ->
@props.store.getIn(['client', 'language'])
render: ->
siteUrl = @props.store.getIn ['client', 'siteUrl']
div className: 'not-found control-panel',
div className: 'as-line',
span className: 'hint-e... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/not-found.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/not-found.coffee | 1 | 29 |
jianliaoim/talk-os:talk-web/client/app/topic-join.coffee:1:raw_corpus | raw_corpus | React = require 'react'
PureRenderMixin = require 'react-addons-pure-render-mixin'
eventBus = require '../event-bus'
lang = require '../locales/lang'
roomActions = require '../actions/room'
notifyActions = require '../actions/notify'
div = React.createFactory 'div'
span = React.createFactory 'span'
a = Re... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/topic-join.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-join.coffee | 1 | 43 | ||
jianliaoim/talk-os:talk-web/client/app/topic-join.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
PureRenderMixin = require 'react-addons-pure-render-mixin'
eventBus = require '../event-bus'
lang = require '../locales/lang'
roomActions = require '../actions/room'
notifyActions = require '../actions/notify'
div = React.createFact... | var PureRenderMixin, React, T, a, button, div, eventBus, lang, notifyActions, roomActions, span;
React = require('react');
PureRenderMixin = require('react-addons-pure-render-mixin');
eventBus = require('../event-bus');
lang = require('../locales/lang');
roomActions = require('../actions/room');
notifyActions = r... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/topic-join.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-join.coffee | 1 | 43 |
jianliaoim/talk-os:talk-web/client/app/topic-join.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PureRenderMixin, React, T, a, button, div, eventBus, lang, notifyActions, roomActions, span;
React = require('react');
PureRenderMixin = require('react-addons-pure-render-mixin');
eventBus = require('../event-bus');
lang = require('../locales/lang');
roomA... | React = require 'react'
PureRenderMixin = require 'react-addons-pure-render-mixin'
eventBus = require '../event-bus'
lang = require '../locales/lang'
roomActions = require '../actions/room'
notifyActions = require '../actions/notify'
div = React.createFactory 'div'
span = React.createFactory 'span'
a = Re... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/topic-join.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-join.coffee | 1 | 43 |
jianliaoim/talk-os:talk-web/client/app/topic-join.coffee:1:completion | completion | React = require 'react'
PureRenderMixin = require 'react-addons-pure-render-mixin'
eventBus = require '../event-bus'
lang = require '../locales/lang'
roomActions = require '../actions/room'
notifyActions = require '../actions/notify'
div = React.createFactory 'div'
span = React.createFactory 'span'
a = Re... | propTypes:
topic: T.object.isRequired
onJoinClick: ->
roomActions.roomJoin @props.topic.get('_teamId'), @props.topic.get('_id'), (resp) ->
notifyActions.success lang.getText('joined-topic')
eventBus.emit 'dirty-action/new-message'
render: ->
[text1, text2] = lang.getText('previewing-topic'... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/topic-join.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-join.coffee | 1 | 43 |
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee:1:raw_corpus | raw_corpus | # Eat lunch.
lunch: eat food for food in ['toast', 'cheese', 'wine']
# Naive collision detection.
for roid in asteroids
for roid2 in asteroids when roid isnt roid2
roid.explode() if roid.overlaps roid2 | CoffeeScript | twilson63/express-coffee | lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | MIT | 971837f7d7a5e96cf5a5fdb52e52748060ed2c68 | 622 | https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | 1 | 7 | ||
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Eat lunch.
lunch: eat food for food in ['toast', 'cheese', 'wine']
# Naive collision detection.
for roid in asteroids
for roid2 in asteroids when roid isnt roid2
roid.explode() if roid.overlaps roid2
``` | // Eat lunch.
var food, i, j, k, len, len1, len2, ref, roid, roid2;
ref = ['toast', 'cheese', 'wine'];
for (i = 0, len = ref.length; i < len; i++) {
food = ref[i];
({
lunch: eat(food)
});
}
// Naive collision detection.
for (j = 0, len1 = asteroids.length; j < len1; j++) {
roid = asteroids[j];
for (k = ... | CoffeeScript | JavaScript | twilson63/express-coffee | lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | MIT | 971837f7d7a5e96cf5a5fdb52e52748060ed2c68 | 622 | https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | 1 | 7 |
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Eat lunch.
var food, i, j, k, len, len1, len2, ref, roid, roid2;
ref = ['toast', 'cheese', 'wine'];
for (i = 0, len = ref.length; i < len; i++) {
food = ref[i];
({
lunch: eat(food)
});
}
// Naive collision detection.
for (j = 0, len1 = asteroids.leng... | # Eat lunch.
lunch: eat food for food in ['toast', 'cheese', 'wine']
# Naive collision detection.
for roid in asteroids
for roid2 in asteroids when roid isnt roid2
roid.explode() if roid.overlaps roid2 | JavaScript | CoffeeScript | twilson63/express-coffee | lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | MIT | 971837f7d7a5e96cf5a5fdb52e52748060ed2c68 | 622 | https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | 1 | 7 |
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee:1:completion | completion | # Eat lunch.
lunch: eat food for food in ['toast', 'cheese', 'wine'] | # Naive collision detection.
for roid in asteroids
for roid2 in asteroids when roid isnt roid2
roid.explode() if roid.overlaps roid2 | CoffeeScript | CoffeeScript | twilson63/express-coffee | lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | MIT | 971837f7d7a5e96cf5a5fdb52e52748060ed2c68 | 622 | https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/array_comprehensions.coffee | 1 | 7 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:raw_corpus | raw_corpus | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(_... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | c222dd760a0a9055dbdae40c33fea0b7a697aa1c | 1,503 | https://github.com/Glavin001/atom-beautify/blob/c222dd760a0a9055dbdae40c33fea0b7a697aa1c/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 | ||
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (te... | "use strict";
var Beautifier, ClojureBeautifier, path;
path = require('path');
Beautifier = require('../beautifier');
module.exports = ClojureBeautifier = (function() {
class ClojureBeautifier extends Beautifier {
beautify(text, language, options) {
var cljfmt, formatPath;
formatPath = path.resolve... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | c222dd760a0a9055dbdae40c33fea0b7a697aa1c | 1,503 | https://github.com/Glavin001/atom-beautify/blob/c222dd760a0a9055dbdae40c33fea0b7a697aa1c/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, ClojureBeautifier, path;
path = require('path');
Beautifier = require('../beautifier');
module.exports = ClojureBeautifier = (function() {
class ClojureBeautifier extends Beautifier {
beautify(text, language, options) {
... | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(_... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | c222dd760a0a9055dbdae40c33fea0b7a697aa1c | 1,503 | https://github.com/Glavin001/atom-beautify/blob/c222dd760a0a9055dbdae40c33fea0b7a697aa1c/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:completion | completion | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true | }
beautify: (text, language, options) ->
formatPath = path.resolve(__dirname, "fmt.edn")
cljfmt = path.resolve(__dirname, "..", "..", "..", "node_modules/.bin/cljfmt")
@tempFile("input", text).then((filePath) =>
@run(cljfmt, [
filePath,
"--edn=" + formatPath
]).then(=>
... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | c222dd760a0a9055dbdae40c33fea0b7a697aa1c | 1,503 | https://github.com/Glavin001/atom-beautify/blob/c222dd760a0a9055dbdae40c33fea0b7a697aa1c/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:raw_corpus | raw_corpus | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(_... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | e3bfb6c383a2b257d728b08b68dcc822a5c377f1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/e3bfb6c383a2b257d728b08b68dcc822a5c377f1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 | ||
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (te... | "use strict";
var Beautifier, ClojureBeautifier, path;
path = require('path');
Beautifier = require('../beautifier');
module.exports = ClojureBeautifier = (function() {
class ClojureBeautifier extends Beautifier {
beautify(text, language, options) {
var cljfmt, formatPath;
formatPath = path.resolve... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | e3bfb6c383a2b257d728b08b68dcc822a5c377f1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/e3bfb6c383a2b257d728b08b68dcc822a5c377f1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, ClojureBeautifier, path;
path = require('path');
Beautifier = require('../beautifier');
module.exports = ClojureBeautifier = (function() {
class ClojureBeautifier extends Beautifier {
beautify(text, language, options) {
... | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(_... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | e3bfb6c383a2b257d728b08b68dcc822a5c377f1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/e3bfb6c383a2b257d728b08b68dcc822a5c377f1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:completion | completion | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true | }
beautify: (text, language, options) ->
formatPath = path.resolve(__dirname, "fmt.edn")
cljfmt = path.resolve(__dirname, "../../../", "node_modules/.bin/cljfmt")
@tempFile("input", text).then((filePath) =>
@run(cljfmt, [
filePath,
"--edn=" + formatPath
]).then(=>
@rea... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | e3bfb6c383a2b257d728b08b68dcc822a5c377f1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/e3bfb6c383a2b257d728b08b68dcc822a5c377f1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 22 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:raw_corpus | raw_corpus | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(_... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | 9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 21 | ||
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (te... | "use strict";
var Beautifier, ClojureBeautifier, path;
path = require('path');
Beautifier = require('../beautifier');
module.exports = ClojureBeautifier = (function() {
class ClojureBeautifier extends Beautifier {
beautify(text, language, options) {
var formatPath;
formatPath = path.resolve(__dirna... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | 9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 21 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
"use strict";
var Beautifier, ClojureBeautifier, path;
path = require('path');
Beautifier = require('../beautifier');
module.exports = ClojureBeautifier = (function() {
class ClojureBeautifier extends Beautifier {
beautify(text, language, options) {
... | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: {
Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(_... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | 9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 21 |
Glavin001/atom-beautify:src/beautifiers/clojure-beautifier/index.coffee:1:completion | completion | "use strict"
path = require('path')
Beautifier = require('../beautifier')
module.exports = class ClojureBeautifier extends Beautifier
name: "Clojure Beautifier"
link: "https://github.com/snoe/node-cljfmt"
options: { | Clojure: true
}
beautify: (text, language, options) ->
formatPath = path.resolve(__dirname, "fmt.edn")
@tempFile("input", text).then((filePath) =>
@run("cljfmt", [
filePath,
"--edn=" + formatPath
]).then(=>
@readFile(filePath))) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/clojure-beautifier/index.coffee | MIT | 9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/9ed56bd3511ebfaa9d801f55c0bca0efe78bdfa1/src/beautifiers/clojure-beautifier/index.coffee | 1 | 21 |
snd/url-pattern:src/common.coffee:1:raw_corpus | raw_corpus | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
if name is '_'
throw new TypeError(":_ can... | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 5e21c51e4cc717efff2f23c4ea1d31aab566500d | 588 | https://github.com/snd/url-pattern/blob/5e21c51e4cc717efff2f23c4ea1d31aab566500d/src/common.coffee | 1 | 26 | ||
snd/url-pattern:src/common.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
... | var common,
indexOf = [].indexOf;
module.exports = common = {
getNames: function(arg) {
var name, names, regex, results;
if (arg instanceof RegExp) {
return [];
}
regex = /((:?:[^\/]+)|(?:[\*]))/g;
names = [];
results = regex.exec(arg);
while (results != null) {
name = resul... | CoffeeScript | JavaScript | snd/url-pattern | src/common.coffee | MIT | 5e21c51e4cc717efff2f23c4ea1d31aab566500d | 588 | https://github.com/snd/url-pattern/blob/5e21c51e4cc717efff2f23c4ea1d31aab566500d/src/common.coffee | 1 | 26 |
snd/url-pattern:src/common.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var common,
indexOf = [].indexOf;
module.exports = common = {
getNames: function(arg) {
var name, names, regex, results;
if (arg instanceof RegExp) {
return [];
}
regex = /((:?:[^\/]+)|(?:[\*]))/g;
names = [];
results = regex.exec... | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
if name is '_'
throw new TypeError(":_ can... | JavaScript | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 5e21c51e4cc717efff2f23c4ea1d31aab566500d | 588 | https://github.com/snd/url-pattern/blob/5e21c51e4cc717efff2f23c4ea1d31aab566500d/src/common.coffee | 1 | 26 |
snd/url-pattern:src/common.coffee:1:completion | completion | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
if name is '_' | throw new TypeError(":_ can't be used as a pattern name in pattern #{arg}")
if name in names
throw new TypeError("duplicate pattern name :#{name} in pattern #{arg}")
names.push name || '_'
results = regex.exec arg
names
toRegexString: (arg) ->
com... | CoffeeScript | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 5e21c51e4cc717efff2f23c4ea1d31aab566500d | 588 | https://github.com/snd/url-pattern/blob/5e21c51e4cc717efff2f23c4ea1d31aab566500d/src/common.coffee | 1 | 26 |
snd/url-pattern:src/common.coffee:1:raw_corpus | raw_corpus | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
if name == '_'
throw new TypeError(":_ can... | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 01e35866381fddb5f2813e8a932f4f2ad7c1ab84 | 588 | https://github.com/snd/url-pattern/blob/01e35866381fddb5f2813e8a932f4f2ad7c1ab84/src/common.coffee | 1 | 26 | ||
snd/url-pattern:src/common.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
... | var common;
module.exports = common = {
getNames: function(arg) {
var name, names, regex, results;
if (arg instanceof RegExp) {
return [];
}
regex = /((:?:[^\/]+)|(?:[\*]))/g;
names = [];
results = regex.exec(arg);
while (results != null) {
name = results[1].slice(1);
if... | CoffeeScript | JavaScript | snd/url-pattern | src/common.coffee | MIT | 01e35866381fddb5f2813e8a932f4f2ad7c1ab84 | 588 | https://github.com/snd/url-pattern/blob/01e35866381fddb5f2813e8a932f4f2ad7c1ab84/src/common.coffee | 1 | 26 |
snd/url-pattern:src/common.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var common;
module.exports = common = {
getNames: function(arg) {
var name, names, regex, results;
if (arg instanceof RegExp) {
return [];
}
regex = /((:?:[^\/]+)|(?:[\*]))/g;
names = [];
results = regex.exec(arg);
while (result... | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
if name == '_'
throw new TypeError(":_ can... | JavaScript | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 01e35866381fddb5f2813e8a932f4f2ad7c1ab84 | 588 | https://github.com/snd/url-pattern/blob/01e35866381fddb5f2813e8a932f4f2ad7c1ab84/src/common.coffee | 1 | 26 |
snd/url-pattern:src/common.coffee:1:completion | completion | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
name = results[1].slice(1)
if name == '_' | throw new TypeError(":_ can't be used as a pattern name in pattern #{arg}")
if names.indexOf(name) > -1
throw new TypeError("duplicate pattern name :#{name} in pattern #{arg}")
names.push name || '_'
results = regex.exec arg
names
toRegexString: (arg) ->
... | CoffeeScript | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 01e35866381fddb5f2813e8a932f4f2ad7c1ab84 | 588 | https://github.com/snd/url-pattern/blob/01e35866381fddb5f2813e8a932f4f2ad7c1ab84/src/common.coffee | 1 | 26 |
snd/url-pattern:src/common.coffee:1:raw_corpus | raw_corpus | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
names.push results[1].slice(1) || '_'
results = regex.exec arg
names
to... | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 9ea01c98419c9a5c35145d1e61c2bfe35c074895 | 588 | https://github.com/snd/url-pattern/blob/9ea01c98419c9a5c35145d1e61c2bfe35c074895/src/common.coffee | 1 | 18 | ||
snd/url-pattern:src/common.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
names.push results[1].slice(1) || '_'
... | var common;
module.exports = common = {
getNames: function(arg) {
var names, regex, results;
if (arg instanceof RegExp) {
return [];
}
regex = /((:?:[^\/]+)|(?:[\*]))/g;
names = [];
results = regex.exec(arg);
while (results != null) {
names.push(results[1].slice(1) || '_');
... | CoffeeScript | JavaScript | snd/url-pattern | src/common.coffee | MIT | 9ea01c98419c9a5c35145d1e61c2bfe35c074895 | 588 | https://github.com/snd/url-pattern/blob/9ea01c98419c9a5c35145d1e61c2bfe35c074895/src/common.coffee | 1 | 18 |
snd/url-pattern:src/common.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var common;
module.exports = common = {
getNames: function(arg) {
var names, regex, results;
if (arg instanceof RegExp) {
return [];
}
regex = /((:?:[^\/]+)|(?:[\*]))/g;
names = [];
results = regex.exec(arg);
while (results != n... | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg
while results?
names.push results[1].slice(1) || '_'
results = regex.exec arg
names
to... | JavaScript | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 9ea01c98419c9a5c35145d1e61c2bfe35c074895 | 588 | https://github.com/snd/url-pattern/blob/9ea01c98419c9a5c35145d1e61c2bfe35c074895/src/common.coffee | 1 | 18 |
snd/url-pattern:src/common.coffee:1:completion | completion | module.exports = common =
getNames: (arg) ->
return [] if arg instanceof RegExp
regex = /((:?:[^\/]+)|(?:[\*]))/g
names = []
results = regex.exec arg | while results?
names.push results[1].slice(1) || '_'
results = regex.exec arg
names
toRegexString: (arg) ->
common.getNames(arg).forEach (name) ->
arg = arg.replace(':' + name, '([^\/]+)')
'^' + arg.replace(/\*/g, '(.*)') + '$' | CoffeeScript | CoffeeScript | snd/url-pattern | src/common.coffee | MIT | 9ea01c98419c9a5c35145d1e61c2bfe35c074895 | 588 | https://github.com/snd/url-pattern/blob/9ea01c98419c9a5c35145d1e61c2bfe35c074895/src/common.coffee | 1 | 18 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:raw_corpus | raw_corpus | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled ... | var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
enabled: false,
subscriptions: null,
conf: [],
init: function() {
return this.enableSubscription = atom.config.observe('activate-power-mode.playAudio.enabled', (value) => {
this.enab... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
enabled: false,
subscriptions: null,
conf: [],
init: function() {
return this.enableSubscription = atom.config.observe('activate-powe... | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:completion | completion | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | disable: ->
@subscriptions?.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom.config.observe(
"activate-power-mode.playAudio.#{key}", (value) =>
@conf[key] = value
@loadAudio() if loadAudio
)
initConfigSubscribers: ->
@subscriptions = new CompositeDisposab... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:2:raw_corpus | raw_corpus | audio = @audio if not audio
audio.currentTime = 0
audio.volume = @conf['volume']
audio.play() | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 51 | 55 | ||
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
audio = @audio if not audio
audio.currentTime = 0
audio.volume = @conf['volume']
audio.play()
``` | var audio;
audio = this.audio(!audio ? (audio.currentTime = 0, audio.volume = this.conf['volume'], audio.play()) : void 0); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var audio;
audio = this.audio(!audio ? (audio.currentTime = 0, audio.volume = this.conf['volume'], audio.play()) : void 0);
``` | audio = @audio if not audio
audio.currentTime = 0
audio.volume = @conf['volume']
audio.play() | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:2:completion | completion | audio = @audio if not audio
audio.currentTime = 0 | audio.volume = @conf['volume']
audio.play() | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/audio-player.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:raw_corpus | raw_corpus | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | e943de845df02bd0098a5d449c46e8b8666707c4 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/e943de845df02bd0098a5d449c46e8b8666707c4/lib/service/audio-player.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled ... | var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
enabled: false,
subscriptions: null,
conf: [],
init: function() {
return this.enableSubscription = atom.config.observe('activate-power-mode.playAudio.enabled', (value) => {
this.enab... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | e943de845df02bd0098a5d449c46e8b8666707c4 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/e943de845df02bd0098a5d449c46e8b8666707c4/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
enabled: false,
subscriptions: null,
conf: [],
init: function() {
return this.enableSubscription = atom.config.observe('activate-powe... | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | e943de845df02bd0098a5d449c46e8b8666707c4 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/e943de845df02bd0098a5d449c46e8b8666707c4/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:completion | completion | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | disable: ->
@subscriptions?.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom.config.observe(
"activate-power-mode.playAudio.#{key}", (value) =>
@conf[key] = value
@loadAudio() if loadAudio
)
initConfigSubscribers: ->
@subscriptions = new CompositeDisposab... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | e943de845df02bd0098a5d449c46e8b8666707c4 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/e943de845df02bd0098a5d449c46e8b8666707c4/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:raw_corpus | raw_corpus | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | fc6326ed8f5ba64df68990cbe0285a086ab164bf | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/audio-player.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled ... | var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
enabled: false,
subscriptions: null,
conf: [],
init: function() {
return this.enableSubscription = atom.config.observe('activate-power-mode.playAudio.enabled', (value) => {
this.enab... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | fc6326ed8f5ba64df68990cbe0285a086ab164bf | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
enabled: false,
subscriptions: null,
conf: [],
init: function() {
return this.enableSubscription = atom.config.observe('activate-powe... | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | fc6326ed8f5ba64df68990cbe0285a086ab164bf | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:completion | completion | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
enabled: false
subscriptions: null
conf: []
init: ->
@enableSubscription = atom.config.observe(
'activate-power-mode.playAudio.enabled', (value) =>
@enabled = value
if @enabled
@enable()
e... | disable: ->
@subscriptions?.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom.config.observe(
"activate-power-mode.playAudio.#{key}", (value) =>
@conf[key] = value
@loadAudio() if loadAudio
)
initConfigSubscribers: ->
@subscriptions = new CompositeDisposab... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | fc6326ed8f5ba64df68990cbe0285a086ab164bf | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/audio-player.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:2:raw_corpus | raw_corpus | @audio.currentTime = 0
@audio.volume = @conf['volume']
@audio.play() | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | fc6326ed8f5ba64df68990cbe0285a086ab164bf | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/audio-player.coffee | 51 | 54 | ||
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:raw_corpus | raw_corpus | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
subscriptions: null
conf: []
init: ->
@initConfigSubscribers()
disable: ->
@subscriptions.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom.config.observe(
"activate-power-mode.playAudio.#{k... | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/audio-player.coffee | 1 | 37 | ||
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{CompositeDisposable} = require "atom"
path = require "path"
module.exports =
subscriptions: null
conf: []
init: ->
@initConfigSubscribers()
disable: ->
@subscriptions.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom... | var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
subscriptions: null,
conf: [],
init: function() {
return this.initConfigSubscribers();
},
disable: function() {
return this.subscriptions.dispose();
},
observe: function(key, loa... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/audio-player.coffee | 1 | 37 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CompositeDisposable, path;
({CompositeDisposable} = require("atom"));
path = require("path");
module.exports = {
subscriptions: null,
conf: [],
init: function() {
return this.initConfigSubscribers();
},
disable: function() {
return this.sub... | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
subscriptions: null
conf: []
init: ->
@initConfigSubscribers()
disable: ->
@subscriptions.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom.config.observe(
"activate-power-mode.playAudio.#{k... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/audio-player.coffee | 1 | 37 |
JoelBesada/activate-power-mode:lib/service/audio-player.coffee:1:completion | completion | {CompositeDisposable} = require "atom"
path = require "path"
module.exports =
subscriptions: null
conf: []
init: ->
@initConfigSubscribers()
disable: ->
@subscriptions.dispose()
observe: (key, loadAudio = true) ->
@subscriptions.add atom.config.observe(
"activate-power-mode.playAudio.#{k... | )
initConfigSubscribers: ->
@subscriptions = new CompositeDisposable
@observe 'audioclip'
@observe 'customAudioclip'
@observe 'volume', false
loadAudio: ->
if @conf['audioclip'] is 'customAudioclip' and @conf['customAudioclip']
pathtoaudio = @conf['customAudioclip']
else
pathto... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/service/audio-player.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/audio-player.coffee | 1 | 37 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:raw_corpus | raw_corpus | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
$ = jQuery
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.defa... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 1 | 45 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
$ = jQuery
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
cont... | describe("settings", function() {
var $, $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
$ = jQuery;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
data: fixtures["names"]
});
... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 1 | 45 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("settings", function() {
var $, $inputor, app, callbacks, controller;
$inputor = null;
app = null;
controller = null;
callbacks = null;
$ = jQuery;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho(... | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
$ = jQuery
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.defa... | JavaScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 1 | 45 |
ichord/At.js:spec/javascripts/settings.spec.coffee:1:completion | completion | describe "settings", ->
$inputor = null
app = null
controller = null
callbacks = null
$ = jQuery
beforeEach ->
loadFixtures("inputors.html")
$inputor = $("#inputor").atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
controller = app.controller()
callbacks = $.fn.atwho.defa... | $.fn.atwho.default.limit = 8
$inputor = $("<input/>").atwho at: "@"
controller = $inputor.data('atwho').setContextFor("@").controller()
expect(controller.callbacks("filter")).toBe func
expect(controller.getOpt("limit")).toBe 8
$.extend $.fn.atwho.default.callbacks, old
it "setting empty at", ->
... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 1 | 45 |
ichord/At.js:spec/javascripts/settings.spec.coffee:2:raw_corpus | raw_corpus | triggerAtwhoAt $inputor
expect(filter).toHaveBeenCalled()
expect(callbacks.filter).not.toHaveBeenCalled()
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
displayTimeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$el... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 47 | 92 | ||
ichord/At.js:spec/javascripts/settings.spec.coffee:2:completion | completion | triggerAtwhoAt $inputor
expect(filter).toHaveBeenCalled()
expect(callbacks.filter).not.toHaveBeenCalled()
it "setting timeout", ->
jasmine.clock().install()
$inputor.atwho
at: "@"
displayTimeout: 500
simulateTypingIn $inputor
$inputor.trigger "blur"
view = controller.view.$el... | controller = $inputor.data('atwho').setContextFor("$").controller()
simulateTypingIn $inputor, "$"
expect(controller.view.visible()).toBe true
it "can be trigger with no space", ->
$inputor = $('#inputor3').atwho
at: "@"
data: fixtures["names"]
startWithSpace: no
controller = $inpu... | CoffeeScript | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 47 | 92 |
ichord/At.js:spec/javascripts/settings.spec.coffee:3:raw_corpus | raw_corpus | it 'query out of maxLen', ->
$inputor.atwho
at: '@'
maxLen: 0
simulateTypingIn $inputor
expect(controller.query).toBe null
it 'should not build query or run afterMatchFailed callback when out of minLen', ->
$inputor = $('#editable').atwho
at: '@'
minLen: 2
callbacks:
... | CoffeeScript | ichord/At.js | spec/javascripts/settings.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/settings.spec.coffee | 94 | 136 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.