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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
snd/url-pattern:test/helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{
escapeForRegex
concatMap
stringConcatMap
regexGroupCount
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.... | var concatMap, escapeForRegex, regexGroupCount, stringConcatMap;
({escapeForRegex, concatMap, stringConcatMap, regexGroupCount} = require('../src/url-pattern'));
module.exports = {
'escapeForRegex': function(test) {
var actual, expected;
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]';
... | CoffeeScript | JavaScript | snd/url-pattern | test/helpers.coffee | MIT | d27970840e003db9a6f9c35700041273bd15a9ee | 588 | https://github.com/snd/url-pattern/blob/d27970840e003db9a6f9c35700041273bd15a9ee/test/helpers.coffee | 1 | 49 |
snd/url-pattern:test/helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var concatMap, escapeForRegex, regexGroupCount, stringConcatMap;
({escapeForRegex, concatMap, stringConcatMap, regexGroupCount} = require('../src/url-pattern'));
module.exports = {
'escapeForRegex': function(test) {
var actual, expected;
expected = '\\[... | {
escapeForRegex
concatMap
stringConcatMap
regexGroupCount
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equ... | JavaScript | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | d27970840e003db9a6f9c35700041273bd15a9ee | 588 | https://github.com/snd/url-pattern/blob/d27970840e003db9a6f9c35700041273bd15a9ee/test/helpers.coffee | 1 | 49 |
snd/url-pattern:test/helpers.coffee:1:completion | completion | {
escapeForRegex
concatMap
stringConcatMap
regexGroupCount
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equ... | test.equal '\\)', escapeForRegex ')'
test.done()
'concatMap': (test) ->
test.deepEqual [], concatMap [], ->
test.deepEqual [1], concatMap [1], (x) -> [x]
test.deepEqual [1, 1, 1, 2, 2, 2, 3, 3, 3], concatMap [1, 2, 3], (x) -> [x, x, x]
test.done()
'stringConcatMap': (test) ->
test.equal ''... | CoffeeScript | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | d27970840e003db9a6f9c35700041273bd15a9ee | 588 | https://github.com/snd/url-pattern/blob/d27970840e003db9a6f9c35700041273bd15a9ee/test/helpers.coffee | 1 | 49 |
snd/url-pattern:test/helpers.coffee:1:raw_corpus | raw_corpus | {
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equal escapeForRegex(... | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | cec8a5db4c08bde10577612899f22e2774ba55d9 | 588 | https://github.com/snd/url-pattern/blob/cec8a5db4c08bde10577612899f22e2774ba55d9/test/helpers.coffee | 1 | 38 | ||
snd/url-pattern:test/helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
te... | var concatMap, escapeForRegex, stringConcatMap;
({escapeForRegex, concatMap, stringConcatMap} = require('../src/url-pattern'));
module.exports = {
'escapeForRegex': function(test) {
var actual, expected;
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]';
actual = escapeForRegex('[-\/\... | CoffeeScript | JavaScript | snd/url-pattern | test/helpers.coffee | MIT | cec8a5db4c08bde10577612899f22e2774ba55d9 | 588 | https://github.com/snd/url-pattern/blob/cec8a5db4c08bde10577612899f22e2774ba55d9/test/helpers.coffee | 1 | 38 |
snd/url-pattern:test/helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var concatMap, escapeForRegex, stringConcatMap;
({escapeForRegex, concatMap, stringConcatMap} = require('../src/url-pattern'));
module.exports = {
'escapeForRegex': function(test) {
var actual, expected;
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)... | {
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equal escapeForRegex(... | JavaScript | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | cec8a5db4c08bde10577612899f22e2774ba55d9 | 588 | https://github.com/snd/url-pattern/blob/cec8a5db4c08bde10577612899f22e2774ba55d9/test/helpers.coffee | 1 | 38 |
snd/url-pattern:test/helpers.coffee:1:completion | completion | {
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equal escapeForRegex(... | test.equal '\\-', escapeForRegex '-'
test.equal '\\[', escapeForRegex '['
test.equal '\\]', escapeForRegex ']'
test.equal '\\(', escapeForRegex '('
test.equal '\\)', escapeForRegex ')'
test.done()
'concatMap': (test) ->
test.deepEqual [], concatMap [], ->
test.deepEqual [1], concatMap [1]... | CoffeeScript | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | cec8a5db4c08bde10577612899f22e2774ba55d9 | 588 | https://github.com/snd/url-pattern/blob/cec8a5db4c08bde10577612899f22e2774ba55d9/test/helpers.coffee | 1 | 38 |
snd/url-pattern:test/helpers.coffee:1:raw_corpus | raw_corpus | {
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equal escapeForRegex(... | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | 11235b26d8cb74a774e4ec34841c0d386c64399b | 588 | https://github.com/snd/url-pattern/blob/11235b26d8cb74a774e4ec34841c0d386c64399b/test/helpers.coffee | 1 | 28 | ||
snd/url-pattern:test/helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
te... | var concatMap, escapeForRegex, stringConcatMap;
({escapeForRegex, concatMap, stringConcatMap} = require('../src/url-pattern'));
module.exports = {
'escapeForRegex': function(test) {
var actual, expected;
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]';
actual = escapeForRegex('[-\/\... | CoffeeScript | JavaScript | snd/url-pattern | test/helpers.coffee | MIT | 11235b26d8cb74a774e4ec34841c0d386c64399b | 588 | https://github.com/snd/url-pattern/blob/11235b26d8cb74a774e4ec34841c0d386c64399b/test/helpers.coffee | 1 | 28 |
snd/url-pattern:test/helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var concatMap, escapeForRegex, stringConcatMap;
({escapeForRegex, concatMap, stringConcatMap} = require('../src/url-pattern'));
module.exports = {
'escapeForRegex': function(test) {
var actual, expected;
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)... | {
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equal escapeForRegex(... | JavaScript | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | 11235b26d8cb74a774e4ec34841c0d386c64399b | 588 | https://github.com/snd/url-pattern/blob/11235b26d8cb74a774e4ec34841c0d386c64399b/test/helpers.coffee | 1 | 28 |
snd/url-pattern:test/helpers.coffee:1:completion | completion | {
escapeForRegex
concatMap
stringConcatMap
} = require '../src/url-pattern'
module.exports =
'escapeForRegex': (test) ->
expected = '\\[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}\\]'
actual = escapeForRegex('[-\/\\^$*+?.()|[\]{}]')
test.equal expected, actual
test.equal escapeForRegex(... | test.done()
'concatMap': (test) ->
test.deepEqual [], concatMap [], ->
test.deepEqual [1], concatMap [1], (x) -> [x]
test.deepEqual [1, 1, 1, 2, 2, 2, 3, 3, 3], concatMap [1, 2, 3], (x) -> [x, x, x]
test.done()
'stringConcatMap': (test) ->
test.equal '', stringConcatMap [], ->
test.equal '... | CoffeeScript | CoffeeScript | snd/url-pattern | test/helpers.coffee | MIT | 11235b26d8cb74a774e4ec34841c0d386c64399b | 588 | https://github.com/snd/url-pattern/blob/11235b26d8cb74a774e4ec34841c0d386c64399b/test/helpers.coffee | 1 | 28 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:raw_corpus | raw_corpus | suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()
root = doc.root()
eq(doc.type, ... | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/nodetype.coffee | 1 | 38 | ||
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hel... | suite('Check node type:', function() {
test('Document node types', function() {
var doc, obj, root;
obj = {
root: {
'@age': 35,
'#raw': '',
'#text': '',
'#cdata': '',
'#comment': '',
'?pi': ''
}
};
doc = xml(obj, {
sysID: 'hello.dtd'
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/nodetype.coffee | 1 | 38 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
suite('Check node type:', function() {
test('Document node types', function() {
var doc, obj, root;
obj = {
root: {
'@age': 35,
'#raw': '',
'#text': '',
'#cdata': '',
'#comment': '',
'?pi': ''
}
... | suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()
root = doc.root()
eq(doc.type, ... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/nodetype.coffee | 1 | 38 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:completion | completion | suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()
root = doc.root()
eq(doc.type, ... | eq(root.children[1].type, builder.nodeType.Text)
eq(root.children[2].type, builder.nodeType.CData)
eq(root.children[3].type, builder.nodeType.Comment)
eq(root.children[4].type, builder.nodeType.ProcessingInstruction)
test 'DTD node types', ->
dtd = xml('root', { headless: true }).dtd()
.att('im... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/nodetype.coffee | 1 | 38 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:raw_corpus | raw_corpus | suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()
root = doc.root()
root.dummy()
... | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | 7b6b8a80a549d0976180f469538a9ee5c0877837 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/7b6b8a80a549d0976180f469538a9ee5c0877837/test/basic/nodetype.coffee | 1 | 40 | ||
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hel... | suite('Check node type:', function() {
test('Document node types', function() {
var doc, obj, root;
obj = {
root: {
'@age': 35,
'#raw': '',
'#text': '',
'#cdata': '',
'#comment': '',
'?pi': ''
}
};
doc = xml(obj, {
sysID: 'hello.dtd'
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | 7b6b8a80a549d0976180f469538a9ee5c0877837 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/7b6b8a80a549d0976180f469538a9ee5c0877837/test/basic/nodetype.coffee | 1 | 40 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
suite('Check node type:', function() {
test('Document node types', function() {
var doc, obj, root;
obj = {
root: {
'@age': 35,
'#raw': '',
'#text': '',
'#cdata': '',
'#comment': '',
'?pi': ''
}
... | suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()
root = doc.root()
root.dummy()
... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | 7b6b8a80a549d0976180f469538a9ee5c0877837 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/7b6b8a80a549d0976180f469538a9ee5c0877837/test/basic/nodetype.coffee | 1 | 40 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:completion | completion | suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()
root = doc.root()
root.dummy()
... | eq(root.children[1].type, builder.nodeType.Text)
eq(root.children[2].type, builder.nodeType.CData)
eq(root.children[3].type, builder.nodeType.Comment)
eq(root.children[4].type, builder.nodeType.ProcessingInstruction)
eq(root.children[5].type, builder.nodeType.Dummy)
test 'DTD node types', ->
dtd ... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | 7b6b8a80a549d0976180f469538a9ee5c0877837 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/7b6b8a80a549d0976180f469538a9ee5c0877837/test/basic/nodetype.coffee | 1 | 40 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:raw_corpus | raw_corpus | NodeType = require '../../src/NodeType'
suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()... | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/test/basic/nodetype.coffee | 1 | 42 | ||
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
NodeType = require '../../src/NodeType'
suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?... | var NodeType;
NodeType = require('../../src/NodeType');
suite('Check node type:', function() {
test('Document node types', function() {
var doc, obj, root;
obj = {
root: {
'@age': 35,
'#raw': '',
'#text': '',
'#cdata': '',
'#comment': '',
'?pi': ''
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/test/basic/nodetype.coffee | 1 | 42 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType;
NodeType = require('../../src/NodeType');
suite('Check node type:', function() {
test('Document node types', function() {
var doc, obj, root;
obj = {
root: {
'@age': 35,
'#raw': '',
'#text': '',
'#cdat... | NodeType = require '../../src/NodeType'
suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/test/basic/nodetype.coffee | 1 | 42 |
oozcitak/xmlbuilder-js:test/basic/nodetype.coffee:1:completion | completion | NodeType = require '../../src/NodeType'
suite 'Check node type:', ->
test 'Document node types', ->
obj =
root:
'@age': 35
'#raw': ''
'#text': ''
'#cdata': ''
'#comment': ''
'?pi': ''
doc = xml(obj, { sysID: 'hello.dtd' }).doc()... | eq(root.children[0].type, NodeType.Raw)
eq(root.children[1].type, NodeType.Text)
eq(root.children[2].type, NodeType.CData)
eq(root.children[3].type, NodeType.Comment)
eq(root.children[4].type, NodeType.ProcessingInstruction)
eq(root.children[5].type, NodeType.Dummy)
test 'DTD node types', ->
... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/nodetype.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/test/basic/nodetype.coffee | 1 | 42 |
gss/engine:src/document/properties/Styles.coffee:1:raw_corpus | raw_corpus | class Styles
constructor: (@engine) ->
transform: [[
-> mat4.create(),
'Matrix'
]]
animation: [[[
name: ['none', 'String']
duration: ['Time']
delay: ['Time']
direction: ['normal', 'reverse', 'alternate']
'timing-function': ['Easing'],
'... | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/properties/Styles.coffee | 1 | 50 | ||
gss/engine:src/document/properties/Styles.coffee:3:raw_corpus | raw_corpus | list:
style: [
type: ['disc', 'circle', 'square', 'decimal', 'decimal-leading-zero', 'lower-roman', 'upper-roman',
'lower-greek', 'lower-latin', 'upper-latin', 'armenian', 'georgian', 'lower-alpha', 'none',
'upper-alpha'],
image: ['none'... | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/properties/Styles.coffee | 101 | 150 | ||
gss/engine:src/document/properties/Styles.coffee:3:completion | completion | list:
style: [
type: ['disc', 'circle', 'square', 'decimal', 'decimal-leading-zero', 'lower-roman', 'upper-roman',
'lower-greek', 'lower-latin', 'upper-latin', 'armenian', 'georgian', 'lower-alpha', 'none',
'upper-alpha'],
image: ['none'... | overflow: ['visible', 'hidden', 'scroll', 'auto']
'overflow-x': ['visible', 'hidden', 'scroll', 'auto']
'overflow-y': ['visible', 'hidden', 'scroll', 'auto']
position: ['static', 'relative', 'absolute', 'fixed', 'sticky']
top: ['Length', 'Percentage', ... | CoffeeScript | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/properties/Styles.coffee | 101 | 150 |
gss/engine:src/document/properties/Styles.coffee:4:raw_corpus | raw_corpus | width: ['Length', 'thin', 'thick', 'medium'],
style: ['none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset', 'none']
color: ['Color']
]]
for type in ['width', 'color', 'style']
(Styles::['border-' + type] ||= [[{'pad'}]])[0][+
0]['border-' + side + '-' + t... | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/properties/Styles.coffee | 151 | 165 | ||
gss/engine:src/document/properties/Styles.coffee:4:completion | completion | width: ['Length', 'thin', 'thick', 'medium'],
style: ['none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset', 'none']
color: ['Color']
]]
for type in ['width', 'color', 'style']
(Styles::['border-' + type] ||= [[{'pad'}]])[0][+
0]['border-' + side + '-' + t... | Styles::border[0][side][0][0][type]
unless index % 2
for i in [3 ... 0] by -2
prop = 'border-' + side + '-' + (sides[i]) + '-radius'
Styles::[prop] = ['Length', 'none']
(Styles::['border-radius'] ||= [{'pad'}])[0][prop] = ['Length', 'none'] | CoffeeScript | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/properties/Styles.coffee | 151 | 165 |
gss/engine:src/document/properties/Styles.coffee:1:raw_corpus | raw_corpus | class Styles
transform: [[
-> mat4.create(),
'Matrix'
]]
animation: [[[
name: ['none', 'String']
duration: ['Time']
delay: ['Time']
direction: ['normal', 'reverse', 'alternate']
'timing-function': ['Easing'],
'iteration-count': [1, 'infin... | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | daa2a82301cb1696b74d4bda01f1eefdbc0a3151 | 2,854 | https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/document/properties/Styles.coffee | 1 | 50 | ||
gss/engine:src/document/properties/Styles.coffee:3:raw_corpus | raw_corpus | list:
style: [
type: ['disc', 'circle', 'square', 'decimal', 'decimal-leading-zero', 'lower-roman', 'upper-roman',
'lower-greek', 'lower-latin', 'upper-latin', 'armenian', 'georgian', 'lower-alpha', 'none',
'upper-alpha'],
image: ['none'... | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | daa2a82301cb1696b74d4bda01f1eefdbc0a3151 | 2,854 | https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/document/properties/Styles.coffee | 101 | 150 | ||
gss/engine:src/document/properties/Styles.coffee:3:completion | completion | list:
style: [
type: ['disc', 'circle', 'square', 'decimal', 'decimal-leading-zero', 'lower-roman', 'upper-roman',
'lower-greek', 'lower-latin', 'upper-latin', 'armenian', 'georgian', 'lower-alpha', 'none',
'upper-alpha'],
image: ['none'... | 'overflow-x': ['visible', 'hidden', 'scroll', 'auto']
'overflow-y': ['visible', 'hidden', 'scroll', 'auto']
position: ['static', 'relative', 'absolute', 'fixed', 'sticky']
top: ['Length', 'Percentage', 'auto']
left: ['Length', 'Percentage', 'auto']... | CoffeeScript | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | daa2a82301cb1696b74d4bda01f1eefdbc0a3151 | 2,854 | https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/document/properties/Styles.coffee | 101 | 150 |
gss/engine:src/document/properties/Styles.coffee:4:raw_corpus | raw_corpus | style: ['none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset', 'none']
color: ['Color']
]]
for type in ['width', 'color', 'style']
(Styles::['border-' + type] ||= [[{'pad'}]])[0][+
0]['border-' + side + '-' + type] =
Styles::border[0][side][0][0][type]... | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | daa2a82301cb1696b74d4bda01f1eefdbc0a3151 | 2,854 | https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/document/properties/Styles.coffee | 151 | 164 | ||
gss/engine:src/document/properties/Styles.coffee:4:completion | completion | style: ['none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset', 'none']
color: ['Color']
]]
for type in ['width', 'color', 'style']
(Styles::['border-' + type] ||= [[{'pad'}]])[0][+
0]['border-' + side + '-' + type] =
Styles::border[0][side][0][0][type] | unless index % 2
for i in [3 ... 0] by -2
prop = 'border-' + side + '-' + (sides[i]) + '-radius'
Styles::[prop] = ['Length', 'none']
(Styles::['border-radius'] ||= [{'pad'}])[0][prop] = ['Length', 'none'] | CoffeeScript | CoffeeScript | gss/engine | src/document/properties/Styles.coffee | MIT | daa2a82301cb1696b74d4bda01f1eefdbc0a3151 | 2,854 | https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/document/properties/Styles.coffee | 151 | 164 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 9 | 58 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class:... | var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight left",
click: 'newTerminalView',
o... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight... | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:completion | completion | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | @registerContextMenu()
@subscriptions.add atom.tooltips.add @plusBtn, title: 'New Terminal'
@subscriptions.add atom.tooltips.add @closeBtn, title: 'Close All'
@createTerminalView()
@attach()
@initializeSorting() if atom.config.get('terminal-plus.toggles.sortableStatus')
registerContextMenu: ->... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:raw_corpus | raw_corpus | $(event.target).closest('.term-status').data("terminalView").close()
initializeSorting: ->
require '../resources/jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 59 | 108 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$(event.target).closest('.term-status').data("terminalView").close()
initializeSorting: ->
require '../resources/jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
... | $(event.target).closest('.term-status').data("terminalView").close()({
initializeSorting: function() {
require('../resources/jquery-sortable');
this.statusContainer.sortable({
cursor: "move",
distance: 3,
hoverClass: "term-hover",
helper: "clone",
scroll: false,
tolerance: ... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$(event.target).closest('.term-status').data("terminalView").close()({
initializeSorting: function() {
require('../resources/jquery-sortable');
this.statusContainer.sortable({
cursor: "move",
distance: 3,
hoverClass: "term-hover",
... | $(event.target).closest('.term-status').data("terminalView").close()
initializeSorting: ->
require '../resources/jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:completion | completion | $(event.target).closest('.term-status').data("terminalView").close()
initializeSorting: ->
require '../resources/jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
... | shellOverride : atom.config.get 'terminal-plus.core.shellOverride'
shellArguments: atom.config.get 'terminal-plus.core.shellArguments'
cursorBlink : atom.config.get 'terminal-plus.toggles.cursorBlink'
terminalPlusView = new TerminalPlusView(options)
termStatus.data("terminalView", terminalPlusVie... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:raw_corpus | raw_corpus | if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInO... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 109 | 158 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if vi... | var index;
if (index < 0) {
index = this.terminalViews.length - 1;
}
if (this.terminalViews[index] != null) {
this.terminalViews[index].open();
}
({
getActiveTerminalView: function() {
return this.terminalViews[this.activeIndex];
},
runInActiveView: function(callback) {
var view;
view = this.ge... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var index;
if (index < 0) {
index = this.terminalViews.length - 1;
}
if (this.terminalViews[index] != null) {
this.terminalViews[index].open();
}
({
getActiveTerminalView: function() {
return this.terminalViews[this.activeIndex];
},
runInActiveView... | if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInO... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:completion | completion | if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInO... | @terminalViews.splice index, 1
@activeIndex-- if index <= @activeIndex and @activeIndex > 0
moveTerminalView: (oldIndex, newIndex, activeTerminal) =>
view = @terminalViews.splice(oldIndex, 1)[0]
@terminalViews.splice newIndex, 0, view
@setActiveTerminalView activeTerminal
newTerminalView: ->
@... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:raw_corpus | raw_corpus | @subscriptions.dispose()
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 159 | 175 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:5:completion | completion | @subscriptions.dispose()
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]? | @terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.get("terminal-plus.colors.#{color}").toRGBAString()
$(event.target).closest('.term-status').css 'color', color
clearStatusColor: (event) ->
$(event.target).closest('.term-status... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 66cf2d03fa7c174a6995b6873c6ee351b83bcf2e | 478 | https://github.com/jeremyramin/terminal-plus/blob/66cf2d03fa7c174a6995b6873c6ee351b83bcf2e/lib/status-bar.coffee | 159 | 175 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 9 | 58 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class:... | var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight left",
click: 'newTerminalView',
o... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight... | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:completion | completion | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | @registerContextMenu()
@subscriptions.add atom.tooltips.add @plusBtn, title: 'New Terminal'
@subscriptions.add atom.tooltips.add @closeBtn, title: 'Close All'
@createTerminalView()
@attach()
@initializeSorting() if atom.config.get('terminal-plus.toggles.sortableStatus')
registerContextMenu: ->... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:raw_corpus | raw_corpus | if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInO... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 109 | 158 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if vi... | var index;
if (index < 0) {
index = this.terminalViews.length - 1;
}
if (this.terminalViews[index] != null) {
this.terminalViews[index].open();
}
({
getActiveTerminalView: function() {
return this.terminalViews[this.activeIndex];
},
runInActiveView: function(callback) {
var view;
view = this.ge... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var index;
if (index < 0) {
index = this.terminalViews.length - 1;
}
if (this.terminalViews[index] != null) {
this.terminalViews[index].open();
}
({
getActiveTerminalView: function() {
return this.terminalViews[this.activeIndex];
},
runInActiveView... | if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInO... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:completion | completion | if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInO... | @terminalViews.splice index, 1
@activeIndex-- if index <= @activeIndex and @activeIndex > 0
moveTerminalView: (oldIndex, newIndex, activeTerminal) =>
view = @terminalViews.splice(oldIndex, 1)[0]
@terminalViews.splice newIndex, 0, view
@setActiveTerminalView activeTerminal
newTerminalView: ->
@... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 6956899b441a84a793ef479edabe7faa89beafd0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/6956899b441a84a793ef479edabe7faa89beafd0/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 9 | 58 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class:... | var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight left",
click: 'newTerminalView',
o... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight... | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:completion | completion | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | @registerContextMenu()
@subscriptions.add atom.tooltips.add @plusBtn, title: 'New Terminal'
@subscriptions.add atom.tooltips.add @exitBtn, title: 'Exit All'
@createTerminalView()
@attach()
@initializeSorting() if atom.config.get('terminal-plus.toggles.sortableStatus')
atom.config.onDidChange ... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:raw_corpus | raw_corpus | $(event.target).closest('.term-status').data("terminalView").destroy()
initializeSorting: ->
require '../resources/jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 59 | 108 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:3:completion | completion | $(event.target).closest('.term-status').data("terminalView").destroy()
initializeSorting: ->
require '../resources/jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
... | runCommand : atom.config.get 'terminal-plus.core.autoRunCommand'
shellOverride : atom.config.get 'terminal-plus.core.shellOverride'
shellArguments: atom.config.get 'terminal-plus.core.shellArguments'
cursorBlink : atom.config.get 'terminal-plus.toggles.cursorBlink'
terminalPlusView = new Ter... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:raw_corpus | raw_corpus | index = 0
if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return ... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 109 | 158 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:4:completion | completion | index = 0
if index < 0
index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return ... | index = @terminalViews.indexOf terminalView
return if index < 0
@terminalViews.splice index, 1
@activeIndex-- if index <= @activeIndex and @activeIndex > 0
moveTerminalView: (oldIndex, newIndex, activeTerminal) =>
view = @terminalViews.splice(oldIndex, 1)[0]
@terminalViews.splice newIndex, 0, vie... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:raw_corpus | raw_corpus | destroy: ->
@subscriptions.dispose()
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.typ... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 159 | 173 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
destroy: ->
@subscriptions.dispose()
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].tog... | ({
destroy: function() {
var i, len, ref, view;
this.subscriptions.dispose();
ref = this.terminalViews;
for (i = 0, len = ref.length; i < len; i++) {
view = ref[i];
view.ptyProcess.terminate();
view.terminal.destroy();
}
return this.detach();
},
toggle: function() {
i... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 159 | 173 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
destroy: function() {
var i, len, ref, view;
this.subscriptions.dispose();
ref = this.terminalViews;
for (i = 0, len = ref.length; i < len; i++) {
view = ref[i];
view.ptyProcess.terminate();
view.terminal.destroy();
}
... | destroy: ->
@subscriptions.dispose()
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.typ... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 159 | 173 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:completion | completion | destroy: ->
@subscriptions.dispose()
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach() | toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.get("terminal-plus.colors.#{color}").toRGBAString()
$(event.target).css 'color', color | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa | 478 | https://github.com/jeremyramin/terminal-plus/blob/9aa73332ac6f8210c76b3ec5dee4b2d1eec5f2fa/lib/status-bar.coffee | 159 | 173 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 9 | 58 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class:... | var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight left",
click: 'newTerminalView',
o... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight... | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:completion | completion | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | @registerContextMenu()
@subscriptions.add atom.tooltips.add @plusBtn, title: 'New Terminal'
@subscriptions.add atom.tooltips.add @exitBtn, title: 'Exit All'
@createTerminalView()
@attach()
@initializeSorting() if atom.config.get('terminal-plus.toggles.sortableStatus')
atom.config.onDidChange ... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:raw_corpus | raw_corpus | initializeSorting: ->
require './jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui)... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 59 | 108 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:3:completion | completion | initializeSorting: ->
require './jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui)... | shellArguments: atom.config.get 'terminal-plus.core.shellArguments'
cursorBlink : atom.config.get 'terminal-plus.toggles.cursorBlink'
terminalPlusView = new TerminalPlusView(options)
termStatus.view = terminalPlusView
terminalPlusView.statusIcon = termStatus
terminalPlusView.statusBar = this
... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:raw_corpus | raw_corpus | index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInOpenView: (callback)... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 109 | 158 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:4:completion | completion | index = @terminalViews.length - 1
@terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInOpenView: (callback)... | @activeIndex-- if index <= @activeIndex and index > 0
moveTerminalView: (oldIndex, newIndex, activeTerminal) =>
view = @terminalViews.splice(oldIndex, 1)[0]
@terminalViews.splice newIndex, 0, view
@setActiveTerminalView activeTerminal
newTerminalView: ->
@createTerminalView().toggle()
attach: (... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:raw_corpus | raw_corpus | for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.ge... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 159 | 171 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color... | var i, len, ref, view;
ref = this.terminalViews;
for (i = 0, len = ref.length; i < len; i++) {
view = ref[i];
view.ptyProcess.terminate();
view.terminal.destroy();
}
this.detach();
({
toggle: function() {
if (this.terminalViews[this.activeIndex] == null) {
this.createTerminalView();
}
retur... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 159 | 171 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var i, len, ref, view;
ref = this.terminalViews;
for (i = 0, len = ref.length; i < len; i++) {
view = ref[i];
view.ptyProcess.terminate();
view.terminal.destroy();
}
this.detach();
({
toggle: function() {
if (this.terminalViews[this.activeIndex] == n... | for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.ge... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 159 | 171 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:completion | completion | for view in @terminalViews
view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: -> | @createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.get("terminal-plus.colors.#{color}").toRGBAString()
$(event.target).css 'color', color | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 974cc8a4b56326f46d5c8af7cccee885fef13122 | 478 | https://github.com/jeremyramin/terminal-plus/blob/974cc8a4b56326f46d5c8af7cccee885fef13122/lib/status-bar.coffee | 159 | 171 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:raw_corpus | raw_corpus | initializeSorting: ->
require './jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui)... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 59 | 108 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
initializeSorting: ->
require './jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSel... | ({
initializeSorting: function() {
require('./jquery-sortable');
this.statusContainer.sortable({
cursor: "move",
distance: 3,
hoverClass: "term-hover",
helper: "clone",
scroll: false,
tolerance: "intersect"
});
this.statusContainer.disableSelection();
this.statu... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
initializeSorting: function() {
require('./jquery-sortable');
this.statusContainer.sortable({
cursor: "move",
distance: 3,
hoverClass: "term-hover",
helper: "clone",
scroll: false,
tolerance: "intersect"
});
... | initializeSorting: ->
require './jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui)... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:completion | completion | initializeSorting: ->
require './jquery-sortable'
@statusContainer.sortable(
cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui)... | shellArguments: atom.config.get 'terminal-plus.core.shellArguments'
cursorBlink : atom.config.get 'terminal-plus.toggles.cursorBlink'
terminalPlusView = new TerminalPlusView(options)
termStatus.view = terminalPlusView
terminalPlusView.statusIcon = termStatus
terminalPlusView.statusBar = this
... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:raw_corpus | raw_corpus | @terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInOpenView: (callback) ->
view = @getActiveTerminalView(... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 109 | 158 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:4:completion | completion | @terminalViews[index].open() if @terminalViews[index]?
getActiveTerminalView: () ->
return @terminalViews[@activeIndex]
runInActiveView: (callback) ->
view = @getActiveTerminalView()
if view?
return callback(view)
return null
runInOpenView: (callback) ->
view = @getActiveTerminalView(... | moveTerminalView: (oldIndex, newIndex, activeTerminal) =>
view = @terminalViews.splice(oldIndex, 1)[0]
@terminalViews.splice newIndex, 0, view
@setActiveTerminalView activeTerminal
newTerminalView: ->
@createTerminalView().toggle()
attach: () ->
atom.workspace.addBottomPanel(item: this, priori... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:5:raw_corpus | raw_corpus | view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]?
@terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.get("terminal-plus.colors.#{color}"... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 159 | 170 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:5:completion | completion | view.ptyProcess.terminate()
view.terminal.destroy()
@detach()
toggle: ->
@createTerminalView() unless @terminalViews[@activeIndex]? | @terminalViews[@activeIndex].toggle()
setStatusColor: (event) ->
color = event.type.match(/\w+$/)[0]
color = atom.config.get("terminal-plus.colors.#{color}").toRGBAString()
$(event.target).css 'color', color | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 4aafc7dddb669c9d6da256aa611945da8b4c939c | 478 | https://github.com/jeremyramin/terminal-plus/blob/4aafc7dddb669c9d6da256aa611945da8b4c939c/lib/status-bar.coffee | 159 | 170 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 0c499c6844931b28b343ea2c7c14f4fd74e60187 | 478 | https://github.com/jeremyramin/terminal-plus/blob/0c499c6844931b28b343ea2c7c14f4fd74e60187/lib/status-bar.coffee | 9 | 58 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class:... | var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight left",
click: 'newTerminalView',
o... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 0c499c6844931b28b343ea2c7c14f4fd74e60187 | 478 | https://github.com/jeremyramin/terminal-plus/blob/0c499c6844931b28b343ea2c7c14f4fd74e60187/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StatusBar;
StatusBar = (function() {
class StatusBar extends View {
static content() {
return this.div({
class: 'terminal-plus status-bar inline-block'
}, () => {
this.span({
class: "icon icon-plus inline-block-tight... | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 0c499c6844931b28b343ea2c7c14f4fd74e60187 | 478 | https://github.com/jeremyramin/terminal-plus/blob/0c499c6844931b28b343ea2c7c14f4fd74e60187/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:completion | completion | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | @registerContextMenu()
@subscriptions.add atom.tooltips.add @plusBtn, title: 'New Terminal'
@subscriptions.add atom.tooltips.add @exitBtn, title: 'Exit All'
@createTerminalView()
@attach()
@initializeSorting() if atom.config.get('terminal-plus.toggles.sortableStatus')
atom.config.onDidChange ... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 0c499c6844931b28b343ea2c7c14f4fd74e60187 | 478 | https://github.com/jeremyramin/terminal-plus/blob/0c499c6844931b28b343ea2c7c14f4fd74e60187/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 9 | 58 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:2:completion | completion | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | @createTerminalView()
@attach()
@initializeSorting() if atom.config.get('terminal-plus.toggles.sortableStatus')
atom.config.onDidChange 'terminal-plus.colors.default', (event) ->
$('.term-status span').css 'color', event.newValue.toRGBAString()
registerContextMenu: ->
@subscriptions.add atom.c... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 9 | 58 |
jeremyramin/terminal-plus:lib/status-bar.coffee:3:raw_corpus | raw_corpus | cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui) =>
ui.item.oldIndex = ui.item.index()
ui.item.activeTerminal = @terminalViews[... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 59 | 108 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:3:completion | completion | cursor: "move"
distance: 3
hoverClass: "term-hover"
helper: "clone"
scroll: false
tolerance: "intersect"
)
@statusContainer.disableSelection()
@statusContainer.on 'sortstart', (event, ui) =>
ui.item.oldIndex = ui.item.index()
ui.item.activeTerminal = @terminalViews[... | termStatus.view = terminalPlusView
terminalPlusView.statusIcon = termStatus
terminalPlusView.statusBar = this
@terminalViews.push terminalPlusView
termStatus.children().click () =>
terminalPlusView.toggle()
@statusContainer.append termStatus
return terminalPlusView
activeNextTerminalVi... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 59 | 108 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:raw_corpus | raw_corpus | runInCurrentView: (call) ->
v = @getActiveTerminalView()
if v?
return call(v)
return null
setActiveTerminalView: (terminalView) ->
@activeIndex = @terminalViews.indexOf terminalView
removeTerminalView: (terminalView) ->
index = @terminalViews.indexOf terminalView
return if index < 0
... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 109 | 158 | ||
jeremyramin/terminal-plus:lib/status-bar.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
runInCurrentView: (call) ->
v = @getActiveTerminalView()
if v?
return call(v)
return null
setActiveTerminalView: (terminalView) ->
@activeIndex = @terminalViews.indexOf terminalView
removeTerminalView: (terminalView) ->
index = @te... | ({
runInCurrentView: function(call) {
var v;
v = this.getActiveTerminalView();
if (v != null) {
return call(v);
}
return null;
},
setActiveTerminalView: function(terminalView) {
return this.activeIndex = this.terminalViews.indexOf(terminalView);
},
removeTerminalView: function(te... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
runInCurrentView: function(call) {
var v;
v = this.getActiveTerminalView();
if (v != null) {
return call(v);
}
return null;
},
setActiveTerminalView: function(terminalView) {
return this.activeIndex = this.terminalViews.indexO... | runInCurrentView: (call) ->
v = @getActiveTerminalView()
if v?
return call(v)
return null
setActiveTerminalView: (terminalView) ->
@activeIndex = @terminalViews.indexOf terminalView
removeTerminalView: (terminalView) ->
index = @terminalViews.indexOf terminalView
return if index < 0
... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:4:completion | completion | runInCurrentView: (call) ->
v = @getActiveTerminalView()
if v?
return call(v)
return null
setActiveTerminalView: (terminalView) ->
@activeIndex = @terminalViews.indexOf terminalView
removeTerminalView: (terminalView) ->
index = @terminalViews.indexOf terminalView
return if index < 0
... | attach: () ->
atom.workspace.addBottomPanel(item: this, priority: 100)
destroyActiveTerm: ->
@terminalViews[@activeIndex].destroy() if @terminalViews[@activeIndex]?
exitAll: ->
for index in [@terminalViews.length .. 0]
o = @terminalViews[index]
if o?
o.destroy()
@activeIndex = ... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | 7b5085bf2675737dbf2c4b570ddaa558a74c58b0 | 478 | https://github.com/jeremyramin/terminal-plus/blob/7b5085bf2675737dbf2c4b570ddaa558a74c58b0/lib/status-bar.coffee | 109 | 158 |
jeremyramin/terminal-plus:lib/status-bar.coffee:2:raw_corpus | raw_corpus | class StatusBar extends View
terminalViews: []
activeIndex: 0
@content: ->
@div class: 'terminal-plus status-bar inline-block', =>
@span class: "icon icon-plus inline-block-tight left", click: 'newTerminalView', outlet: 'plusBtn'
@ul class: 'list-inline status-container left', outlet: 'statusCont... | CoffeeScript | jeremyramin/terminal-plus | lib/status-bar.coffee | MIT | b693805f0fead2de509ffc079b106459ecb37182 | 478 | https://github.com/jeremyramin/terminal-plus/blob/b693805f0fead2de509ffc079b106459ecb37182/lib/status-bar.coffee | 7 | 56 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.