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:test/parser.coffee:2:raw_corpus | raw_corpus | eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[assign] = block.expressions
outerCall = assign.value.base
innerValue = outerCall.variable
innerCall = innerValue.base
assertColumnRange assign, 0, 15
assertColumnRange outerCall, 4, 15
assertColumnRange innerValue, 4, 12... | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/parser.coffee | 51 | 80 | ||
jashkenas/coffeescript:test/parser.coffee:2:completion | completion | eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[assign] = block.expressions
outerCall = assign.value.base
innerValue = outerCall.variable
innerCall = innerValue.base
assertColumnRange assign, 0, 15
assertColumnRange outerCall, 4, 15
assertColumnRange innerValue, 4, 12... | new new A()()
'''
{body: block} = CoffeeScript.nodes source
assertColumnRange = (node, firstColumn, lastColumn) ->
eq node.locationData.first_line, 0
eq node.locationData.first_column, firstColumn
eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[{base: outerCall}... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/parser.coffee | 51 | 80 |
jashkenas/coffeescript:test/parser.coffee:1:raw_corpus | raw_corpus | # Parser
# ---------
test "operator precedence for logical operators", ->
source = '''
a or b and c
'''
block = CoffeeScript.nodes source
[expression] = block.expressions
eq expression.first.base.value, 'a'
eq expression.operator, '||'
eq expression.second.first.base.value, 'b'
eq expression.second... | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | e934a42e75ebb742aa294adc4d635fb4ef8474ba | 16,577 | https://github.com/jashkenas/coffeescript/blob/e934a42e75ebb742aa294adc4d635fb4ef8474ba/test/parser.coffee | 1 | 50 | ||
jashkenas/coffeescript:test/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Parser
# ---------
test "operator precedence for logical operators", ->
source = '''
a or b and c
'''
block = CoffeeScript.nodes source
[expression] = block.expressions
eq expression.first.base.value, 'a'
eq expression.operator, '||'
eq expre... | // Parser
// ---------
test("operator precedence for logical operators", function() {
var block, expression, source;
source = `a or b and c`;
block = CoffeeScript.nodes(source);
[expression] = block.expressions;
eq(expression.first.base.value, 'a');
eq(expression.operator, '||');
eq(expression.second.firs... | CoffeeScript | JavaScript | jashkenas/coffeescript | test/parser.coffee | MIT | e934a42e75ebb742aa294adc4d635fb4ef8474ba | 16,577 | https://github.com/jashkenas/coffeescript/blob/e934a42e75ebb742aa294adc4d635fb4ef8474ba/test/parser.coffee | 1 | 50 |
jashkenas/coffeescript:test/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Parser
// ---------
test("operator precedence for logical operators", function() {
var block, expression, source;
source = `a or b and c`;
block = CoffeeScript.nodes(source);
[expression] = block.expressions;
eq(expression.first.base.value, 'a');
eq(... | # Parser
# ---------
test "operator precedence for logical operators", ->
source = '''
a or b and c
'''
block = CoffeeScript.nodes source
[expression] = block.expressions
eq expression.first.base.value, 'a'
eq expression.operator, '||'
eq expression.second.first.base.value, 'b'
eq expression.second... | JavaScript | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | e934a42e75ebb742aa294adc4d635fb4ef8474ba | 16,577 | https://github.com/jashkenas/coffeescript/blob/e934a42e75ebb742aa294adc4d635fb4ef8474ba/test/parser.coffee | 1 | 50 |
jashkenas/coffeescript:test/parser.coffee:1:completion | completion | # Parser
# ---------
test "operator precedence for logical operators", ->
source = '''
a or b and c
'''
block = CoffeeScript.nodes source
[expression] = block.expressions
eq expression.first.base.value, 'a'
eq expression.operator, '||'
eq expression.second.first.base.value, 'b'
eq expression.second... | eq expression.second.second.first.base.value, 'c'
eq expression.second.second.operator, '&'
eq expression.second.second.second.base.value, 'd'
test "operator precedence for binary ? operator", ->
source = '''
a ? b and c
'''
block = CoffeeScript.nodes source
[expression] = block.expressions
eq expre... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | e934a42e75ebb742aa294adc4d635fb4ef8474ba | 16,577 | https://github.com/jashkenas/coffeescript/blob/e934a42e75ebb742aa294adc4d635fb4ef8474ba/test/parser.coffee | 1 | 50 |
jashkenas/coffeescript:test/parser.coffee:2:raw_corpus | raw_corpus | eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[assign] = block.expressions
outerCall = assign.value.base
innerValue = outerCall.variable
innerCall = innerValue.base
assertColumnRange assign, 0, 15
assertColumnRange outerCall, 4, 15
assertColumnRange innerValue, 4, 12... | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | e934a42e75ebb742aa294adc4d635fb4ef8474ba | 16,577 | https://github.com/jashkenas/coffeescript/blob/e934a42e75ebb742aa294adc4d635fb4ef8474ba/test/parser.coffee | 51 | 80 | ||
jashkenas/coffeescript:test/parser.coffee:2:completion | completion | eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[assign] = block.expressions
outerCall = assign.value.base
innerValue = outerCall.variable
innerCall = innerValue.base
assertColumnRange assign, 0, 15
assertColumnRange outerCall, 4, 15
assertColumnRange innerValue, 4, 12... | new new A()()
'''
block = CoffeeScript.nodes source
assertColumnRange = (node, firstColumn, lastColumn) ->
eq node.locationData.first_line, 0
eq node.locationData.first_column, firstColumn
eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[{base: outerCall}] = bloc... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | e934a42e75ebb742aa294adc4d635fb4ef8474ba | 16,577 | https://github.com/jashkenas/coffeescript/blob/e934a42e75ebb742aa294adc4d635fb4ef8474ba/test/parser.coffee | 51 | 80 |
jashkenas/coffeescript:test/parser.coffee:2:raw_corpus | raw_corpus | eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[assign] = block.expressions
outerCall = assign.value
innerValue = outerCall.variable
innerCall = innerValue.base
assertColumnRange assign, 0, 15
assertColumnRange outerCall, 4, 15
assertColumnRange innerValue, 4, 12
as... | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | fbc77f744549d4377cc4eb02acf3b6331118d8dc | 16,577 | https://github.com/jashkenas/coffeescript/blob/fbc77f744549d4377cc4eb02acf3b6331118d8dc/test/parser.coffee | 51 | 80 | ||
jashkenas/coffeescript:test/parser.coffee:2:completion | completion | eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[assign] = block.expressions
outerCall = assign.value
innerValue = outerCall.variable
innerCall = innerValue.base
assertColumnRange assign, 0, 15
assertColumnRange outerCall, 4, 15
assertColumnRange innerValue, 4, 12
as... | new new A()()
'''
block = CoffeeScript.nodes source
assertColumnRange = (node, firstColumn, lastColumn) ->
eq node.locationData.first_line, 0
eq node.locationData.first_column, firstColumn
eq node.locationData.last_line, 0
eq node.locationData.last_column, lastColumn
[outerCall] = block.expres... | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/parser.coffee | MIT | fbc77f744549d4377cc4eb02acf3b6331118d8dc | 16,577 | https://github.com/jashkenas/coffeescript/blob/fbc77f744549d4377cc4eb02acf3b6331118d8dc/test/parser.coffee | 51 | 80 |
nicolaskruchten/pivottable:pivot.tr.coffee:1:raw_corpus | raw_corpus | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQuery ($) ->
nf = $.piv... | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 1 | 50 | ||
nicolaskruchten/pivottable:pivot.tr.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
... | var callWithJQuery;
callWithJQuery = function(pivotModule) {
if (typeof exports === "object" && typeof module === "object") { // CommonJS
return pivotModule(require("jquery"));
} else if (typeof define === "function" && define.amd) { // AMD
return define(["jquery"], pivotModule);
} else {
// Plain br... | CoffeeScript | JavaScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 1 | 50 |
nicolaskruchten/pivottable:pivot.tr.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var callWithJQuery;
callWithJQuery = function(pivotModule) {
if (typeof exports === "object" && typeof module === "object") { // CommonJS
return pivotModule(require("jquery"));
} else if (typeof define === "function" && define.amd) { // AMD
return defi... | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQuery ($) ->
nf = $.piv... | JavaScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 1 | 50 |
nicolaskruchten/pivottable:pivot.tr.coffee:1:completion | completion | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQuery ($) ->
nf = $.piv... | computeError: "PivotTable sonuçlarını işlerken hata oluştu"
uiRenderError: "PivotTable UI sonuçlarını oluştuturken hata oluştu"
selectAll: "Tümünü Seç"
selectNone: "Tümünü Bırak"
tooMany: "(listelemek... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 1 | 50 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:raw_corpus | raw_corpus | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 51 | 79 | ||
nicolaskruchten/pivottable:pivot.tr.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
... | ({
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)({
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
}),
renderers: {
"Tablo": r["Table"],
"Tablo (... | CoffeeScript | JavaScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 51 | 79 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)({
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
}... | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | JavaScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 51 | 79 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:completion | completion | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | "Yığılmış Çubuk Grafik ": gcr["Stacked Bar Chart"]
"Alan Grafiği": gcr["Area Chart"]
if d3r
$.pivotUtilities.locales.tr.d3_renderers =
"Hiyerarşik Alan Grafiği (Treemap)": d3r["Treemap"]
if c3r
$.pivotUtilities.locales.tr.c3_renderers =
"&Cc... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 919ee19b38c410b9d6b98626b4044e4baa7ad8ab | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/919ee19b38c410b9d6b98626b4044e4baa7ad8ab/pivot.tr.coffee | 51 | 79 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:raw_corpus | raw_corpus | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | b673f54db2150e506e48f5ae604a22b5ce5b38c6 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/b673f54db2150e506e48f5ae604a22b5ce5b38c6/pivot.tr.coffee | 51 | 77 | ||
nicolaskruchten/pivottable:pivot.tr.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
... | ({
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)({
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
}),
renderers: {
"Tablo": r["Table"],
"Tablo (... | CoffeeScript | JavaScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | b673f54db2150e506e48f5ae604a22b5ce5b38c6 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/b673f54db2150e506e48f5ae604a22b5ce5b38c6/pivot.tr.coffee | 51 | 77 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)({
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
}... | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | JavaScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | b673f54db2150e506e48f5ae604a22b5ce5b38c6 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/b673f54db2150e506e48f5ae604a22b5ce5b38c6/pivot.tr.coffee | 51 | 77 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:completion | completion | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | "Bar Grafiği (gchart)": gcr["Bar Chart"]
"Yığılmış Çubuk Grafik (gchart)": gcr["Stacked Bar Chart"]
"Alan Grafiği (gchart)": gcr["Area Chart"]
if d3r
$.pivotUtilities.locales.tr.d3_renderers =
"Hiyerarşik Alan Grafiği (Treemap)": d3r["Treemap"... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | b673f54db2150e506e48f5ae604a22b5ce5b38c6 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/b673f54db2150e506e48f5ae604a22b5ce5b38c6/pivot.tr.coffee | 51 | 77 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:raw_corpus | raw_corpus | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | ea9a14a795ca8167b27573594c169b07a440b5e9 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/ea9a14a795ca8167b27573594c169b07a440b5e9/pivot.tr.coffee | 51 | 77 | ||
nicolaskruchten/pivottable:pivot.tr.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
... | ({
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)({
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
}),
renderers: {
"Tablo": r["Table"],
"Tablo (... | CoffeeScript | JavaScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | ea9a14a795ca8167b27573594c169b07a440b5e9 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/ea9a14a795ca8167b27573594c169b07a440b5e9/pivot.tr.coffee | 51 | 77 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
"Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)({
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
}... | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | JavaScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | ea9a14a795ca8167b27573594c169b07a440b5e9 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/ea9a14a795ca8167b27573594c169b07a440b5e9/pivot.tr.coffee | 51 | 77 |
nicolaskruchten/pivottable:pivot.tr.coffee:2:completion | completion | "Toplam oranı (sayı)": tpl.fractionOf(tpl.count(), "total", frFmtPct)
"Satır oranı (sayı)": tpl.fractionOf(tpl.count(), "row", frFmtPct)
"Sütunun oranı (sayı)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
renderers:
"Tablo": r["Table"]
"Tablo (&Ccedi... | "Bar Grafiği (gchart)": gcr["Bar Chart"]
"Yığılmış Çubuk Grafik (gchart)": gcr["Stacked Bar Chart"]
"Alan Grafiği (gchart)": gcr["Area Chart"]
if d3r
$.pivotUtilities.locales.pt.d3_renderers =
"Hiyerarşik Alan Grafiği (Treemap)": d3r["Treemap"... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | ea9a14a795ca8167b27573594c169b07a440b5e9 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/ea9a14a795ca8167b27573594c169b07a440b5e9/pivot.tr.coffee | 51 | 77 |
nicolaskruchten/pivottable:pivot.tr.coffee:1:raw_corpus | raw_corpus | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | a0c29bf6bb0d90f01195d334b1068e811cab176d | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/a0c29bf6bb0d90f01195d334b1068e811cab176d/pivot.tr.coffee | 1 | 50 | ||
nicolaskruchten/pivottable:pivot.tr.coffee:1:completion | completion | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | tooMany: "(listelemek için fazla)"
filterResults: "Sonuçları filtrele"
totals: "Toplam"
vs: "vs"
by: "ile"
aggregators:
"Sayı": tpl.count(frFmtInt)
"Benzersiz değerler sayısı... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | a0c29bf6bb0d90f01195d334b1068e811cab176d | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/a0c29bf6bb0d90f01195d334b1068e811cab176d/pivot.tr.coffee | 1 | 50 |
nicolaskruchten/pivottable:pivot.tr.coffee:1:raw_corpus | raw_corpus | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 0c708a24ce6f2ff180c43bd1853c4c44690457a6 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/0c708a24ce6f2ff180c43bd1853c4c44690457a6/pivot.tr.coffee | 1 | 50 | ||
nicolaskruchten/pivottable:pivot.tr.coffee:1:completion | completion | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | tooMany: "(listelemek için fazla)"
filterResults: "Sonuçları filtrele"
totals: "Toplam"
vs: "vs"
by: "ile"
aggregators:
"Sayı": tpl.count(frFmtInt)
"Benzersiz değerler sayısı": tpl.countUnique(frFmtInt)
... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.tr.coffee | MIT | 0c708a24ce6f2ff180c43bd1853c4c44690457a6 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/0c708a24ce6f2ff180c43bd1853c4c44690457a6/pivot.tr.coffee | 1 | 50 |
gss/engine:src/structures/Identity.coffee:1:raw_corpus | raw_corpus | class Identity
@uid: 0
set: (object, generate) =>
if typeof object == 'string'
if object.charAt(0) != '$' && object.charAt(0) != ':'
return '$' + object
return object
unless id = object._gss_id
if object == document
id = "::document"
else if object == window
... | CoffeeScript | gss/engine | src/structures/Identity.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/structures/Identity.coffee | 1 | 36 | ||
gss/engine:src/structures/Identity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class Identity
@uid: 0
set: (object, generate) =>
if typeof object == 'string'
if object.charAt(0) != '$' && object.charAt(0) != ':'
return '$' + object
return object
unless id = object._gss_id
if object == document
... | var Identity;
Identity = (function() {
class Identity {
constructor() {
this.set = this.set.bind(this);
}
set(object, generate) {
var id, uid;
if (typeof object === 'string') {
if (object.charAt(0) !== '$' && object.charAt(0) !== ':') {
return '$' + object;
}
... | CoffeeScript | JavaScript | gss/engine | src/structures/Identity.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/structures/Identity.coffee | 1 | 36 |
gss/engine:src/structures/Identity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Identity;
Identity = (function() {
class Identity {
constructor() {
this.set = this.set.bind(this);
}
set(object, generate) {
var id, uid;
if (typeof object === 'string') {
if (object.charAt(0) !== '$' && object.charAt(... | class Identity
@uid: 0
set: (object, generate) =>
if typeof object == 'string'
if object.charAt(0) != '$' && object.charAt(0) != ':'
return '$' + object
return object
unless id = object._gss_id
if object == document
id = "::document"
else if object == window
... | JavaScript | CoffeeScript | gss/engine | src/structures/Identity.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/structures/Identity.coffee | 1 | 36 |
gss/engine:src/structures/Identity.coffee:1:completion | completion | class Identity
@uid: 0
set: (object, generate) =>
if typeof object == 'string'
if object.charAt(0) != '$' && object.charAt(0) != ':'
return '$' + object
return object
unless id = object._gss_id
if object == document
id = "::document"
else if object == window
... | "$" + (object.id || object._gss_id || ++Identity.uid)
@[id] = object
return id
get: (id) ->
return @[id]
solve: (id) ->
return @[id]
unset: (object) ->
delete @[object._gss_id]
# Get id if given object has one
find: (object) ->
return @set(object, false)
module.exports = Ident... | CoffeeScript | CoffeeScript | gss/engine | src/structures/Identity.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/structures/Identity.coffee | 1 | 36 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:raw_corpus | raw_corpus | _ = require "underscore"
Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index, @length) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If v... | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/SpreadEnv.coffee | 1 | 50 | ||
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require "underscore"
Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index, @length) ->
lookup: (spread) ->
if spread.origin == @origin
r... | var Spread, SpreadEnv, _;
_ = require("underscore");
Spread = require("./Spread");
// TODO: This should have tests for isEqualTo and contains
module.exports = SpreadEnv = class SpreadEnv {
constructor(parent, origin, index1, length) {
this.parent = parent;
this.origin = origin;
this.index = index1;
... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/SpreadEnv.coffee | 1 | 50 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Spread, SpreadEnv, _;
_ = require("underscore");
Spread = require("./Spread");
// TODO: This should have tests for isEqualTo and contains
module.exports = SpreadEnv = class SpreadEnv {
constructor(parent, origin, index1, length) {
this.parent = parent;... | _ = require "underscore"
Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index, @length) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If v... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/SpreadEnv.coffee | 1 | 50 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:completion | completion | _ = require "underscore"
Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index, @length) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If v... | resolveWithDefault: (value) ->
if value instanceof Spread
index = @lookup(value) ? 0
value = value.items[index]
return @resolveWithDefault(value)
return value
# Note: assign is not a mutation, it returns a new SpreadEnv where spread is
# assigned to index.
assign: (spread, index) ->
... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/SpreadEnv.coffee | 1 | 50 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:2:raw_corpus | raw_corpus | # this SpreadEnv?"
toBooleanSpread: () ->
# Note: This often returns an irregular ("ragged") spread. These work fine.
if not @length then return true
items = _.range(@length).map(() => false)
items[@index] = @parent.toBooleanSpread()
new Spread(items, @origin)
SpreadEnv.empty = new SpreadEnv(... | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/SpreadEnv.coffee | 51 | 63 | ||
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:2:completion | completion | # this SpreadEnv?"
toBooleanSpread: () ->
# Note: This often returns an irregular ("ragged") spread. These work fine.
if not @length then return true | items = _.range(@length).map(() => false)
items[@index] = @parent.toBooleanSpread()
new Spread(items, @origin)
SpreadEnv.empty = new SpreadEnv() | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/SpreadEnv.coffee | 51 | 63 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:raw_corpus | raw_corpus | Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If value is a spread, resolve will recu... | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5 | 1,052 | https://github.com/cdglabs/apparatus/blob/6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5/src/Dataflow/SpreadEnv.coffee | 1 | 49 | ||
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lo... | var Spread, SpreadEnv;
Spread = require("./Spread");
// TODO: This should have tests for isEqualTo and contains
module.exports = SpreadEnv = class SpreadEnv {
constructor(parent, origin, index1) {
this.parent = parent;
this.origin = origin;
this.index = index1;
}
lookup(spread) {
var ref;
i... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5 | 1,052 | https://github.com/cdglabs/apparatus/blob/6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5/src/Dataflow/SpreadEnv.coffee | 1 | 49 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Spread, SpreadEnv;
Spread = require("./Spread");
// TODO: This should have tests for isEqualTo and contains
module.exports = SpreadEnv = class SpreadEnv {
constructor(parent, origin, index1) {
this.parent = parent;
this.origin = origin;
this.ind... | Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If value is a spread, resolve will recu... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5 | 1,052 | https://github.com/cdglabs/apparatus/blob/6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5/src/Dataflow/SpreadEnv.coffee | 1 | 49 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:completion | completion | Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If value is a spread, resolve will recu... | if value instanceof Spread
index = @lookup(value) ? 0
value = value.items[index]
return @resolveWithDefault(value)
return value
# Note: assign is not a mutation, it returns a new SpreadEnv where spread is
# assigned to index.
assign: (spread, index) ->
return new SpreadEnv(this, spread... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | 6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5 | 1,052 | https://github.com/cdglabs/apparatus/blob/6e10d01af5d5b37efae0a6e6e3229b87c3ec7de5/src/Dataflow/SpreadEnv.coffee | 1 | 49 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:raw_corpus | raw_corpus | Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If value is a spread, resolve will recu... | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | d676577337b62d5b97133ff51ba5ef6177efb951 | 1,052 | https://github.com/cdglabs/apparatus/blob/d676577337b62d5b97133ff51ba5ef6177efb951/src/Dataflow/SpreadEnv.coffee | 1 | 40 | ||
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lo... | var Spread, SpreadEnv;
Spread = require("./Spread");
// TODO: This should have tests for isEqualTo and contains
module.exports = SpreadEnv = class SpreadEnv {
constructor(parent, origin, index1) {
this.parent = parent;
this.origin = origin;
this.index = index1;
}
lookup(spread) {
var ref;
i... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | d676577337b62d5b97133ff51ba5ef6177efb951 | 1,052 | https://github.com/cdglabs/apparatus/blob/d676577337b62d5b97133ff51ba5ef6177efb951/src/Dataflow/SpreadEnv.coffee | 1 | 40 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Spread, SpreadEnv;
Spread = require("./Spread");
// TODO: This should have tests for isEqualTo and contains
module.exports = SpreadEnv = class SpreadEnv {
constructor(parent, origin, index1) {
this.parent = parent;
this.origin = origin;
this.ind... | Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If value is a spread, resolve will recu... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | d676577337b62d5b97133ff51ba5ef6177efb951 | 1,052 | https://github.com/cdglabs/apparatus/blob/d676577337b62d5b97133ff51ba5ef6177efb951/src/Dataflow/SpreadEnv.coffee | 1 | 40 |
cdglabs/apparatus:src/Dataflow/SpreadEnv.coffee:1:completion | completion | Spread = require "./Spread"
# TODO: This should have tests for isEqualTo and contains
module.exports = class SpreadEnv
constructor: (@parent, @origin, @index) ->
lookup: (spread) ->
if spread.origin == @origin
return @index
return @parent?.lookup(spread)
# If value is a spread, resolve will recu... | return value
# Note: assign is not a mutation, it returns a new SpreadEnv where spread is
# assigned to index.
assign: (spread, index) ->
return new SpreadEnv(this, spread.origin, index)
isEqualTo: (spreadEnv) ->
return false unless spreadEnv?
return false unless @origin == spreadEnv.origin and @i... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/SpreadEnv.coffee | MIT | d676577337b62d5b97133ff51ba5ef6177efb951 | 1,052 | https://github.com/cdglabs/apparatus/blob/d676577337b62d5b97133ff51ba5ef6177efb951/src/Dataflow/SpreadEnv.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:raw_corpus | raw_corpus | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
describe "with '#{string.replace(/#/g, '+')}'", ->
... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 1 | 39 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
... | var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scanner, text, withScannerForString, withScannerForTextEdit... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 1 | 39 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scan... | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
describe "with '#{string.replace(/#/g, '+')}'", ->
... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 1 | 39 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:completion | completion | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
describe "with '#{string.replace(/#/g, '+')}'", ->
... | describe "with #{fixture} buffer", ->
beforeEach ->
waitsForPromise -> atom.workspace.open(fixture)
runs ->
editor = atom.workspace.getActiveTextEditor()
text = editor.getText()
afterEach -> editor = null
do block
withScannerForTextEditor = (fixture, block) ->
... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 1 | 39 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:raw_corpus | raw_corpus | describe '::search', ->
withScannerForTextEditor 'html-entities.html', ->
beforeEach ->
result = scanner.search(text, 'html')
it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'css-color-with-prefix.less', ->
beforeEach ->
result = scann... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 41 | 81 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe '::search', ->
withScannerForTextEditor 'html-entities.html', ->
beforeEach ->
result = scanner.search(text, 'html')
it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'css-color-with-pr... | describe('::search', function() {
withScannerForTextEditor('html-entities.html', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'html');
});
return it('returns nothing', function() {
return expect(result).toBeUndefined();
});
});
withScanner... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 41 | 81 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('::search', function() {
withScannerForTextEditor('html-entities.html', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'html');
});
return it('returns nothing', function() {
return expe... | describe '::search', ->
withScannerForTextEditor 'html-entities.html', ->
beforeEach ->
result = scanner.search(text, 'html')
it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'css-color-with-prefix.less', ->
beforeEach ->
result = scann... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 41 | 81 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:completion | completion | describe '::search', ->
withScannerForTextEditor 'html-entities.html', ->
beforeEach ->
result = scanner.search(text, 'html')
it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'css-color-with-prefix.less', ->
beforeEach ->
result = scann... | expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
expect(result.range).toEqual([13,17])
it 'has a color', ->
expect(result.color).toBeColor('#ffffff')
it 'stores the matched text', ->
expect(result.match).toEqu... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 41 | 81 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:raw_corpus | raw_corpus | expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeUndefined()
it 'stores the line of successive matches', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
expect(do... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 83 | 121 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:completion | completion | expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeUndefined()
it 'stores the line of successive matches', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
expect(do... | describe 'the resulting buffer color', ->
it 'has a text range', ->
expect(result.range).toEqual([15,20])
it 'has a color', ->
expect(result.color).toBeColor('#ffffff')
withScannerForTextEditor 'project/styles/variables.styl', ->
beforeEach ->
result = scanner.sea... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 83 | 121 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:raw_corpus | raw_corpus | withScannerForTextEditor 'crlf.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
expect(result.range).toEqual([... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 123 | 163 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
withScannerForTextEditor 'crlf.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a... | withScannerForTextEditor('crlf.styl', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'styl');
});
it('returns the first buffer color match', function() {
return expect(result).toBeDefined();
});
describe('the resulting buffer color', function() {
it('has ... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 123 | 163 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
withScannerForTextEditor('crlf.styl', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'styl');
});
it('returns the first buffer color match', function() {
return expect(result).toBeDefined();
});
describe(... | withScannerForTextEditor 'crlf.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
expect(result.range).toEqual([... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 123 | 163 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:completion | completion | withScannerForTextEditor 'crlf.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
expect(result.range).toEqual([... | withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
doSearch = -> result = scanner.search(text, 'css', result.lastIndex)
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeUndefined... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/color-scanner-spec.coffee | 123 | 163 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:raw_corpus | raw_corpus | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
console.log 'here'
describe "with '#{string.replac... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 63fb2dafb9aace3140449ccf5778eed9c05d3413 | 518 | https://github.com/abe33/atom-pigments/blob/63fb2dafb9aace3140449ccf5778eed9c05d3413/spec/color-scanner-spec.coffee | 1 | 40 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
... | var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scanner, text, withScannerForString, withScannerForTextEdit... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 63fb2dafb9aace3140449ccf5778eed9c05d3413 | 518 | https://github.com/abe33/atom-pigments/blob/63fb2dafb9aace3140449ccf5778eed9c05d3413/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scan... | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
console.log 'here'
describe "with '#{string.replac... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 63fb2dafb9aace3140449ccf5778eed9c05d3413 | 518 | https://github.com/abe33/atom-pigments/blob/63fb2dafb9aace3140449ccf5778eed9c05d3413/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:completion | completion | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
console.log 'here'
describe "with '#{string.replac... | describe "with #{fixture} buffer", ->
beforeEach ->
waitsForPromise -> atom.workspace.open(fixture)
runs ->
editor = atom.workspace.getActiveTextEditor()
text = editor.getText()
afterEach -> editor = null
do block
withScannerForTextEditor = (fixture, block) ->
... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 63fb2dafb9aace3140449ccf5778eed9c05d3413 | 518 | https://github.com/abe33/atom-pigments/blob/63fb2dafb9aace3140449ccf5778eed9c05d3413/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:raw_corpus | raw_corpus | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
fdescribe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
console.log 'here'
describe "with '#{string.repla... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | bbb37271d4d78b0dc87ccf407b84d770d76c7103 | 518 | https://github.com/abe33/atom-pigments/blob/bbb37271d4d78b0dc87ccf407b84d770d76c7103/spec/color-scanner-spec.coffee | 1 | 40 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
fdescribe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
... | var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
fdescribe('ColorScanner', function() {
var editor, lastIndex, result, scanner, text, withScannerForString, withScannerForTextEdi... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | bbb37271d4d78b0dc87ccf407b84d770d76c7103 | 518 | https://github.com/abe33/atom-pigments/blob/bbb37271d4d78b0dc87ccf407b84d770d76c7103/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
fdescribe('ColorScanner', function() {
var editor, lastIndex, result, sca... | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
fdescribe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
console.log 'here'
describe "with '#{string.repla... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | bbb37271d4d78b0dc87ccf407b84d770d76c7103 | 518 | https://github.com/abe33/atom-pigments/blob/bbb37271d4d78b0dc87ccf407b84d770d76c7103/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:completion | completion | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
fdescribe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withScannerForString = (string, block) ->
console.log 'here'
describe "with '#{string.repla... | describe "with #{fixture} buffer", ->
beforeEach ->
waitsForPromise -> atom.workspace.open(fixture)
runs ->
editor = atom.workspace.getActiveTextEditor()
text = editor.getText()
afterEach -> editor = null
do block
withScannerForTextEditor = (fixture, block) ->
... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | bbb37271d4d78b0dc87ccf407b84d770d76c7103 | 518 | https://github.com/abe33/atom-pigments/blob/bbb37271d4d78b0dc87ccf407b84d770d76c7103/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:raw_corpus | raw_corpus | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withTextEditor = (fixture, block) ->
describe "with #{fixture} buffer", ->
beforeEach ->
... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 1 | 40 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withTextEditor = (fixture, block) ->
de... | var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scanner, text, withScannerForTextEditor, withTextEditor;
... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scan... | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withTextEditor = (fixture, block) ->
describe "with #{fixture} buffer", ->
beforeEach ->
... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:completion | completion | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withTextEditor = (fixture, block) ->
describe "with #{fixture} buffer", ->
beforeEach ->
... | withTextEditor fixture, ->
beforeEach ->
context = new ColorContext({registry})
scanner = new ColorScanner({context})
afterEach -> scanner = null
do block
describe '::search', ->
withScannerForTextEditor 'html-entities.html', ->
beforeEach ->
result = scanner.sea... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 1 | 40 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:raw_corpus | raw_corpus | it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'four-variables.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color'... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 42 | 82 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'four-variables.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).t... | it('returns nothing', function() {
return expect(result).toBeUndefined();
});
withScannerForTextEditor('four-variables.styl', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'styl');
});
it('returns the first buffer color match', function() {
return expect(resu... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 42 | 82 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('returns nothing', function() {
return expect(result).toBeUndefined();
});
withScannerForTextEditor('four-variables.styl', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'styl');
});
it('returns the first b... | it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'four-variables.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color'... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 42 | 82 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:2:completion | completion | it 'returns nothing', ->
expect(result).toBeUndefined()
withScannerForTextEditor 'four-variables.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color'... | it 'stores the last index', ->
expect(result.lastIndex).toEqual(17)
it 'stores match line', ->
expect(result.line).toEqual(0)
describe 'successive searches', ->
it 'returns a buffer color for each match and then undefined', ->
doSearch = -> result = scanner.search(t... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 42 | 82 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:raw_corpus | raw_corpus | withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
exp... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 84 | 124 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color... | withScannerForTextEditor('class-after-color.sass', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'sass');
});
it('returns the first buffer color match', function() {
return expect(result).toBeDefined();
});
return describe('the resulting buffer color', funct... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 84 | 124 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
withScannerForTextEditor('class-after-color.sass', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'sass');
});
it('returns the first buffer color match', function() {
return expect(result).toBeDefined();
})... | withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
exp... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 84 | 124 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:completion | completion | withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
exp... | describe 'the resulting buffer color', ->
it 'has a text range', ->
expect(result.range).toEqual([18,25])
it 'has a color', ->
expect(result.color).toBeColor('#BF616A')
withScannerForTextEditor 'crlf.styl', ->
beforeEach ->
result = scanner.search(te... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 84 | 124 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:raw_corpus | raw_corpus | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 126 | 140 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds b... | it('finds the second color', function() {
var doSearch;
doSearch = function() {
var result;
return result = scanner.search(text, 'styl', result.lastIndex);
};
doSearch();
return expect(result.color).toBeDefined();
});
withScannerForTextEditor('color-in-tag-content.html', function() {
return it('fin... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 126 | 140 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('finds the second color', function() {
var doSearch;
doSearch = function() {
var result;
return result = scanner.search(text, 'styl', result.lastIndex);
};
doSearch();
return expect(result.color).toBeDefined();
});
withScannerForTextEditor('co... | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 126 | 140 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:completion | completion | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined() | withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
doSearch = -> result = scanner.search(text, 'css', result.lastIndex)
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).t... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 2041244121c3346ca39b8926005bf8ec4fd80064 | 518 | https://github.com/abe33/atom-pigments/blob/2041244121c3346ca39b8926005bf8ec4fd80064/spec/color-scanner-spec.coffee | 126 | 140 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:raw_corpus | raw_corpus | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97 | 518 | https://github.com/abe33/atom-pigments/blob/941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97/spec/color-scanner-spec.coffee | 126 | 140 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds b... | it('finds the second color', function() {
var doSearch;
doSearch = function() {
var result;
return result = scanner.search(text, 'styl', result.lastIndex);
};
doSearch();
return expect(result.color).toBeDefined();
});
withScannerForTextEditor('color-in-tag-content.html', function() {
return it('fin... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97 | 518 | https://github.com/abe33/atom-pigments/blob/941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97/spec/color-scanner-spec.coffee | 126 | 140 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('finds the second color', function() {
var doSearch;
doSearch = function() {
var result;
return result = scanner.search(text, 'styl', result.lastIndex);
};
doSearch();
return expect(result.color).toBeDefined();
});
withScannerForTextEditor('co... | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97 | 518 | https://github.com/abe33/atom-pigments/blob/941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97/spec/color-scanner-spec.coffee | 126 | 140 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:completion | completion | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined() | withScannerForTextEditor 'color-in-tag-content.html', ->
it 'finds both colors', ->
result = lastIndex: 0
doSearch = -> result = scanner.search(text, 'html', result.lastIndex)
expect(doSearch()).toBeDefined()
expect(doSearch()).toBeDefined()
expect(doSearch()).... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97 | 518 | https://github.com/abe33/atom-pigments/blob/941fc7a34f1fb3a5072defb3a5f7b04b0a3dcf97/spec/color-scanner-spec.coffee | 126 | 140 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:raw_corpus | raw_corpus | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined() | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 07117e1fe1c5215bc921085dd516ce72d6af6604 | 518 | https://github.com/abe33/atom-pigments/blob/07117e1fe1c5215bc921085dd516ce72d6af6604/spec/color-scanner-spec.coffee | 126 | 131 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined()
``` | it('finds the second color', function() {
var doSearch;
doSearch = function() {
var result;
return result = scanner.search(text, 'styl', result.lastIndex);
};
doSearch();
return expect(result.color).toBeDefined();
}); | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 07117e1fe1c5215bc921085dd516ce72d6af6604 | 518 | https://github.com/abe33/atom-pigments/blob/07117e1fe1c5215bc921085dd516ce72d6af6604/spec/color-scanner-spec.coffee | 126 | 131 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('finds the second color', function() {
var doSearch;
doSearch = function() {
var result;
return result = scanner.search(text, 'styl', result.lastIndex);
};
doSearch();
return expect(result.color).toBeDefined();
});
``` | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex)
doSearch()
expect(result.color).toBeDefined() | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 07117e1fe1c5215bc921085dd516ce72d6af6604 | 518 | https://github.com/abe33/atom-pigments/blob/07117e1fe1c5215bc921085dd516ce72d6af6604/spec/color-scanner-spec.coffee | 126 | 131 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:4:completion | completion | it 'finds the second color', ->
doSearch = -> result = scanner.search(text, 'styl', result.lastIndex) | doSearch()
expect(result.color).toBeDefined() | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 07117e1fe1c5215bc921085dd516ce72d6af6604 | 518 | https://github.com/abe33/atom-pigments/blob/07117e1fe1c5215bc921085dd516ce72d6af6604/spec/color-scanner-spec.coffee | 126 | 131 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:raw_corpus | raw_corpus | withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
exp... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 72941ec84bea42ed8d88e55b64c710bd248d3218 | 518 | https://github.com/abe33/atom-pigments/blob/72941ec84bea42ed8d88e55b64c710bd248d3218/spec/color-scanner-spec.coffee | 84 | 110 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color... | withScannerForTextEditor('class-after-color.sass', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'sass');
});
it('returns the first buffer color match', function() {
return expect(result).toBeDefined();
});
return describe('the resulting buffer color', funct... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 72941ec84bea42ed8d88e55b64c710bd248d3218 | 518 | https://github.com/abe33/atom-pigments/blob/72941ec84bea42ed8d88e55b64c710bd248d3218/spec/color-scanner-spec.coffee | 84 | 110 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
withScannerForTextEditor('class-after-color.sass', function() {
beforeEach(function() {
var result;
return result = scanner.search(text, 'sass');
});
it('returns the first buffer color match', function() {
return expect(result).toBeDefined();
})... | withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
exp... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 72941ec84bea42ed8d88e55b64c710bd248d3218 | 518 | https://github.com/abe33/atom-pigments/blob/72941ec84bea42ed8d88e55b64c710bd248d3218/spec/color-scanner-spec.coffee | 84 | 110 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:3:completion | completion | withScannerForTextEditor 'class-after-color.sass', ->
beforeEach ->
result = scanner.search(text, 'sass')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
exp... | withScannerForTextEditor 'project/styles/variables.styl', ->
beforeEach ->
result = scanner.search(text, 'styl')
it 'returns the first buffer color match', ->
expect(result).toBeDefined()
describe 'the resulting buffer color', ->
it 'has a text range', ->
... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 72941ec84bea42ed8d88e55b64c710bd248d3218 | 518 | https://github.com/abe33/atom-pigments/blob/72941ec84bea42ed8d88e55b64c710bd248d3218/spec/color-scanner-spec.coffee | 84 | 110 |
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:raw_corpus | raw_corpus | ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withTextEditor = (fixture, block) ->
describe "with #{fixture} buffer", ->
beforeEach ->
... | CoffeeScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 734b870e50dfdc3f946a1264889bca8bd2fdc528 | 518 | https://github.com/abe33/atom-pigments/blob/734b870e50dfdc3f946a1264889bca8bd2fdc528/spec/color-scanner-spec.coffee | 1 | 40 | ||
abe33/atom-pigments:spec/color-scanner-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
ColorScanner = require '../lib/color-scanner'
ColorContext = require '../lib/color-context'
registry = require '../lib/color-expressions'
describe 'ColorScanner', ->
[scanner, editor, text, result, lastIndex] = []
withTextEditor = (fixture, block) ->
de... | var ColorContext, ColorScanner, registry;
ColorScanner = require('../lib/color-scanner');
ColorContext = require('../lib/color-context');
registry = require('../lib/color-expressions');
describe('ColorScanner', function() {
var editor, lastIndex, result, scanner, text, withScannerForTextEditor, withTextEditor;
... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/color-scanner-spec.coffee | MIT | 734b870e50dfdc3f946a1264889bca8bd2fdc528 | 518 | https://github.com/abe33/atom-pigments/blob/734b870e50dfdc3f946a1264889bca8bd2fdc528/spec/color-scanner-spec.coffee | 1 | 40 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.