id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | # Whenever the user edits the CoffeeScript side of a code example, update the JavaScript output
# If the editor is Try CoffeeScript, also update the hash and save this code in localStorage
if mode is 'coffeescript'
pending = null
editor.on 'change', (instance, change) ->
clearTimeout pending... | lastCompilationElapsedTime = Math.max(200, Date.now() - lastCompilationStartTime)
catch exception
output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime
# Fix the code editors’ handling of tab-indented code
editor.addKeyMap
'T... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 44a27c62044b51b072944835bc40080c9a4a62aa | 16,577 | https://github.com/jashkenas/coffeescript/blob/44a27c62044b51b072944835bc40080c9a4a62aa/documentation/v2/docs.coffee | 51 | 91 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:raw_corpus | raw_corpus | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 44a27c62044b51b072944835bc40080c9a4a62aa | 16,577 | https://github.com/jashkenas/coffeescript/blob/44a27c62044b51b072944835bc40080c9a4a62aa/documentation/v2/docs.coffee | 93 | 128 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
... | // Handle the code example buttons
var closeTry, toggleTry;
$('[data-action="run-code-example"]').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
if (run !== true) {
js = `${js}\nalert(${unescape(... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 44a27c62044b51b072944835bc40080c9a4a62aa | 16,577 | https://github.com/jashkenas/coffeescript/blob/44a27c62044b51b072944835bc40080c9a4a62aa/documentation/v2/docs.coffee | 93 | 128 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Handle the code example buttons
var closeTry, toggleTry;
$('[data-action="run-code-example"]').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
... | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 44a27c62044b51b072944835bc40080c9a4a62aa | 16,577 | https://github.com/jashkenas/coffeescript/blob/44a27c62044b51b072944835bc40080c9a4a62aa/documentation/v2/docs.coffee | 93 | 128 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:completion | completion | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | closeTry = ->
$('#try, #try-link').removeClass 'active'
$('[data-toggle="try"]').click toggleTry
$('[data-close="try"]').click closeTry
# Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry yes
else if window.location.hash.indexOf('#try') is 0
... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 44a27c62044b51b072944835bc40080c9a4a62aa | 16,577 | https://github.com/jashkenas/coffeescript/blob/44a27c62044b51b072944835bc40080c9a4a62aa/documentation/v2/docs.coffee | 93 | 128 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:raw_corpus | raw_corpus | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 704924c3cd1a572ed19f20c25b7468d8ba2c43a4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/704924c3cd1a572ed19f20c25b7468d8ba2c43a4/documentation/v2/docs.coffee | 93 | 128 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
... | // Handle the code example buttons
var closeTry, toggleTry;
$('[data-action="run-code-example"]').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
if (run !== true) {
js = `${js}\nalert(${unescape(... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 704924c3cd1a572ed19f20c25b7468d8ba2c43a4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/704924c3cd1a572ed19f20c25b7468d8ba2c43a4/documentation/v2/docs.coffee | 93 | 128 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Handle the code example buttons
var closeTry, toggleTry;
$('[data-action="run-code-example"]').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
... | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 704924c3cd1a572ed19f20c25b7468d8ba2c43a4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/704924c3cd1a572ed19f20c25b7468d8ba2c43a4/documentation/v2/docs.coffee | 93 | 128 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:completion | completion | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | closeTry = ->
$('#try, #try-link').removeClass 'active'
$('[data-toggle="try"]').click toggleTry
$('[data-close="try"]').click closeTry
# Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry yes
else if window.location.hash.indexOf('#try') is 0
... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 704924c3cd1a572ed19f20c25b7468d8ba2c43a4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/704924c3cd1a572ed19f20c25b7468d8ba2c43a4/documentation/v2/docs.coffee | 93 | 128 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:raw_corpus | raw_corpus | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 1f31073201e87624f86d6ed34ab81191595b0aa6 | 16,577 | https://github.com/jashkenas/coffeescript/blob/1f31073201e87624f86d6ed34ab81191595b0aa6/documentation/v2/docs.coffee | 93 | 126 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
... | // Handle the code example buttons
var closeTry, toggleTry;
$('[data-action="run-code-example"]').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
if (run !== true) {
js = `${js}\nalert(${unescape(... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 1f31073201e87624f86d6ed34ab81191595b0aa6 | 16,577 | https://github.com/jashkenas/coffeescript/blob/1f31073201e87624f86d6ed34ab81191595b0aa6/documentation/v2/docs.coffee | 93 | 126 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Handle the code example buttons
var closeTry, toggleTry;
$('[data-action="run-code-example"]').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
... | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 1f31073201e87624f86d6ed34ab81191595b0aa6 | 16,577 | https://github.com/jashkenas/coffeescript/blob/1f31073201e87624f86d6ed34ab81191595b0aa6/documentation/v2/docs.coffee | 93 | 126 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:completion | completion | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
# Try CoffeeScript
toggleTry = (checkLoc... | $('#try, #try-link').toggleClass 'active'
closeTry = ->
$('#try, #try-link').removeClass 'active'
$('[data-toggle="try"]').click toggleTry
$('[data-close="try"]').click closeTry
# Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry yes
else if ... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 1f31073201e87624f86d6ed34ab81191595b0aa6 | 16,577 | https://github.com/jashkenas/coffeescript/blob/1f31073201e87624f86d6ed34ab81191595b0aa6/documentation/v2/docs.coffee | 93 | 126 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 1 | 41 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':vis... | $(document).ready(function() {
var closeTry, initializeScrollspyFromHash, toggleSidebar, toggleTry;
// Mobile navigation
toggleSidebar = function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
};
$('[data-toggle="offcanvas"]').click(toggleSidebar);
$('[data-action="sidebar-nav"]').c... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 1 | 41 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var closeTry, initializeScrollspyFromHash, toggleSidebar, toggleTry;
// Mobile navigation
toggleSidebar = function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
};
$('[data-toggle="offcanvas"]').cli... | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 1 | 41 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | $('#try, #try-link').removeClass 'active'
$('[data-toggle="try"]').click toggleTry
$('[data-close="try"]').click closeTry
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
# See also http://www.codingeverything.com/2014/02/BootstrapDocsSideBar.html and http... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 1 | 41 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:raw_corpus | raw_corpus | # Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirro... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 43 | 83 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' els... | // Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
var editors, lastCompilationElapsedTime;
editors = [];
lastCompilationElapsedTime = 200;
$('textarea').each(function(index) {
var editor, mode, pending;
$(this).data('index', index);
mode = $(this).hasClass('javascript-output') ... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 43 | 83 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
var editors, lastCompilationElapsedTime;
editors = [];
lastCompilationElapsedTime = 200;
$('textarea').each(function(index) {
var editor, mode, pending;
$(this).data('index', ... | # Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirro... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 43 | 83 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | # Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirro... | pending = null
editor.on 'change', (instance, change) ->
clearTimeout pending
pending = setTimeout ->
lastCompilationStartTime = Date.now()
try
output = CoffeeScript.compile editor.getValue(), bare: yes
lastCompilationElapsedTime = Math.max(200, Date.now... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 43 | 83 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:raw_corpus | raw_corpus | $('[data-action="link"]').click ->
index = $("##{$(@).data('example')}-coffee").data 'index'
coffee = editors[index].getValue()
link = "try:#{encodeURIComponent coffee}"
window.history.pushState {}, 'CoffeeScript', "#{location.href.split('#')[0]}##{link}"
# Configure the initial state
if window.lo... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 86 | 101 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$('[data-action="link"]').click ->
index = $("##{$(@).data('example')}-coffee").data 'index'
coffee = editors[index].getValue()
link = "try:#{encodeURIComponent coffee}"
window.history.pushState {}, 'CoffeeScript', "#{location.href.split('#')[0]}#... | $('[data-action="link"]').click(function() {
var coffee, index, link;
index = $(`#${$(this).data('example')}-coffee`).data('index');
coffee = editors[index].getValue();
link = `try:${encodeURIComponent(coffee)}`;
return window.history.pushState({}, 'CoffeeScript', `${location.href.split('#')[0]}#${link}`);
})... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 86 | 101 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$('[data-action="link"]').click(function() {
var coffee, index, link;
index = $(`#${$(this).data('example')}-coffee`).data('index');
coffee = editors[index].getValue();
link = `try:${encodeURIComponent(coffee)}`;
return window.history.pushState({}, 'Coffe... | $('[data-action="link"]').click ->
index = $("##{$(@).data('example')}-coffee").data 'index'
coffee = editors[index].getValue()
link = "try:#{encodeURIComponent coffee}"
window.history.pushState {}, 'CoffeeScript', "#{location.href.split('#')[0]}##{link}"
# Configure the initial state
if window.lo... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 86 | 101 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:completion | completion | $('[data-action="link"]').click ->
index = $("##{$(@).data('example')}-coffee").data 'index'
coffee = editors[index].getValue()
link = "try:#{encodeURIComponent coffee}"
window.history.pushState {}, 'CoffeeScript', "#{location.href.split('#')[0]}##{link}"
# Configure the initial state | if window.location.hash?
if window.location.hash is '#try'
toggleTry()
else if window.location.hash.indexOf('#try') is 0
editors[0].setValue decodeURIComponent window.location.hash[5..]
toggleTry()
else
initializeScrollspyFromHash window.location.hash | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 9e13100f58818cd26effb024169cc734500dd152 | 16,577 | https://github.com/jashkenas/coffeescript/blob/9e13100f58818cd26effb024169cc734500dd152/documentation/v2/docs.coffee | 86 | 101 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:raw_corpus | raw_corpus | # Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirro... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 0fc625d7e9626f65cfc8bb57d3d99533596c689f | 16,577 | https://github.com/jashkenas/coffeescript/blob/0fc625d7e9626f65cfc8bb57d3d99533596c689f/documentation/v2/docs.coffee | 43 | 83 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' els... | // Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
var editors, lastCompilationElapsedTime;
editors = [];
lastCompilationElapsedTime = 200;
$('textarea').each(function(index) {
var editor, mode, pending;
$(this).data('index', index);
mode = $(this).hasClass('javascript-output') ... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 0fc625d7e9626f65cfc8bb57d3d99533596c689f | 16,577 | https://github.com/jashkenas/coffeescript/blob/0fc625d7e9626f65cfc8bb57d3d99533596c689f/documentation/v2/docs.coffee | 43 | 83 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
var editors, lastCompilationElapsedTime;
editors = [];
lastCompilationElapsedTime = 200;
$('textarea').each(function(index) {
var editor, mode, pending;
$(this).data('index', ... | # Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirro... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 0fc625d7e9626f65cfc8bb57d3d99533596c689f | 16,577 | https://github.com/jashkenas/coffeescript/blob/0fc625d7e9626f65cfc8bb57d3d99533596c689f/documentation/v2/docs.coffee | 43 | 83 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | # Initialize CodeMirror for code examples; https://codemirror.net/doc/manual.html
editors = []
lastCompilationElapsedTime = 200
$('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirro... | pending = null
editor.on 'change', (instance, change) ->
clearTimeout pending
pending = setTimeout ->
lastCompilationStartTime = Date.now()
try
output = CoffeeScript.compile editor.getValue(), bare: yes
lastCompilationElapsedTime = Math.max(200, Date.now... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 0fc625d7e9626f65cfc8bb57d3d99533596c689f | 16,577 | https://github.com/jashkenas/coffeescript/blob/0fc625d7e9626f65cfc8bb57d3d99533596c689f/documentation/v2/docs.coffee | 43 | 83 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 1 | 38 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':vis... | $(document).ready(function() {
var initializeScrollspyFromHash, toggleSidebar, toggleTry;
// Mobile navigation
toggleSidebar = function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
};
$('[data-toggle="offcanvas"]').click(toggleSidebar);
$('[data-action="sidebar-nav"]').click(funct... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 1 | 38 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var initializeScrollspyFromHash, toggleSidebar, toggleTry;
// Mobile navigation
toggleSidebar = function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
};
$('[data-toggle="offcanvas"]').click(toggleS... | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 1 | 38 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | $('[data-toggle="try"]').click toggleTry
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
# See also http://www.codingeverything.com/2014/02/BootstrapDocsSideBar.html and http://jsfiddle.net/KyleMit/v6zhz/
$('body').scrollspy
target: '#contents'
offse... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 1 | 38 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:raw_corpus | raw_corpus | # Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry()
else
initializeScrollspyFromHash window.location.hash | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 83 | 88 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry()
else
initializeScrollspyFromHash window.location.hash
``` | // Configure the initial state
if (window.location.hash != null) {
if (window.location.hash === '#try') {
toggleTry();
} else {
initializeScrollspyFromHash(window.location.hash);
}
} | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 83 | 88 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Configure the initial state
if (window.location.hash != null) {
if (window.location.hash === '#try') {
toggleTry();
} else {
initializeScrollspyFromHash(window.location.hash);
}
}
``` | # Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry()
else
initializeScrollspyFromHash window.location.hash | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 83 | 88 |
jashkenas/coffeescript:documentation/v2/docs.coffee:3:completion | completion | # Configure the initial state
if window.location.hash?
if window.location.hash is '#try' | toggleTry()
else
initializeScrollspyFromHash window.location.hash | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | ef1005b9208e686923feb5fd37b2d1bd6dbe156a | 16,577 | https://github.com/jashkenas/coffeescript/blob/ef1005b9208e686923feb5fd37b2d1bd6dbe156a/documentation/v2/docs.coffee | 83 | 88 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 7ced071934e2e76bf3cfa084352cfa148599da20 | 16,577 | https://github.com/jashkenas/coffeescript/blob/7ced071934e2e76bf3cfa084352cfa148599da20/documentation/v2/docs.coffee | 1 | 50 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':vis... | $(document).ready(function() {
var editors, lastCompilationElapsedTime, toggleSidebar;
// Mobile navigation
toggleSidebar = function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
};
$('[data-toggle="offcanvas"]').click(toggleSidebar);
$('[data-action="sidebar-nav"]').click(function... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 7ced071934e2e76bf3cfa084352cfa148599da20 | 16,577 | https://github.com/jashkenas/coffeescript/blob/7ced071934e2e76bf3cfa084352cfa148599da20/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var editors, lastCompilationElapsedTime, toggleSidebar;
// Mobile navigation
toggleSidebar = function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
};
$('[data-toggle="offcanvas"]').click(toggleSide... | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 7ced071934e2e76bf3cfa084352cfa148599da20 | 16,577 | https://github.com/jashkenas/coffeescript/blob/7ced071934e2e76bf3cfa084352cfa148599da20/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
toggleSidebar = ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
$('[data-toggle="offcanvas"]').click toggleSidebar
$('[data-action="sidebar-nav"]').click (event) ->
if $('.menu-button').is(':visible')
event.preventDefault()
toggleSidebar()... | $(window).on 'activate.bs.scrollspy', (event, target) -> # Why `window`? https://github.com/twbs/bootstrap/issues/20086
# We only want one active link in the nav
$(".nav-link.active[href!='#{target.relatedTarget}']").removeClass 'active'
$target = $(".nav-link[href='#{target.relatedTarget}']")
# Update ... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 7ced071934e2e76bf3cfa084352cfa148599da20 | 16,577 | https://github.com/jashkenas/coffeescript/blob/7ced071934e2e76bf3cfa084352cfa148599da20/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:raw_corpus | raw_corpus | # Whenever the user edits the CoffeeScript side of a code example, update the JavaScript output
if mode is 'coffeescript'
pending = null
editor.on 'change', (instance, change) ->
clearTimeout pending
pending = setTimeout ->
lastCompilationStartTime = Date.now()
try
... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 7ced071934e2e76bf3cfa084352cfa148599da20 | 16,577 | https://github.com/jashkenas/coffeescript/blob/7ced071934e2e76bf3cfa084352cfa148599da20/documentation/v2/docs.coffee | 51 | 74 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | # Whenever the user edits the CoffeeScript side of a code example, update the JavaScript output
if mode is 'coffeescript'
pending = null
editor.on 'change', (instance, change) ->
clearTimeout pending
pending = setTimeout ->
lastCompilationStartTime = Date.now()
try
... | output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime
# Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js =... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 7ced071934e2e76bf3cfa084352cfa148599da20 | 16,577 | https://github.com/jashkenas/coffeescript/blob/7ced071934e2e76bf3cfa084352cfa148599da20/documentation/v2/docs.coffee | 51 | 74 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#contents'
offset: Math.round $... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 58f9428c5826b231d1f4816eca63607f688beb27 | 16,577 | https://github.com/jashkenas/coffeescript/blob/58f9428c5826b231d1f4816eca63607f688beb27/documentation/v2/docs.coffee | 1 | 50 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').s... | $(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scr... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 58f9428c5826b231d1f4816eca63607f688beb27 | 16,577 | https://github.com/jashkenas/coffeescript/blob/58f9428c5826b231d1f4816eca63607f688beb27/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navi... | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#contents'
offset: Math.round $... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 58f9428c5826b231d1f4816eca63607f688beb27 | 16,577 | https://github.com/jashkenas/coffeescript/blob/58f9428c5826b231d1f4816eca63607f688beb27/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#contents'
offset: Math.round $... | $('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirror.fromTextArea @,
mode: mode
theme: 'twilight'
indentUnit: 2
tabSize: 2
lineWrapping: on
lineNumbe... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 58f9428c5826b231d1f4816eca63607f688beb27 | 16,577 | https://github.com/jashkenas/coffeescript/blob/58f9428c5826b231d1f4816eca63607f688beb27/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:raw_corpus | raw_corpus | catch exception
output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime
# Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editor... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 58f9428c5826b231d1f4816eca63607f688beb27 | 16,577 | https://github.com/jashkenas/coffeescript/blob/58f9428c5826b231d1f4816eca63607f688beb27/documentation/v2/docs.coffee | 51 | 63 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | catch exception
output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime | # Handle the code example buttons
$('[data-action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 58f9428c5826b231d1f4816eca63607f688beb27 | 16,577 | https://github.com/jashkenas/coffeescript/blob/58f9428c5826b231d1f4816eca63607f688beb27/documentation/v2/docs.coffee | 51 | 63 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#contents'
offset: Math.round $... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | e48fea1892f8780e10eb12f40b1cce19816d9ff4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/e48fea1892f8780e10eb12f40b1cce19816d9ff4/documentation/v2/docs.coffee | 1 | 50 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').s... | $(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scr... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | e48fea1892f8780e10eb12f40b1cce19816d9ff4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/e48fea1892f8780e10eb12f40b1cce19816d9ff4/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navi... | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#contents'
offset: Math.round $... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | e48fea1892f8780e10eb12f40b1cce19816d9ff4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/e48fea1892f8780e10eb12f40b1cce19816d9ff4/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#contents'
offset: Math.round $... | $('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirror.fromTextArea @,
mode: mode
theme: 'default' # TODO: Change
indentUnit: 2
tabSize: 2
lineWrapping: on
... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | e48fea1892f8780e10eb12f40b1cce19816d9ff4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/e48fea1892f8780e10eb12f40b1cce19816d9ff4/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:raw_corpus | raw_corpus | catch exception
output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime
# Handle the code example buttons
$('[action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[ind... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | e48fea1892f8780e10eb12f40b1cce19816d9ff4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/e48fea1892f8780e10eb12f40b1cce19816d9ff4/documentation/v2/docs.coffee | 51 | 63 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | catch exception
output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime | # Handle the code example buttons
$('[action="run-code-example"]').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | e48fea1892f8780e10eb12f40b1cce19816d9ff4 | 16,577 | https://github.com/jashkenas/coffeescript/blob/e48fea1892f8780e10eb12f40b1cce19816d9ff4/documentation/v2/docs.coffee | 51 | 63 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('mai... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | d62f7adc9bcd978bfdc82377889a88e2b4957bfb | 16,577 | https://github.com/jashkenas/coffeescript/blob/d62f7adc9bcd978bfdc82377889a88e2b4957bfb/documentation/v2/docs.coffee | 1 | 50 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').s... | $(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scr... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | d62f7adc9bcd978bfdc82377889a88e2b4957bfb | 16,577 | https://github.com/jashkenas/coffeescript/blob/d62f7adc9bcd978bfdc82377889a88e2b4957bfb/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.menu-button, .row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navi... | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('mai... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | d62f7adc9bcd978bfdc82377889a88e2b4957bfb | 16,577 | https://github.com/jashkenas/coffeescript/blob/d62f7adc9bcd978bfdc82377889a88e2b4957bfb/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.menu-button, .row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('mai... | $('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirror.fromTextArea @,
mode: mode
theme: 'default' # TODO: Change
indentUnit: 2
tabSize: 2
lineWrapping: on
... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | d62f7adc9bcd978bfdc82377889a88e2b4957bfb | 16,577 | https://github.com/jashkenas/coffeescript/blob/d62f7adc9bcd978bfdc82377889a88e2b4957bfb/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('paddi... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 462a60da7ba6bf68344bc723784cba2eccef879e | 16,577 | https://github.com/jashkenas/coffeescript/blob/462a60da7ba6bf68344bc723784cba2eccef879e/documentation/v2/docs.coffee | 1 | 50 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
t... | $(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('b... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 462a60da7ba6bf68344bc723784cba2eccef879e | 16,577 | https://github.com/jashkenas/coffeescript/blob/462a60da7ba6bf68344bc723784cba2eccef879e/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(document).ready(function() {
var editors, lastCompilationElapsedTime;
// Mobile navigation
$('[data-toggle="offcanvas"]').click(function() {
return $('.row-offcanvas').toggleClass('active');
});
// Initialize Scrollspy for sidebar navigation; http:/... | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('paddi... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 462a60da7ba6bf68344bc723784cba2eccef879e | 16,577 | https://github.com/jashkenas/coffeescript/blob/462a60da7ba6bf68344bc723784cba2eccef879e/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | $(document).ready ->
# Mobile navigation
$('[data-toggle="offcanvas"]').click ->
$('.row-offcanvas').toggleClass 'active'
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('paddi... | $('textarea').each (index) ->
$(@).data 'index', index
mode = if $(@).hasClass('javascript-output') then 'javascript' else 'coffeescript'
editors[index] = editor = CodeMirror.fromTextArea @,
mode: mode
theme: 'default' # TODO: Change
indentUnit: 2
tabSize: 2
lineWrapping: on
... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 462a60da7ba6bf68344bc723784cba2eccef879e | 16,577 | https://github.com/jashkenas/coffeescript/blob/462a60da7ba6bf68344bc723784cba2eccef879e/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 1 | 50 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#... | // Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
var editors, lastCompilationElapsedTime;
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (window.location.hash != null) {
$(`.nav-link.active[hre... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
var editors, lastCompilationElapsedTime;
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (wi... | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | mode: mode
theme: 'default' # TODO: Change
indentUnit: 2
tabSize: 2
lineWrapping: on
lineNumbers: off
inputStyle: 'contenteditable'
readOnly: if mode is 'coffeescript' then no else 'nocursor'
viewportMargin: Infinity
# Whenever the user edits the CoffeeScript side of a code example, u... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 1 | 50 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:raw_corpus | raw_corpus | # Handle the code example buttons
$('button').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 51 | 57 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Handle the code example buttons
$('button').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
``` | // Handle the code example buttons
$('button').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
if (run !== true) {
js = `${js}\nalert(${unescape(run)});`;
}
return eval(js);
}); | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 51 | 57 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Handle the code example buttons
$('button').click(function() {
var index, js, run;
run = $(this).data('run');
index = $(`#${$(this).data('example')}-js`).data('index');
js = editors[index].getValue();
if (run !== true) {
js = `${js}\nalert(${unesca... | # Handle the code example buttons
$('button').click ->
run = $(@).data 'run'
index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 51 | 57 |
jashkenas/coffeescript:documentation/v2/docs.coffee:2:completion | completion | # Handle the code example buttons
$('button').click ->
run = $(@).data 'run' | index = $("##{$(@).data('example')}-js").data 'index'
js = editors[index].getValue()
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 93f1f3777c6574e3369a93391cbfa0f68950a1fb | 16,577 | https://github.com/jashkenas/coffeescript/blob/93f1f3777c6574e3369a93391cbfa0f68950a1fb/documentation/v2/docs.coffee | 51 | 57 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 14382abc2d8786af128c06b1eb0a08af67836687 | 16,577 | https://github.com/jashkenas/coffeescript/blob/14382abc2d8786af128c06b1eb0a08af67836687/documentation/v2/docs.coffee | 1 | 46 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#... | // Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
var editors, lastCompilationElapsedTime;
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (window.location.hash != null) {
$(`.nav-link.active[hre... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 14382abc2d8786af128c06b1eb0a08af67836687 | 16,577 | https://github.com/jashkenas/coffeescript/blob/14382abc2d8786af128c06b1eb0a08af67836687/documentation/v2/docs.coffee | 1 | 46 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
var editors, lastCompilationElapsedTime;
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (wi... | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 14382abc2d8786af128c06b1eb0a08af67836687 | 16,577 | https://github.com/jashkenas/coffeescript/blob/14382abc2d8786af128c06b1eb0a08af67836687/documentation/v2/docs.coffee | 1 | 46 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | mode: mode
theme: 'default' # TODO: Change
indentUnit: 2
tabSize: 2
lineWrapping: on
lineNumbers: off
inputStyle: 'contenteditable'
readOnly: if mode is 'coffeescript' then no else 'nocursor'
viewportMargin: Infinity
if mode is 'coffeescript'
pending = null
editor.on 'change',... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 14382abc2d8786af128c06b1eb0a08af67836687 | 16,577 | https://github.com/jashkenas/coffeescript/blob/14382abc2d8786af128c06b1eb0a08af67836687/documentation/v2/docs.coffee | 1 | 46 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 512b580820141b9466846f7722c89bea8fb8ede3 | 16,577 | https://github.com/jashkenas/coffeescript/blob/512b580820141b9466846f7722c89bea8fb8ede3/documentation/v2/docs.coffee | 1 | 46 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#... | // Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
var editors, lastCompilationElapsedTime;
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (window.location.hash != null) {
$(`.nav-link.active[hre... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 512b580820141b9466846f7722c89bea8fb8ede3 | 16,577 | https://github.com/jashkenas/coffeescript/blob/512b580820141b9466846f7722c89bea8fb8ede3/documentation/v2/docs.coffee | 1 | 46 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
var editors, lastCompilationElapsedTime;
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (wi... | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 512b580820141b9466846f7722c89bea8fb8ede3 | 16,577 | https://github.com/jashkenas/coffeescript/blob/512b580820141b9466846f7722c89bea8fb8ede3/documentation/v2/docs.coffee | 1 | 46 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | mode: mode
theme: 'default' # TODO: Change
indentUnit: 2
tabSize: 2
lineWrapping: on
lineNumbers: off
inputStyle: 'contenteditable'
# readOnly: (if mode is 'coffeescript' then no else 'nocursor')
viewportMargin: Infinity
if mode is 'coffeescript'
pending = null
editor.on 'chan... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | 512b580820141b9466846f7722c89bea8fb8ede3 | 16,577 | https://github.com/jashkenas/coffeescript/blob/512b580820141b9466846f7722c89bea8fb8ede3/documentation/v2/docs.coffee | 1 | 46 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:raw_corpus | raw_corpus | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | db055bb91616f3390c24c7978232d4c0e5c56b3f | 16,577 | https://github.com/jashkenas/coffeescript/blob/db055bb91616f3390c24c7978232d4c0e5c56b3f/documentation/v2/docs.coffee | 1 | 14 | ||
jashkenas/coffeescript:documentation/v2/docs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#... | // Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (window.location.hash != null) {
$(`.nav-link.active[href!='${window.location.hash}']`).removeClas... | CoffeeScript | JavaScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | db055bb91616f3390c24c7978232d4c0e5c56b3f | 16,577 | https://github.com/jashkenas/coffeescript/blob/db055bb91616f3390c24c7978232d4c0e5c56b3f/documentation/v2/docs.coffee | 1 | 14 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy({
target: '#nav',
offset: Math.round($('main').css('padding-top').replace('px', ''))
});
if (window.location.hash != null) {
$(`.nav-li... | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active'
$(window... | JavaScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | db055bb91616f3390c24c7978232d4c0e5c56b3f | 16,577 | https://github.com/jashkenas/coffeescript/blob/db055bb91616f3390c24c7978232d4c0e5c56b3f/documentation/v2/docs.coffee | 1 | 14 |
jashkenas/coffeescript:documentation/v2/docs.coffee:1:completion | completion | # Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
$('body').scrollspy
target: '#nav'
offset: Math.round $('main').css('padding-top').replace('px', '')
if window.location.hash?
$(".nav-link.active[href!='#{window.location.hash}']").removeClass 'active' | $(window).on 'activate.bs.scrollspy', (event, target) -> # Why `window`? https://github.com/twbs/bootstrap/issues/20086
# We only want one active link in the nav
$(".nav-link.active[href!='#{target.relatedTarget}']").removeClass 'active'
$target = $(".nav-link[href='#{target.relatedTarget}']")
# Update the brow... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | documentation/v2/docs.coffee | MIT | db055bb91616f3390c24c7978232d4c0e5c56b3f | 16,577 | https://github.com/jashkenas/coffeescript/blob/db055bb91616f3390c24c7978232d4c0e5c56b3f/documentation/v2/docs.coffee | 1 | 14 |
jianliaoim/talk-os:talk-api2x/server/observers/mark.coffee:1:raw_corpus | raw_corpus | limbo = require 'limbo'
logger = require 'graceful-logger'
{socket} = require '../components'
{
MarkModel
MessageModel
} = limbo.use 'talk'
MarkSchema = MarkModel.schema
MarkSchema.post 'remove', (mark) ->
conditions =
team: mark.team
mark: mark._id
update = $unset: mark: 1
options = multi: true
... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/observers/mark.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/observers/mark.coffee | 1 | 23 | ||
jianliaoim/talk-os:talk-api2x/server/observers/mark.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
limbo = require 'limbo'
logger = require 'graceful-logger'
{socket} = require '../components'
{
MarkModel
MessageModel
} = limbo.use 'talk'
MarkSchema = MarkModel.schema
MarkSchema.post 'remove', (mark) ->
conditions =
team: mark.team
mark: mark.... | var MarkModel, MarkSchema, MessageModel, limbo, logger, socket;
limbo = require('limbo');
logger = require('graceful-logger');
({socket} = require('../components'));
({MarkModel, MessageModel} = limbo.use('talk'));
MarkSchema = MarkModel.schema;
MarkSchema.post('remove', function(mark) {
var $removeMsgMark, con... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/observers/mark.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/observers/mark.coffee | 1 | 23 |
jianliaoim/talk-os:talk-api2x/server/observers/mark.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var MarkModel, MarkSchema, MessageModel, limbo, logger, socket;
limbo = require('limbo');
logger = require('graceful-logger');
({socket} = require('../components'));
({MarkModel, MessageModel} = limbo.use('talk'));
MarkSchema = MarkModel.schema;
MarkSchema.po... | limbo = require 'limbo'
logger = require 'graceful-logger'
{socket} = require '../components'
{
MarkModel
MessageModel
} = limbo.use 'talk'
MarkSchema = MarkModel.schema
MarkSchema.post 'remove', (mark) ->
conditions =
team: mark.team
mark: mark._id
update = $unset: mark: 1
options = multi: true
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/observers/mark.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/observers/mark.coffee | 1 | 23 |
jianliaoim/talk-os:talk-api2x/server/observers/mark.coffee:1:completion | completion | limbo = require 'limbo'
logger = require 'graceful-logger'
{socket} = require '../components'
{
MarkModel
MessageModel
} = limbo.use 'talk'
MarkSchema = MarkModel.schema | MarkSchema.post 'remove', (mark) ->
conditions =
team: mark.team
mark: mark._id
update = $unset: mark: 1
options = multi: true
$removeMsgMark = MessageModel.updateAsync conditions, update, options
$removeMsgMark.catch (err) -> logger.warn err.stack
socket.broadcast "team:#{mark.team}", "mark:remo... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/observers/mark.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/observers/mark.coffee | 1 | 23 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:raw_corpus | raw_corpus | {$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
activationPromise = atom.packages.acti... | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/spec/git-time-machine-view-spec.coffee | 1 | 49 | ||
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
b... | var $, GitTimeMachineView, Path, View;
({$, View} = require("atom-space-pen-views"));
Path = require('path');
GitTimeMachineView = require('../lib/git-time-machine-view');
describe("GitTimeMachineView", function() {
return describe("when open", function() {
var activationPromise, timeMachineElement, workspace... | CoffeeScript | JavaScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/spec/git-time-machine-view-spec.coffee | 1 | 49 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var $, GitTimeMachineView, Path, View;
({$, View} = require("atom-space-pen-views"));
Path = require('path');
GitTimeMachineView = require('../lib/git-time-machine-view');
describe("GitTimeMachineView", function() {
return describe("when open", function() {
... | {$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
activationPromise = atom.packages.acti... | JavaScript | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/spec/git-time-machine-view-spec.coffee | 1 | 49 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:completion | completion | {$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
activationPromise = atom.packages.acti... | # current expected behavior is to not show time plot at all
it "should not show timeplot if no file loaded", ->
expect(timeMachineElement.innerHTML).toEqual ""
describe "after opening a known file", ->
beforeEach ->
#console.log "current working directory: #{process.cwd()}"
#console... | CoffeeScript | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/spec/git-time-machine-view-spec.coffee | 1 | 49 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:raw_corpus | raw_corpus | {$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
activationPromise = atom.packages.acti... | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 98b864ebf66d473e0c559fbc6004982c7fc378cb | 1,111 | https://github.com/littlebee/git-time-machine/blob/98b864ebf66d473e0c559fbc6004982c7fc378cb/spec/git-time-machine-view-spec.coffee | 1 | 49 | ||
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
b... | var $, GitTimeMachineView, Path, View;
({$, View} = require("atom-space-pen-views"));
Path = require('path');
GitTimeMachineView = require('../lib/git-time-machine-view');
describe("GitTimeMachineView", function() {
return describe("when open", function() {
var activationPromise, timeMachineElement, workspace... | CoffeeScript | JavaScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 98b864ebf66d473e0c559fbc6004982c7fc378cb | 1,111 | https://github.com/littlebee/git-time-machine/blob/98b864ebf66d473e0c559fbc6004982c7fc378cb/spec/git-time-machine-view-spec.coffee | 1 | 49 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var $, GitTimeMachineView, Path, View;
({$, View} = require("atom-space-pen-views"));
Path = require('path');
GitTimeMachineView = require('../lib/git-time-machine-view');
describe("GitTimeMachineView", function() {
return describe("when open", function() {
... | {$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
activationPromise = atom.packages.acti... | JavaScript | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 98b864ebf66d473e0c559fbc6004982c7fc378cb | 1,111 | https://github.com/littlebee/git-time-machine/blob/98b864ebf66d473e0c559fbc6004982c7fc378cb/spec/git-time-machine-view-spec.coffee | 1 | 49 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:completion | completion | {$, View} = require "atom-space-pen-views"
Path = require 'path'
GitTimeMachineView = require '../lib/git-time-machine-view'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
activationPromise = atom.packages.acti... | # current expected behavior is to not show time plot at all
it "should not show timeplot if no file loaded", ->
expect(timeMachineElement.innerHTML).toEqual ""
describe "after opening a known file", ->
beforeEach ->
#console.log "current working directory: #{process.cwd()}"
#console... | CoffeeScript | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 98b864ebf66d473e0c559fbc6004982c7fc378cb | 1,111 | https://github.com/littlebee/git-time-machine/blob/98b864ebf66d473e0c559fbc6004982c7fc378cb/spec/git-time-machine-view-spec.coffee | 1 | 49 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:raw_corpus | raw_corpus | {$, View} = require "atom-space-pen-views"
GitTimeMachineView = require '../lib/git-time-machine-view'
GitUtils = require '../lib/git-utils'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
workspaceElement = ato... | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d | 1,111 | https://github.com/littlebee/git-time-machine/blob/d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d/spec/git-time-machine-view-spec.coffee | 1 | 46 | ||
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{$, View} = require "atom-space-pen-views"
GitTimeMachineView = require '../lib/git-time-machine-view'
GitUtils = require '../lib/git-utils'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElem... | var $, GitTimeMachineView, GitUtils, View;
({$, View} = require("atom-space-pen-views"));
GitTimeMachineView = require('../lib/git-time-machine-view');
GitUtils = require('../lib/git-utils');
describe("GitTimeMachineView", function() {
return describe("when open", function() {
var activationPromise, timeMachi... | CoffeeScript | JavaScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d | 1,111 | https://github.com/littlebee/git-time-machine/blob/d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d/spec/git-time-machine-view-spec.coffee | 1 | 46 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var $, GitTimeMachineView, GitUtils, View;
({$, View} = require("atom-space-pen-views"));
GitTimeMachineView = require('../lib/git-time-machine-view');
GitUtils = require('../lib/git-utils');
describe("GitTimeMachineView", function() {
return describe("when o... | {$, View} = require "atom-space-pen-views"
GitTimeMachineView = require '../lib/git-time-machine-view'
GitUtils = require '../lib/git-utils'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
workspaceElement = ato... | JavaScript | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d | 1,111 | https://github.com/littlebee/git-time-machine/blob/d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d/spec/git-time-machine-view-spec.coffee | 1 | 46 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:completion | completion | {$, View} = require "atom-space-pen-views"
GitTimeMachineView = require '../lib/git-time-machine-view'
GitUtils = require '../lib/git-utils'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
workspaceElement = ato... | describe "after opening a known file", ->
beforeEach ->
spyOn(GitUtils, '_onFinishedParse').andCallThrough()
openPromise = atom.workspace.open('test-data/fiveCommits.txt')
waitsForPromise ->
return openPromise
waitsFor ->
GitUtils._onFinishedParse.calls.length >... | CoffeeScript | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d | 1,111 | https://github.com/littlebee/git-time-machine/blob/d194bcea22c2c3ff92abbb26ba45a84c8ca7ff8d/spec/git-time-machine-view-spec.coffee | 1 | 46 |
littlebee/git-time-machine:spec/git-time-machine-view-spec.coffee:1:raw_corpus | raw_corpus | $ = jQuery = require 'jquery'
GitTimeMachineView = require '../lib/git-time-machine-view'
GitUtils = require '../lib/git-utils'
describe "GitTimeMachineView", ->
describe "when open", ->
[workspaceElement, activationPromise, timeMachineElement] = []
beforeEach ->
workspaceElement = atom.views.getVi... | CoffeeScript | littlebee/git-time-machine | spec/git-time-machine-view-spec.coffee | MIT | 75db344a83bc61673bfb7c5d59cd3ac78c90e095 | 1,111 | https://github.com/littlebee/git-time-machine/blob/75db344a83bc61673bfb7c5d59cd3ac78c90e095/spec/git-time-machine-view-spec.coffee | 1 | 46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.