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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JoelBesada/activate-power-mode:lib/screen-shake.coffee:1:completion | completion | random = require "lodash.random"
module.exports =
shake: (editorElement) ->
min = @getConfig "minIntensity"
max = @getConfig "maxIntensity"
x = @shakeIntensity min, max
y = @shakeIntensity min, max | editorElement.style.transform = "translate(#{x}, #{y})"
requestAnimationFrame ->
editorElement.style.transform = "translate(0, 0)"
shakeIntensity: (min, max) ->
direction = if Math.random() > 0.5 then -1 else 1
random(min, max, true) * direction
getConfig: (config) ->
atom.config.get "activ... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/screen-shake.coffee | MIT | 9a85f8860708d5a0fec6e9d36a7cb55febbe01ba | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/9a85f8860708d5a0fec6e9d36a7cb55febbe01ba/lib/screen-shake.coffee | 1 | 21 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.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 ... | parameters = { }
if dashboardId? then parameters.dashboard = dashboardId
if startDate? then parameters.startDate = startDate.toISOString()
if endDate? then parameters.endDate = endDate.toISOString()
# Calculate appropriate resolution from the time range
if startDate?
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:2:raw_corpus | raw_corpus | $http.get(configService.restServiceUrl + '/analytics/' + endpoint, { params: parameters })
.then (result) ->
_.each result.data, (row) ->
# Convert date strings to Date objects
if row.date? then row.date = new Date(row.date)
result.data
.catch (er... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 42 | 82 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:2:completion | completion | $http.get(configService.restServiceUrl + '/analytics/' + endpoint, { params: parameters })
.then (result) ->
_.each result.data, (row) ->
# Convert date strings to Date objects
if row.date? then row.date = new Date(row.date)
result.data
.catch (er... | currentPage: null
isExporting: $location.search().exporting == 'true'
getPageViewsOverTime: (dashboardId, startDate, endDate) ->
analyticsHelper 'getPageViewsOverTime', 'pageviewsovertime', dashboardId, startDate, endDate
getVisitsOverTime: (dashboardId, startDate, endDate) ->
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 42 | 82 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:3:raw_corpus | raw_corpus | getDataSourcesByType: (dashboardId, startDate, endDate) ->
analyticsHelper 'getDataSourcesByType', 'datasourcesbytype', dashboardId, startDate, endDate
getDataSourcesByName: (dashboardId, startDate, endDate) ->
analyticsHelper 'getDataSourcesByName', 'datasourcesbyname', dashboardId, st... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 84 | 122 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:3:completion | completion | getDataSourcesByType: (dashboardId, startDate, endDate) ->
analyticsHelper 'getDataSourcesByType', 'datasourcesbytype', dashboardId, startDate, endDate
getDataSourcesByName: (dashboardId, startDate, endDate) ->
analyticsHelper 'getDataSourcesByName', 'datasourcesbyname', dashboardId, st... | result.data
.catch (error) ->
alertify.error 'Cannot connect to cyclotron-svc (getStatistics)', 2500
}
# Unique user identifier for anonymous users, stored in local storage
# Used *only* for analytics
# Promise to avoid sending analytics without a UID value
uidLoaded = ... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 84 | 122 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:raw_corpus | raw_corpus | # Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 162 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIn... | // Record a Page View (occurance of a page being viewed)
exports.recordPageView = function(dashboard, pageIndex, newVisit = false) {
var req, widgets;
if (!configService.enableAnalytics) {
return;
}
exports.currentDashboard = dashboard;
exports.currentPage = pageIndex;
// Exclude hidden widgets
widget... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 162 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Record a Page View (occurance of a page being viewed)
exports.recordPageView = function(dashboard, pageIndex, newVisit = false) {
var req, widgets;
if (!configService.enableAnalytics) {
return;
}
exports.currentDashboard = dashboard;
exports.curren... | # Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 162 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:completion | completion | # Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _... | uidLoaded.promise.then ->
if (userService.authEnabled && userService.isLoggedIn())
req.user = userService.currentUser()._id
else
# Anonymous: track the UID
req.uid = exports.uid
# Also send cached UserId if it exists
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 162 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:raw_corpus | raw_corpus | req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.type
success: success
duration: du... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 164 | 201 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.t... | var req;
req = {
visitId: exports.visitId,
dashboard: exports.currentDashboard._id,
rev: exports.currentDashboard.rev,
page: exports.currentPage,
dataSourceName: dataSource.name,
dataSourceType: dataSource.type,
success: success,
duration: duration,
details: details
};
logService.debug('Data Source ... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 164 | 201 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var req;
req = {
visitId: exports.visitId,
dashboard: exports.currentDashboard._id,
rev: exports.currentDashboard.rev,
page: exports.currentPage,
dataSourceName: dataSource.name,
dataSourceType: dataSource.type,
success: success,
duration: duration... | req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.type
success: success
duration: du... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 164 | 201 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:completion | completion | req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.type
success: success
duration: du... | eventType: type
visitId: exports.visitId
details: details
uidLoaded.promise.then ->
if (userService.authEnabled && userService.isLoggedIn())
req.user = userService.currentUser()._id
else
# Anonymous: track the UID
r... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 164 | 201 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.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 ... | parameters = { }
if dashboardId? then parameters.dashboard = dashboardId
if startDate? then parameters.startDate = startDate.toISOString()
if endDate? then parameters.endDate = endDate.toISOString()
# Calculate appropriate resolution from the time range
if startDate?
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:raw_corpus | raw_corpus | # Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 172 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIn... | // Record a Page View (occurance of a page being viewed)
exports.recordPageView = function(dashboard, pageIndex, newVisit = false) {
var req, widgets;
if (!configService.enableAnalytics) {
return;
}
exports.currentDashboard = dashboard;
exports.currentPage = pageIndex;
// Exclude hidden widgets
widget... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 172 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Record a Page View (occurance of a page being viewed)
exports.recordPageView = function(dashboard, pageIndex, newVisit = false) {
var req, widgets;
if (!configService.enableAnalytics) {
return;
}
exports.currentDashboard = dashboard;
exports.curren... | # Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 172 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:completion | completion | # Record a Page View (occurance of a page being viewed)
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _... | # Anonymous: track the UID
req.uid = exports.uid
# Also send cached UserId if it exists
if userService.cachedUserId?
req.user = userService.cachedUserId
$http.post(configService.restServiceUrl + '/analytics/pageviews?newVisit=' + newVisit... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 172 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:raw_corpus | raw_corpus | $http.post(configService.restServiceUrl + '/analytics/datasources', req)
# Generic schema for recording events
exports.recordEvent = (type, details = {}) ->
return unless configService.enableAnalytics
req =
eventType: type
visitId: exports.visitId
details: de... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 174 | 197 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:completion | completion | $http.post(configService.restServiceUrl + '/analytics/datasources', req)
# Generic schema for recording events
exports.recordEvent = (type, details = {}) ->
return unless configService.enableAnalytics
req =
eventType: type
visitId: exports.visitId
details: de... | req.user = userService.currentUser()._id
else
# Anonymous: track the UID
req.uid = exports.uid
# Also send cached UserId if it exists
if userService.cachedUserId?
req.user = userService.cachedUserId
$http.post(... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 174 | 197 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:raw_corpus | raw_corpus | exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _.reject dashboard.dashboard.pages[pageIndex].widgets, { hidd... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 163 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _.re... | exports.recordPageView = function(dashboard, pageIndex, newVisit = false) {
var req, widgets;
if (!configService.enableAnalytics) {
return;
}
exports.currentDashboard = dashboard;
exports.currentPage = pageIndex;
// Exclude hidden widgets
widgets = _.reject(dashboard.dashboard.pages[pageIndex].widgets... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 163 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.recordPageView = function(dashboard, pageIndex, newVisit = false) {
var req, widgets;
if (!configService.enableAnalytics) {
return;
}
exports.currentDashboard = dashboard;
exports.currentPage = pageIndex;
// Exclude hidden widgets
widgets ... | exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _.reject dashboard.dashboard.pages[pageIndex].widgets, { hidd... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 163 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:4:completion | completion | exports.recordPageView = (dashboard, pageIndex, newVisit = false) ->
return unless configService.enableAnalytics
exports.currentDashboard = dashboard
exports.currentPage = pageIndex
# Exclude hidden widgets
widgets = _.reject dashboard.dashboard.pages[pageIndex].widgets, { hidd... | if (userService.authEnabled && userService.isLoggedIn())
req.user = userService.currentUser()._id
else
# Anonymous: track the UID
req.uid = exports.uid
# Also send cached UserId if it exists
if userService.cachedUserId?
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 124 | 163 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:raw_corpus | raw_corpus | req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.type
success: success
duration: du... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 165 | 181 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.t... | var req;
req = {
visitId: exports.visitId,
dashboard: exports.currentDashboard._id,
rev: exports.currentDashboard.rev,
page: exports.currentPage,
dataSourceName: dataSource.name,
dataSourceType: dataSource.type,
success: success,
duration: duration,
details: details
};
//console.log '---- DATA SOURC... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 165 | 181 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var req;
req = {
visitId: exports.visitId,
dashboard: exports.currentDashboard._id,
rev: exports.currentDashboard.rev,
page: exports.currentPage,
dataSourceName: dataSource.name,
dataSourceType: dataSource.type,
success: success,
duration: duration... | req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.type
success: success
duration: du... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 165 | 181 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/services/services.analytics.coffee:5:completion | completion | req =
visitId: exports.visitId
dashboard: exports.currentDashboard._id
rev: exports.currentDashboard.rev
page: exports.currentPage
dataSourceName: dataSource.name
dataSourceType: dataSource.type
success: success | duration: duration
details: details
#console.log '---- DATA SOURCE ANALYTICS ----'
#console.log req
$http.post(configService.restServiceUrl + '/analytics/datasources', req)
return exports | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/services/services.analytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/services/services.analytics.coffee | 165 | 181 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
... | var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
});
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActiveP... | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | setupPane: ->
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@editor = atom.workspace.getActiveTextEditor()
if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = @editor.getElement()
@inputSubscription = @editor.getBuffer().onDi... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | screenPos = @editor.screenPositionForBufferPosition @inputHandler.getPosition()
cursor = @editor.getCursorAtScreenPosition screenPos
return unless cursor
@pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/power-editor.coffee | 51 | 58 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | screenPos = @editor.screenPositionForBufferPosition @inputHandler.getPosition()
cursor = @editor.getCursorAtScreenPosition screenPos
return unless cursor | @pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/power-editor.coffee | 51 | 58 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ddb554a0188f35732c528ebe79a3f5a41d3e4b24 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ddb554a0188f35732c528ebe79a3f5a41d3e4b24/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
... | var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
});
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ddb554a0188f35732c528ebe79a3f5a41d3e4b24 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ddb554a0188f35732c528ebe79a3f5a41d3e4b24/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActiveP... | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ddb554a0188f35732c528ebe79a3f5a41d3e4b24 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ddb554a0188f35732c528ebe79a3f5a41d3e4b24/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | setupPane: ->
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@editor = atom.workspace.getActiveTextEditor()
if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = @editor.getElement()
@inputSubscription = @editor.getBuffer().onDi... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ddb554a0188f35732c528ebe79a3f5a41d3e4b24 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ddb554a0188f35732c528ebe79a3f5a41d3e4b24/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | cursor = @editor.getCursorAtScreenPosition screenPos
return unless cursor
@pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ddb554a0188f35732c528ebe79a3f5a41d3e4b24 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ddb554a0188f35732c528ebe79a3f5a41d3e4b24/lib/power-editor.coffee | 51 | 57 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | cursor = @editor.getCursorAtScreenPosition screenPos
return unless cursor | @pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ddb554a0188f35732c528ebe79a3f5a41d3e4b24 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ddb554a0188f35732c528ebe79a3f5a41d3e4b24/lib/power-editor.coffee | 51 | 57 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
... | var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
});
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActiveP... | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | setupPane: ->
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@editor = atom.workspace.getActiveTextEditor()
if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = @editor.getElement()
@inputSubscription = @editor.getBuffer().onDi... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | return unless cursor
@pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 51 | 56 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return unless cursor
@pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}"
``` | if (!cursor) {
return this.pluginManager.runOnInput(cursor, screenPos, this.inputHandler);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
}); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (!cursor) {
return this.pluginManager.runOnInput(cursor, screenPos, this.inputHandler);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
});
``` | return unless cursor
@pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | return unless cursor
@pluginManager.runOnInput cursor, screenPos, @inputHandler | getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 80ab2a200945ff71dc5648b7b9cda3e0272b3cfe | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/80ab2a200945ff71dc5648b7b9cda3e0272b3cfe/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
... | var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
});
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var inputHandler,
indexOf = [].indexOf;
inputHandler = require("./input-handler");
module.exports = {
inputHandler: inputHandler,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActiveP... | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | inputHandler = require "./input-handler"
module.exports =
inputHandler: inputHandler
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscript... | setupPane: ->
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@editor = atom.workspace.getActiveTextEditor()
if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = @editor.getElement()
@inputSubscription = @editor.getBuffer().onDi... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | @pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 51 | 55 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}"
``` | this.pluginManager.runOnInput(cursor, screenPos, this.inputHandler({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
})); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.pluginManager.runOnInput(cursor, screenPos, this.inputHandler({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
}));
``` | @pluginManager.runOnInput cursor, screenPos, @inputHandler
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | @pluginManager.runOnInput cursor, screenPos, @inputHandler | getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 34d269ed3925206492b397f2ab97aff6557d434b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/34d269ed3925206492b397f2ab97aff6557d434b/lib/power-editor.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | @pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 6b61e450677eac9707dfee087d18a58686fb0c52 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/6b61e450677eac9707dfee087d18a58686fb0c52/lib/power-editor.coffee | 51 | 55 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}"
``` | this.pluginManager.runOnInput(cursor, screenPos({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
})); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 6b61e450677eac9707dfee087d18a58686fb0c52 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/6b61e450677eac9707dfee087d18a58686fb0c52/lib/power-editor.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.pluginManager.runOnInput(cursor, screenPos({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
}));
``` | @pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 6b61e450677eac9707dfee087d18a58686fb0c52 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/6b61e450677eac9707dfee087d18a58686fb0c52/lib/power-editor.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | @pluginManager.runOnInput cursor, screenPos | getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 6b61e450677eac9707dfee087d18a58686fb0c52 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/6b61e450677eac9707dfee087d18a58686fb0c52/lib/power-editor.coffee | 51 | 55 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | module.exports =
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@pluginManager.dis... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscription?.dispose()
... | var indexOf = [].indexOf;
module.exports = {
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
});
return this.setupPane();
},
disable: function() {
var ref, ref1, ref2;
if ... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var indexOf = [].indexOf;
module.exports = {
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
});
return this.setupPane();
},
... | module.exports =
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@pluginManager.dis... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | module.exports =
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubscription?.dispose()
@cursorSubscription?.dispose()
@pluginManager.dis... | if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = @editor.getElement()
@inputSubscription = @editor.getBuffer().onDidChange @handleInput.bind(this)
@cursorSubscription = @editor.observeCursors @handleCursor.bind(this)
@pluginManager.runOnChangePa... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | return unless cursor
@pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 51 | 56 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return unless cursor
@pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}"
``` | if (!cursor) {
return this.pluginManager.runOnInput(cursor, screenPos);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
}); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (!cursor) {
return this.pluginManager.runOnInput(cursor, screenPos);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
});
``` | return unless cursor
@pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | return unless cursor
@pluginManager.runOnInput cursor, screenPos | getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 779de77e021589d3ab9a8e665e3210e91cdaa5f0 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/779de77e021589d3ab9a8e665e3210e91cdaa5f0/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubsc... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | fa676ccab8d558ce51759aa113f7087ce49c4687 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fa676ccab8d558ce51759aa113f7087ce49c4687/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ... | var pluginManager,
indexOf = [].indexOf;
pluginManager = require("./plugin-manager");
module.exports = {
pluginManager: pluginManager,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | fa676ccab8d558ce51759aa113f7087ce49c4687 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fa676ccab8d558ce51759aa113f7087ce49c4687/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var pluginManager,
indexOf = [].indexOf;
pluginManager = require("./plugin-manager");
module.exports = {
pluginManager: pluginManager,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingAc... | pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubsc... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | fa676ccab8d558ce51759aa113f7087ce49c4687 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fa676ccab8d558ce51759aa113f7087ce49c4687/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubsc... | @editor = atom.workspace.getActiveTextEditor()
if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = @editor.getElement()
@inputSubscription = @editor.getBuffer().onDidChange @handleInput.bind(this)
@cursorSubscription = @editor.observeCursors @handl... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | fa676ccab8d558ce51759aa113f7087ce49c4687 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fa676ccab8d558ce51759aa113f7087ce49c4687/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | cursor = @editor.getCursorAtScreenPosition screenPos
return unless cursor
@pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | fa676ccab8d558ce51759aa113f7087ce49c4687 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fa676ccab8d558ce51759aa113f7087ce49c4687/lib/power-editor.coffee | 51 | 57 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | cursor = @editor.getCursorAtScreenPosition screenPos
return unless cursor | @pluginManager.runOnInput cursor, screenPos
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | fa676ccab8d558ce51759aa113f7087ce49c4687 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/fa676ccab8d558ce51759aa113f7087ce49c4687/lib/power-editor.coffee | 51 | 57 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubsc... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/power-editor.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ... | var pluginManager,
indexOf = [].indexOf;
pluginManager = require("./plugin-manager");
module.exports = {
pluginManager: pluginManager,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem(() => {
return this.setupPane();
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var pluginManager,
indexOf = [].indexOf;
pluginManager = require("./plugin-manager");
module.exports = {
pluginManager: pluginManager,
enable: function() {
this.pluginManager.enable();
this.changePaneSubscription = atom.workspace.onDidStopChangingAc... | pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubsc... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | pluginManager = require "./plugin-manager"
module.exports =
pluginManager: pluginManager
enable: ->
@pluginManager.enable()
@changePaneSubscription = atom.workspace.onDidStopChangingActivePaneItem =>
@setupPane()
@setupPane()
disable: ->
@changePaneSubscription?.dispose()
@inputSubsc... | @editor = atom.workspace.getActiveTextEditor()
if not @editor or @isExcludedFile()
@pluginManager.runOnChangePane()
return
@editorElement = atom.views.getView @editor
@inputSubscription = @editor.getBuffer().onDidChange @handleInput.bind(this)
@cursorSubscription = @editor.observeCursors @... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | ef268c960138fd09ca9076e0766119d697f25dfa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/power-editor.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | return unless cursor
@pluginManager.runOnInput cursor
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7/lib/power-editor.coffee | 51 | 56 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return unless cursor
@pluginManager.runOnInput cursor
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}"
``` | if (!cursor) {
return this.pluginManager.runOnInput(cursor);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
}); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (!cursor) {
return this.pluginManager.runOnInput(cursor);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
});
``` | return unless cursor
@pluginManager.runOnInput cursor
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | return unless cursor
@pluginManager.runOnInput cursor | getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/314e0042f8e4551d8fcc7ce9f3c0df0edf7c9dd7/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | return unless cursor
@pluginManager.runOnInput @editor, @editorElement, cursor
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 5d1989713f4204e3d12cbcc14325622e74b29dc9 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/5d1989713f4204e3d12cbcc14325622e74b29dc9/lib/power-editor.coffee | 51 | 56 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return unless cursor
@pluginManager.runOnInput @editor, @editorElement, cursor
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}"
``` | if (!cursor) {
return this.pluginManager.runOnInput(this.editor, this.editorElement, cursor);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
}); | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 5d1989713f4204e3d12cbcc14325622e74b29dc9 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/5d1989713f4204e3d12cbcc14325622e74b29dc9/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (!cursor) {
return this.pluginManager.runOnInput(this.editor, this.editorElement, cursor);
}
({
getConfig: function(config) {
return atom.config.get(`activate-power-mode.${config}`);
}
});
``` | return unless cursor
@pluginManager.runOnInput @editor, @editorElement, cursor
getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 5d1989713f4204e3d12cbcc14325622e74b29dc9 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/5d1989713f4204e3d12cbcc14325622e74b29dc9/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:completion | completion | return unless cursor
@pluginManager.runOnInput @editor, @editorElement, cursor | getConfig: (config) ->
atom.config.get "activate-power-mode.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 5d1989713f4204e3d12cbcc14325622e74b29dc9 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/5d1989713f4204e3d12cbcc14325622e74b29dc9/lib/power-editor.coffee | 51 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:raw_corpus | raw_corpus | module.exports =
screenShake: screenShake
playAudio: playAudio
powerCanvas: powerCanvas
comboMode: comboMode
enable: ->
@throttledShake = throttle @screenShake.shake.bind(@screenShake), 100, trailing: false
@throttledPlayAudio = throttle @playAudio.play.bind(@playAudio), 100, trailing: false
@ac... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 7 | 56 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
screenShake: screenShake
playAudio: playAudio
powerCanvas: powerCanvas
comboMode: comboMode
enable: ->
@throttledShake = throttle @screenShake.shake.bind(@screenShake), 100, trailing: false
@throttledPlayAudio = throttle @playA... | var indexOf = [].indexOf;
module.exports = {
screenShake: screenShake,
playAudio: playAudio,
powerCanvas: powerCanvas,
comboMode: comboMode,
enable: function() {
this.throttledShake = throttle(this.screenShake.shake.bind(this.screenShake), 100, {
trailing: false
});
this.throttledPlayAudio ... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 7 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var indexOf = [].indexOf;
module.exports = {
screenShake: screenShake,
playAudio: playAudio,
powerCanvas: powerCanvas,
comboMode: comboMode,
enable: function() {
this.throttledShake = throttle(this.screenShake.shake.bind(this.screenShake), 100, {
... | module.exports =
screenShake: screenShake
playAudio: playAudio
powerCanvas: powerCanvas
comboMode: comboMode
enable: ->
@throttledShake = throttle @screenShake.shake.bind(@screenShake), 100, trailing: false
@throttledPlayAudio = throttle @playAudio.play.bind(@playAudio), 100, trailing: false
@ac... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 7 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:1:completion | completion | module.exports =
screenShake: screenShake
playAudio: playAudio
powerCanvas: powerCanvas
comboMode: comboMode
enable: ->
@throttledShake = throttle @screenShake.shake.bind(@screenShake), 100, trailing: false
@throttledPlayAudio = throttle @playAudio.play.bind(@playAudio), 100, trailing: false
@ac... | @comboModeEnabledSubscription?.dispose()
@editorAddCursor?.dispose()
@powerCanvas.destroy()
@comboMode.destroy()
@isComboMode = false
subscribeToActiveTextEditor: ->
@powerCanvas.resetCanvas()
@comboMode.reset() if @isComboMode
@prepareEditor()
prepareEditor: ->
@editorChangeSubscr... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 7 | 56 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:raw_corpus | raw_corpus | handleCursor: (cursor) ->
cursor.throttleSpawnParticles = throttle @powerCanvas.spawnParticles.bind(@powerCanvas), 25, trailing: false
onChange: (e) ->
spawnParticles = true
if e.newText
spawnParticles = e.newText isnt "\n"
range = e.newRange.end
else
range = e.newRange.start
s... | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 57 | 88 | ||
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
handleCursor: (cursor) ->
cursor.throttleSpawnParticles = throttle @powerCanvas.spawnParticles.bind(@powerCanvas), 25, trailing: false
onChange: (e) ->
spawnParticles = true
if e.newText
spawnParticles = e.newText isnt "\n"
range = e.ne... | ({
handleCursor: function(cursor) {
return cursor.throttleSpawnParticles = throttle(this.powerCanvas.spawnParticles.bind(this.powerCanvas), 25, {
trailing: false
});
},
onChange: function(e) {
var cursor, range, screenPosition, spawnParticles;
spawnParticles = true;
if (e.newText) {
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 57 | 88 |
JoelBesada/activate-power-mode:lib/power-editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
handleCursor: function(cursor) {
return cursor.throttleSpawnParticles = throttle(this.powerCanvas.spawnParticles.bind(this.powerCanvas), 25, {
trailing: false
});
},
onChange: function(e) {
var cursor, range, screenPosition, spawnParticle... | handleCursor: (cursor) ->
cursor.throttleSpawnParticles = throttle @powerCanvas.spawnParticles.bind(@powerCanvas), 25, trailing: false
onChange: (e) ->
spawnParticles = true
if e.newText
spawnParticles = e.newText isnt "\n"
range = e.newRange.end
else
range = e.newRange.start
s... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/power-editor.coffee | MIT | 33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/power-editor.coffee | 57 | 88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.