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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jianliaoim/talk-os:talk-api2x/server/controllers/cms/notice.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
limbo = require 'limbo'
validator = require 'validator'
_ = require 'lodash'
app = require '../../server'
{NoticeModel} = limbo.use 'talk'
module.exports = noticeController = app.controller 'cms/notice', ->
@ensure 'content', only: 'create'
editableField... | var NoticeModel, _, app, limbo, noticeController, validator;
limbo = require('limbo');
validator = require('validator');
_ = require('lodash');
app = require('../../server');
({NoticeModel} = limbo.use('talk'));
module.exports = noticeController = app.controller('cms/notice', function() {
var editableFields;
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/cms/notice.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/server/controllers/cms/notice.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NoticeModel, _, app, limbo, noticeController, validator;
limbo = require('limbo');
validator = require('validator');
_ = require('lodash');
app = require('../../server');
({NoticeModel} = limbo.use('talk'));
module.exports = noticeController = app.control... | limbo = require 'limbo'
validator = require 'validator'
_ = require 'lodash'
app = require '../../server'
{NoticeModel} = limbo.use 'talk'
module.exports = noticeController = app.controller 'cms/notice', ->
@ensure 'content', only: 'create'
editableFields = [
'content'
'postAt'
]
@action 'readOne'... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/cms/notice.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/server/controllers/cms/notice.coffee:1:completion | completion | limbo = require 'limbo'
validator = require 'validator'
_ = require 'lodash'
app = require '../../server'
{NoticeModel} = limbo.use 'talk'
module.exports = noticeController = app.controller 'cms/notice', ->
@ensure 'content', only: 'create'
editableFields = [
'content'
'postAt'
]
@action 'readOne'... | if postAt is ''
NoticeModel
.find postAt: null
.sort _id: -1
.exec callback
else
query = NoticeModel.find(postAt: $ne: null)
.sort postAt: -1
query = query.limit(limit) if limit
query = query.skip(limit * (page - 1)) if page
query.exec callback
@action 'creat... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/cms/notice.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/server/controllers/cms/notice.coffee:2:raw_corpus | raw_corpus | @action 'remove', (req, res, callback) ->
{_id} = req.get()
NoticeModel.remove _id: _id, callback | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/cms/notice.coffee | 51 | 54 | ||
jianliaoim/talk-os:talk-api2x/server/controllers/cms/notice.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@action 'remove', (req, res, callback) ->
{_id} = req.get()
NoticeModel.remove _id: _id, callback
``` | this.action('remove', function(req, res, callback) {
var _id;
({_id} = req.get());
return NoticeModel.remove({
_id: _id
}, callback);
}); | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/cms/notice.coffee | 51 | 54 |
jianliaoim/talk-os:talk-api2x/server/controllers/cms/notice.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.action('remove', function(req, res, callback) {
var _id;
({_id} = req.get());
return NoticeModel.remove({
_id: _id
}, callback);
});
``` | @action 'remove', (req, res, callback) ->
{_id} = req.get()
NoticeModel.remove _id: _id, callback | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/controllers/cms/notice.coffee | 51 | 54 |
jianliaoim/talk-os:talk-web/entry/template.coffee:1:raw_corpus | raw_corpus | fs = require 'fs'
stir = require 'stir-template'
React = require 'react'
ReactDOMServer = require 'react-dom/server'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
ContainerWireframe = React.createFactory require '../client/app/container-wireframe'
schema = require '../client/schema'
baidu = f... | CoffeeScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/entry/template.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
fs = require 'fs'
stir = require 'stir-template'
React = require 'react'
ReactDOMServer = require 'react-dom/server'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
ContainerWireframe = React.createFactory require '../client/app/container-w... | var ContainerWireframe, Immutable, React, ReactDOMServer, baidu, body, cssLoading, div, fs, googleAnalytics, head, html, link, meta, mixpanel, recorder, schema, script, stir, style, title, triggerLoading;
fs = require('fs');
stir = require('stir-template');
React = require('react');
ReactDOMServer = require('react-... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/entry/template.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ContainerWireframe, Immutable, React, ReactDOMServer, baidu, body, cssLoading, div, fs, googleAnalytics, head, html, link, meta, mixpanel, recorder, schema, script, stir, style, title, triggerLoading;
fs = require('fs');
stir = require('stir-template');
Reac... | fs = require 'fs'
stir = require 'stir-template'
React = require 'react'
ReactDOMServer = require 'react-dom/server'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
ContainerWireframe = React.createFactory require '../client/app/container-wireframe'
schema = require '../client/schema'
baidu = f... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/entry/template.coffee:1:completion | completion | fs = require 'fs'
stir = require 'stir-template'
React = require 'react'
ReactDOMServer = require 'react-dom/server'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
ContainerWireframe = React.createFactory require '../client/app/container-wireframe'
schema = require '../client/schema'
baidu = f... | initial: initialStore
updater: (x) -> x # updater is not called in rendering template
inProduction: false
store = recorder.getStore()
stir.render stir.doctype(),
html null,
head null,
title null, '简聊'
meta charset: 'utf-8'
meta 'http-equiv': 'X-UA-Compatible', content: 'I... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/entry/template.coffee:2:raw_corpus | raw_corpus | if assets.style?
link rel: 'stylesheet', type: 'text/css', href: assets.style
style null, cssLoading
body null,
div class: 'app',
ReactDOMServer.renderToStaticMarkup ContainerWireframe(sentence: '')
script null, "window._initialStore = (#{JSON.stringify(store)});"
... | CoffeeScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 51 | 63 | ||
jianliaoim/talk-os:talk-web/entry/template.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if assets.style?
link rel: 'stylesheet', type: 'text/css', href: assets.style
style null, cssLoading
body null,
div class: 'app',
ReactDOMServer.renderToStaticMarkup ContainerWireframe(sentence: '')
script null, "... | if (assets.style != null) {
link({
rel: 'stylesheet',
type: 'text/css',
href: assets.style
});
}
style(null, cssLoading);
body(null, div({
class: 'app'
}, ReactDOMServer.renderToStaticMarkup(ContainerWireframe({
sentence: ''
}))), script(null, `window._initialStore = (${JSON.stringify(store)});`),... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 51 | 63 |
jianliaoim/talk-os:talk-web/entry/template.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (assets.style != null) {
link({
rel: 'stylesheet',
type: 'text/css',
href: assets.style
});
}
style(null, cssLoading);
body(null, div({
class: 'app'
}, ReactDOMServer.renderToStaticMarkup(ContainerWireframe({
sentence: ''
}))), script(null,... | if assets.style?
link rel: 'stylesheet', type: 'text/css', href: assets.style
style null, cssLoading
body null,
div class: 'app',
ReactDOMServer.renderToStaticMarkup ContainerWireframe(sentence: '')
script null, "window._initialStore = (#{JSON.stringify(store)});"
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 51 | 63 |
jianliaoim/talk-os:talk-web/entry/template.coffee:2:completion | completion | if assets.style?
link rel: 'stylesheet', type: 'text/css', href: assets.style
style null, cssLoading
body null,
div class: 'app',
ReactDOMServer.renderToStaticMarkup ContainerWireframe(sentence: '') | script null, "window._initialStore = (#{JSON.stringify(store)});"
script null, triggerLoading
googleAnalytics if config.useAnalytics
mixpanel if config.useAnalytics
baidu if config.useAnalytics
script crossorigin:"anonymous", src: assets.vendor
script crossorigin:"anonymo... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/entry/template.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/entry/template.coffee | 51 | 63 |
meltingice/psd.js:test/png_exporting.coffee:1:raw_corpus | raw_corpus | PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
describe "exporting from a PSD", ->
beforeEach (done) ->
... | CoffeeScript | meltingice/psd.js | test/png_exporting.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/test/png_exporting.coffee | 1 | 29 | ||
meltingice/psd.js:test/png_exporting.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
desc... | var PSD, fixturesPath, fs, outputPath, path, rimraf, should;
PSD = require('../');
fs = require('fs');
rimraf = require('rimraf');
path = require('path');
should = require('should');
outputPath = path.resolve(__dirname, "output");
fixturesPath = path.resolve(__dirname, "fixtures");
describe("exporting from a PS... | CoffeeScript | JavaScript | meltingice/psd.js | test/png_exporting.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/test/png_exporting.coffee | 1 | 29 |
meltingice/psd.js:test/png_exporting.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PSD, fixturesPath, fs, outputPath, path, rimraf, should;
PSD = require('../');
fs = require('fs');
rimraf = require('rimraf');
path = require('path');
should = require('should');
outputPath = path.resolve(__dirname, "output");
fixturesPath = path.resolve... | PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
describe "exporting from a PSD", ->
beforeEach (done) ->
... | JavaScript | CoffeeScript | meltingice/psd.js | test/png_exporting.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/test/png_exporting.coffee | 1 | 29 |
meltingice/psd.js:test/png_exporting.coffee:1:completion | completion | PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
describe "exporting from a PSD", ->
beforeEach (done) ->
... | it "should export a png", (done) ->
psdPath = path.resolve(__dirname, "../", "examples/images/example.psd")
filePath = path.join(outputPath, "out.png")
expectedPath = path.join(fixturesPath, "out.png")
PSD.open(psdPath)
.then (psd) ->
psd.image.saveAsPng filePath
.then ->
... | CoffeeScript | CoffeeScript | meltingice/psd.js | test/png_exporting.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/test/png_exporting.coffee | 1 | 29 |
meltingice/psd.js:test/png_exporting.coffee:1:raw_corpus | raw_corpus | PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
describe "exporting from a PSD", ->
beforeEach (done) ->
... | CoffeeScript | meltingice/psd.js | test/png_exporting.coffee | MIT | c9588ad55bd22d672ec846c6573d452ded7ddd3a | 2,846 | https://github.com/meltingice/psd.js/blob/c9588ad55bd22d672ec846c6573d452ded7ddd3a/test/png_exporting.coffee | 1 | 29 | ||
meltingice/psd.js:test/png_exporting.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
desc... | var PSD, fixturesPath, fs, outputPath, path, rimraf, should;
PSD = require('../');
fs = require('fs');
rimraf = require('rimraf');
path = require('path');
should = require('should');
outputPath = path.resolve(__dirname, "output");
fixturesPath = path.resolve(__dirname, "fixtures");
describe("exporting from a PS... | CoffeeScript | JavaScript | meltingice/psd.js | test/png_exporting.coffee | MIT | c9588ad55bd22d672ec846c6573d452ded7ddd3a | 2,846 | https://github.com/meltingice/psd.js/blob/c9588ad55bd22d672ec846c6573d452ded7ddd3a/test/png_exporting.coffee | 1 | 29 |
meltingice/psd.js:test/png_exporting.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PSD, fixturesPath, fs, outputPath, path, rimraf, should;
PSD = require('../');
fs = require('fs');
rimraf = require('rimraf');
path = require('path');
should = require('should');
outputPath = path.resolve(__dirname, "output");
fixturesPath = path.resolve... | PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
describe "exporting from a PSD", ->
beforeEach (done) ->
... | JavaScript | CoffeeScript | meltingice/psd.js | test/png_exporting.coffee | MIT | c9588ad55bd22d672ec846c6573d452ded7ddd3a | 2,846 | https://github.com/meltingice/psd.js/blob/c9588ad55bd22d672ec846c6573d452ded7ddd3a/test/png_exporting.coffee | 1 | 29 |
meltingice/psd.js:test/png_exporting.coffee:1:completion | completion | PSD = require '../'
fs = require 'fs'
rimraf = require 'rimraf'
path = require 'path'
should = require 'should'
outputPath = path.resolve(__dirname, "output")
fixturesPath = path.resolve(__dirname, "fixtures")
describe "exporting from a PSD", ->
beforeEach (done) ->
... | it "should export a png", (done) ->
psdPath = path.resolve(__dirname, "../", "examples/images/example.psd")
filePath = path.join(outputPath, "out.png")
expectedPath = path.join(fixturesPath, "out.png")
PSD.open(psdPath)
.then (psd) ->
psd.image.saveAsPng filePath
.then ->
... | CoffeeScript | CoffeeScript | meltingice/psd.js | test/png_exporting.coffee | MIT | c9588ad55bd22d672ec846c6573d452ded7ddd3a | 2,846 | https://github.com/meltingice/psd.js/blob/c9588ad55bd22d672ec846c6573d452ded7ddd3a/test/png_exporting.coffee | 1 | 29 |
abe33/atom-pigments:lib/color-marker.coffee:2:raw_corpus | raw_corpus | class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
{CompositeDisposable} = require 'atom' unless CompositeDisposable?
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @ma... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 4 | 53 | ||
abe33/atom-pigments:lib/color-marker.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
{CompositeDisposable} = require 'atom' unless CompositeDisposable?
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDe... | var ColorMarker;
ColorMarker = class ColorMarker {
constructor({marker, color, text, invalid, colorBuffer}) {
var CompositeDisposable;
this.marker = marker;
this.color = color;
this.text = text;
this.invalid = invalid;
this.colorBuffer = colorBuffer;
if (typeof CompositeDisposable === "un... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 4 | 53 |
abe33/atom-pigments:lib/color-marker.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ColorMarker;
ColorMarker = class ColorMarker {
constructor({marker, color, text, invalid, colorBuffer}) {
var CompositeDisposable;
this.marker = marker;
this.color = color;
this.text = text;
this.invalid = invalid;
this.colorBuffer = ... | class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
{CompositeDisposable} = require 'atom' unless CompositeDisposable?
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @ma... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 4 | 53 |
abe33/atom-pigments:lib/color-marker.coffee:2:completion | completion | class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
{CompositeDisposable} = require 'atom' unless CompositeDisposable?
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @ma... | match: (properties) ->
return false if @destroyed
bool = true
if properties.bufferRange?
bool &&= @marker.getBufferRange().isEqual(properties.bufferRange)
bool &&= properties.color.isEqual(@color) if properties.color?
bool &&= properties.match is @text if properties.match?
bool &&= prope... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 4 | 53 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | checkMarkerScope: (forceEvaluation=false) ->
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.di... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 54 | 103 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
checkMarkerScope: (forceEvaluation=false) ->
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPositi... | ({
checkMarkerScope: function(forceEvaluation = false) {
var e, range, ref, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
return;
}
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.color... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 54 | 103 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
checkMarkerScope: function(forceEvaluation = false) {
var e, range, ref, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
return;
}
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.edito... | checkMarkerScope: (forceEvaluation=false) ->
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.di... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 54 | 103 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | checkMarkerScope: (forceEvaluation=false) ->
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.di... | getScreenRange: -> @screenRangeCache ?= @marker?.getScreenRange()
invalidateScreenRangeCache: -> @screenRangeCache = null
convertContentToHex: -> @convertContentInPlace('hex')
convertContentToRGB: -> @convertContentInPlace('rgb')
convertContentToRGBA: -> @convertContentInPlace('rgba')
convertContentToHSL... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 54 | 103 |
abe33/atom-pigments:lib/color-marker.coffee:4:raw_corpus | raw_corpus | @colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), @convertContent(mode))
convertContent: (mode) ->
{fill} = require './utils' unless fill?
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green},... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 104 | 119 | ||
abe33/atom-pigments:lib/color-marker.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), @convertContent(mode))
convertContent: (mode) ->
{fill} = require './utils' unless fill?
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"... | this.colorBuffer.editor.getBuffer().setTextInRange(this.marker.getBufferRange(), this.convertContent(mode))({
convertContent: function(mode) {
var fill;
if (typeof fill === "undefined" || fill === null) {
({fill} = require('./utils'));
}
switch (mode) {
case 'hex':
return '#' + fil... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 104 | 119 |
abe33/atom-pigments:lib/color-marker.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.colorBuffer.editor.getBuffer().setTextInRange(this.marker.getBufferRange(), this.convertContent(mode))({
convertContent: function(mode) {
var fill;
if (typeof fill === "undefined" || fill === null) {
({fill} = require('./utils'));
}
swi... | @colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), @convertContent(mode))
convertContent: (mode) ->
{fill} = require './utils' unless fill?
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green},... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 104 | 119 |
abe33/atom-pigments:lib/color-marker.coffee:4:completion | completion | @colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), @convertContent(mode))
convertContent: (mode) ->
{fill} = require './utils' unless fill?
switch mode
when 'hex'
'#' + fill(@color.hex, 6) | when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
when 'rgba'
"rgba(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue}, #{@color.alpha})"
when 'hsl'
"hsl(#{Math.round @color.hue}, #{Math.round @color.saturat... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/color-marker.coffee | 104 | 119 |
abe33/atom-pigments:lib/color-marker.coffee:2:raw_corpus | raw_corpus | class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @marker.onDidChange =>
if @marker.isValid()
@invalidateScreen... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 5 | 54 | ||
abe33/atom-pigments:lib/color-marker.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @marker.onDidChang... | var ColorMarker;
ColorMarker = class ColorMarker {
constructor({marker, color, text, invalid, colorBuffer}) {
this.marker = marker;
this.color = color;
this.text = text;
this.invalid = invalid;
this.colorBuffer = colorBuffer;
this.id = this.marker.id;
this.subscriptions = new CompositeDis... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 5 | 54 |
abe33/atom-pigments:lib/color-marker.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ColorMarker;
ColorMarker = class ColorMarker {
constructor({marker, color, text, invalid, colorBuffer}) {
this.marker = marker;
this.color = color;
this.text = text;
this.invalid = invalid;
this.colorBuffer = colorBuffer;
this.id = th... | class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @marker.onDidChange =>
if @marker.isValid()
@invalidateScreen... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 5 | 54 |
abe33/atom-pigments:lib/color-marker.coffee:2:completion | completion | class ColorMarker
constructor: ({@marker, @color, @text, @invalid, @colorBuffer}) ->
@id = @marker.id
@subscriptions = new CompositeDisposable
@subscriptions.add @marker.onDidDestroy => @markerWasDestroyed()
@subscriptions.add @marker.onDidChange =>
if @marker.isValid()
@invalidateScreen... | return false if @destroyed
bool = true
if properties.bufferRange?
bool &&= @marker.getBufferRange().isEqual(properties.bufferRange)
bool &&= properties.color.isEqual(@color) if properties.color?
bool &&= properties.match is @text if properties.match?
bool &&= properties.text is @text if prop... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 5 | 54 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 55 | 104 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.e... | var e, range, ref, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start) : this.colorBuffer.editor.displa... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, ref, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.colorBuffer.editor.scopeDescriptorForBuffe... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | invalidateScreenRangeCache: -> @screenRangeCache = null
convertContentToHex: -> @convertContentInPlace('hex')
convertContentToRGB: -> @convertContentInPlace('rgb')
convertContentToRGBA: -> @convertContentInPlace('rgba')
convertContentToHSL: -> @convertContentInPlace('hsl')
convertContentToHSLA: -> @conve... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:4:raw_corpus | raw_corpus | convertContent: (mode) ->
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
when 'rgba'
"rgba(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue}, #{... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 105 | 116 | ||
abe33/atom-pigments:lib/color-marker.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
convertContent: (mode) ->
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
when 'rgba'
"rgba(#{Math.round @color.red}, ... | ({
convertContent: function(mode) {
switch (mode) {
case 'hex':
return '#' + fill(this.color.hex, 6);
case 'rgb':
return `rgb(${Math.round(this.color.red)}, ${Math.round(this.color.green)}, ${Math.round(this.color.blue)})`;
case 'rgba':
return `rgba(${Math.round(this.colo... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 105 | 116 |
abe33/atom-pigments:lib/color-marker.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
convertContent: function(mode) {
switch (mode) {
case 'hex':
return '#' + fill(this.color.hex, 6);
case 'rgb':
return `rgb(${Math.round(this.color.red)}, ${Math.round(this.color.green)}, ${Math.round(this.color.blue)})`;
c... | convertContent: (mode) ->
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
when 'rgba'
"rgba(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue}, #{... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 105 | 116 |
abe33/atom-pigments:lib/color-marker.coffee:4:completion | completion | convertContent: (mode) ->
switch mode
when 'hex'
'#' + fill(@color.hex, 6)
when 'rgb'
"rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})" | when 'rgba'
"rgba(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue}, #{@color.alpha})"
when 'hsl'
"hsl(#{Math.round @color.hue}, #{Math.round @color.saturation}%, #{Math.round @color.lightness}%)"
when 'hsla'
"hsla(#{Math.round @color.hue}, #{Math.round ... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 1830f8979134e51c09be211f7871effa9a37cd80 | 518 | https://github.com/abe33/atom-pigments/blob/1830f8979134e51c09be211f7871effa9a37cd80/lib/color-marker.coffee | 105 | 116 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 5814203df313520a4b96db8ed04f1376f1168ee6 | 518 | https://github.com/abe33/atom-pigments/blob/5814203df313520a4b96db8ed04f1376f1168ee6/lib/color-marker.coffee | 55 | 104 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.e... | var e, range, ref, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start) : this.colorBuffer.editor.displa... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 5814203df313520a4b96db8ed04f1376f1168ee6 | 518 | https://github.com/abe33/atom-pigments/blob/5814203df313520a4b96db8ed04f1376f1168ee6/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, ref, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.colorBuffer.editor.scopeDescriptorForBuffe... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 5814203df313520a4b96db8ed04f1376f1168ee6 | 518 | https://github.com/abe33/atom-pigments/blob/5814203df313520a4b96db8ed04f1376f1168ee6/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | invalidateScreenRangeCache: -> @screenRangeCache = null
convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.b... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 5814203df313520a4b96db8ed04f1376f1168ee6 | 518 | https://github.com/abe33/atom-pigments/blob/5814203df313520a4b96db8ed04f1376f1168ee6/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | e88d4feb306b640d9d94288c8b7e68bdfe3429bb | 518 | https://github.com/abe33/atom-pigments/blob/e88d4feb306b640d9d94288c8b7e68bdfe3429bb/lib/color-marker.coffee | 55 | 104 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.e... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start) : this.colorBuffer.editor.displayBuff... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | e88d4feb306b640d9d94288c8b7e68bdfe3429bb | 518 | https://github.com/abe33/atom-pigments/blob/e88d4feb306b640d9d94288c8b7e68bdfe3429bb/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition != null ? this.colorBuffer.editor.scopeDescriptorForBufferPosi... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | e88d4feb306b640d9d94288c8b7e68bdfe3429bb | 518 | https://github.com/abe33/atom-pigments/blob/e88d4feb306b640d9d94288c8b7e68bdfe3429bb/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = if @colorBuffer.editor.scopeDescriptorForBufferPosition?
@colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
else
@colorBuffer.editor.displayBuffer.scopeDescriptorForBufferPosition(rang... | invalidateScreenRangeCache: -> @screenRangeCache = null
convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.b... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | e88d4feb306b640d9d94288c8b7e68bdfe3429bb | 518 | https://github.com/abe33/atom-pigments/blob/e88d4feb306b640d9d94288c8b7e68bdfe3429bb/lib/color-marker.coffee | 55 | 104 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @colorBu... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | b4f51775b10723cddcad78b51cf82be487c4f532 | 518 | https://github.com/abe33/atom-pigments/blob/b4f51775b10723cddcad78b51cf82be487c4f532/lib/color-marker.coffee | 55 | 102 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and ... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (!scopeChain || (!forceEvaluation && scopeChain === this... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | b4f51775b10723cddcad78b51cf82be487c4f532 | 518 | https://github.com/abe33/atom-pigments/blob/b4f51775b10723cddcad78b51cf82be487c4f532/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @colorBu... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | b4f51775b10723cddcad78b51cf82be487c4f532 | 518 | https://github.com/abe33/atom-pigments/blob/b4f51775b10723cddcad78b51cf82be487c4f532/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @colorBu... | convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@colorBuffer.editor.getBuffer().setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
@colorBuffer.editor.getBuffer().setTextInRange(... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | b4f51775b10723cddcad78b51cf82be487c4f532 | 518 | https://github.com/abe33/atom-pigments/blob/b4f51775b10723cddcad78b51cf82be487c4f532/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @colorBu... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3e17f2f2ab750059815db80e3112fa785335a515 | 518 | https://github.com/abe33/atom-pigments/blob/3e17f2f2ab750059815db80e3112fa785335a515/lib/color-marker.coffee | 55 | 102 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and ... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (!scopeChain || (!forceEvaluation && scopeChain === this... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3e17f2f2ab750059815db80e3112fa785335a515 | 518 | https://github.com/abe33/atom-pigments/blob/3e17f2f2ab750059815db80e3112fa785335a515/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.colorBuffer.editor.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @colorBu... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3e17f2f2ab750059815db80e3112fa785335a515 | 518 | https://github.com/abe33/atom-pigments/blob/3e17f2f2ab750059815db80e3112fa785335a515/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @colorBuffer.editor.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @colorBu... | convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@marker.displayBuffer.buffer.setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
@marker.displayBuffer.buffer.setTextInRange(@marke... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3e17f2f2ab750059815db80e3112fa785335a515 | 518 | https://github.com/abe33/atom-pigments/blob/3e17f2f2ab750059815db80e3112fa785335a515/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 128fffc29a88683d46fd4f817acd1b4b8b890a86 | 518 | https://github.com/abe33/atom-pigments/blob/128fffc29a88683d46fd4f817acd1b4b8b890a86/lib/color-marker.coffee | 55 | 102 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation an... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (!scopeChain || (!forceEvaluation && scopeChain === th... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 128fffc29a88683d46fd4f817acd1b4b8b890a86 | 518 | https://github.com/abe33/atom-pigments/blob/128fffc29a88683d46fd4f817acd1b4b8b890a86/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 128fffc29a88683d46fd4f817acd1b4b8b890a86 | 518 | https://github.com/abe33/atom-pigments/blob/128fffc29a88683d46fd4f817acd1b4b8b890a86/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@marker.displayBuffer.buffer.setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
@marker.displayBuffer.buffer.setTextInRange(@marke... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 128fffc29a88683d46fd4f817acd1b4b8b890a86 | 518 | https://github.com/abe33/atom-pigments/blob/128fffc29a88683d46fd4f817acd1b4b8b890a86/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3c512131d5aae91c038824263c5d943942951f5b | 518 | https://github.com/abe33/atom-pigments/blob/3c512131d5aae91c038824263c5d943942951f5b/lib/color-marker.coffee | 55 | 102 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation an... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (!scopeChain || (!forceEvaluation && scopeChain === th... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3c512131d5aae91c038824263c5d943942951f5b | 518 | https://github.com/abe33/atom-pigments/blob/3c512131d5aae91c038824263c5d943942951f5b/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3c512131d5aae91c038824263c5d943942951f5b | 518 | https://github.com/abe33/atom-pigments/blob/3c512131d5aae91c038824263c5d943942951f5b/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@marker.displayBuffer.buffer.setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.round @color.red}, #{Math.round @color.green}, #{Math.round @color.blue})"
@marker.displayBuffer.buffer.setTextInRange(@marke... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 3c512131d5aae91c038824263c5d943942951f5b | 518 | https://github.com/abe33/atom-pigments/blob/3c512131d5aae91c038824263c5d943942951f5b/lib/color-marker.coffee | 55 | 102 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 771d100493e607161ca10366891d6695eba1fe7c | 518 | https://github.com/abe33/atom-pigments/blob/771d100493e607161ca10366891d6695eba1fe7c/lib/color-marker.coffee | 55 | 92 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation an... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (!scopeChain || (!forceEvaluation && scopeChain === th... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 771d100493e607161ca10366891d6695eba1fe7c | 518 | https://github.com/abe33/atom-pigments/blob/771d100493e607161ca10366891d6695eba1fe7c/lib/color-marker.coffee | 55 | 92 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 771d100493e607161ca10366891d6695eba1fe7c | 518 | https://github.com/abe33/atom-pigments/blob/771d100493e607161ca10366891d6695eba1fe7c/lib/color-marker.coffee | 55 | 92 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | getScreenRange: -> @screenRangeCache ?= @marker?.getScreenRange()
invalidateScreenRangeCache: -> @screenRangeCache = null
convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@marker.displayBuffer.buffer.setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.ro... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 771d100493e607161ca10366891d6695eba1fe7c | 518 | https://github.com/abe33/atom-pigments/blob/771d100493e607161ca10366891d6695eba1fe7c/lib/color-marker.coffee | 55 | 92 |
abe33/atom-pigments:lib/color-marker.coffee:3:raw_corpus | raw_corpus | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/color-marker.coffee | 55 | 90 | ||
abe33/atom-pigments:lib/color-marker.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation an... | var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if (!scopeChain || (!forceEvaluation && scopeChain === th... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/color-marker.coffee | 55 | 90 |
abe33/atom-pigments:lib/color-marker.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var e, range, scope, scopeChain;
if (this.destroyed || (this.colorBuffer == null)) {
range = this.marker.getBufferRange();
try {
scope = this.marker.displayBuffer.scopeDescriptorForBufferPosition(range.start);
scopeChain = scope.getScopeChain();
if... | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | JavaScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/color-marker.coffee | 55 | 90 |
abe33/atom-pigments:lib/color-marker.coffee:3:completion | completion | return if @destroyed or !@colorBuffer?
range = @marker.getBufferRange()
try
scope = @marker.displayBuffer.scopeDescriptorForBufferPosition(range.start)
scopeChain = scope.getScopeChain()
return if not scopeChain or (!forceEvaluation and scopeChain is @lastScopeChain)
@ignored = @color... | getScreenRange: -> @screenRangeCache ?= @marker.getScreenRange()
invalidateScreenRangeCache: -> @screenRangeCache = null
convertContentToHex: ->
hex = '#' + fill(@color.hex, 6)
@marker.displayBuffer.buffer.setTextInRange(@marker.getBufferRange(), hex)
convertContentToRGB: ->
rgba = "rgb(#{Math.rou... | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/color-marker.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/color-marker.coffee | 55 | 90 |
node-cache/node-cache:lib/utils.coffee:1:raw_corpus | raw_corpus | # configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1, v2, idx, ar )->
v1.push ( v1[ idx-1 ] or 1 ) * v2
v1
... | CoffeeScript | node-cache/node-cache | lib/utils.coffee | MIT | 5681bbd285d52f886fa34f913228d49eb6274caa | 2,372 | https://github.com/node-cache/node-cache/blob/5681bbd285d52f886fa34f913228d49eb6274caa/lib/utils.coffee | 1 | 50 | ||
node-cache/node-cache:lib/utils.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1... | // configure the time method
// define options and the sequential multiplicators
var _timeConfig;
_timeConfig = {
types: ["ms", "s", "m", "h", "d"],
multiConfig: [1, 1000, 60, 60, 24]
};
// calculate the final multiplacatos
_timeConfig.multi = _.reduce(_timeConfig.multiConfig, function(v1, v2, idx, ar) {
v1.pus... | CoffeeScript | JavaScript | node-cache/node-cache | lib/utils.coffee | MIT | 5681bbd285d52f886fa34f913228d49eb6274caa | 2,372 | https://github.com/node-cache/node-cache/blob/5681bbd285d52f886fa34f913228d49eb6274caa/lib/utils.coffee | 1 | 50 |
node-cache/node-cache:lib/utils.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// configure the time method
// define options and the sequential multiplicators
var _timeConfig;
_timeConfig = {
types: ["ms", "s", "m", "h", "d"],
multiConfig: [1, 1000, 60, 60, 24]
};
// calculate the final multiplacatos
_timeConfig.multi = _.reduce(_timeC... | # configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1, v2, idx, ar )->
v1.push ( v1[ idx-1 ] or 1 ) * v2
v1
... | JavaScript | CoffeeScript | node-cache/node-cache | lib/utils.coffee | MIT | 5681bbd285d52f886fa34f913228d49eb6274caa | 2,372 | https://github.com/node-cache/node-cache/blob/5681bbd285d52f886fa34f913228d49eb6274caa/lib/utils.coffee | 1 | 50 |
node-cache/node-cache:lib/utils.coffee:1:completion | completion | # configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1, v2, idx, ar )->
v1.push ( v1[ idx-1 ] or 1 ) * v2
v1
... | # **Example:**
#
# utils.getMilliSeconds( 100 ) # 100
# utils.getMilliSeconds( "100" ) # 100
# utils.getMilliSeconds( "5s" ) # 5000
# utils.getMilliSeconds( "3m" ) # 180000
# utils.getMilliSeconds( "3d" ) # 259200000
# utils.getMilliSeconds( "aaa" ) # null
#
getMilliSeconds: ( time... | CoffeeScript | CoffeeScript | node-cache/node-cache | lib/utils.coffee | MIT | 5681bbd285d52f886fa34f913228d49eb6274caa | 2,372 | https://github.com/node-cache/node-cache/blob/5681bbd285d52f886fa34f913228d49eb6274caa/lib/utils.coffee | 1 | 50 |
node-cache/node-cache:lib/utils.coffee:1:raw_corpus | raw_corpus | # configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1, v2, idx, ar )->
v1.push ( v1[ idx-1 ] or 1 ) * v2
v1
... | CoffeeScript | node-cache/node-cache | lib/utils.coffee | MIT | 082b540e219ad4c96b6a3b523e07fbcd21e322c1 | 2,372 | https://github.com/node-cache/node-cache/blob/082b540e219ad4c96b6a3b523e07fbcd21e322c1/lib/utils.coffee | 1 | 49 | ||
node-cache/node-cache:lib/utils.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1... | // configure the time method
// define options and the sequential multiplicators
var _timeConfig;
_timeConfig = {
types: ["ms", "s", "m", "h", "d"],
multiConfig: [1, 1000, 60, 60, 24]
};
// calculate the final multiplacatos
_timeConfig.multi = _.reduce(_timeConfig.multiConfig, function(v1, v2, idx, ar) {
v1.pus... | CoffeeScript | JavaScript | node-cache/node-cache | lib/utils.coffee | MIT | 082b540e219ad4c96b6a3b523e07fbcd21e322c1 | 2,372 | https://github.com/node-cache/node-cache/blob/082b540e219ad4c96b6a3b523e07fbcd21e322c1/lib/utils.coffee | 1 | 49 |
node-cache/node-cache:lib/utils.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// configure the time method
// define options and the sequential multiplicators
var _timeConfig;
_timeConfig = {
types: ["ms", "s", "m", "h", "d"],
multiConfig: [1, 1000, 60, 60, 24]
};
// calculate the final multiplacatos
_timeConfig.multi = _.reduce(_timeC... | # configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1, v2, idx, ar )->
v1.push ( v1[ idx-1 ] or 1 ) * v2
v1
... | JavaScript | CoffeeScript | node-cache/node-cache | lib/utils.coffee | MIT | 082b540e219ad4c96b6a3b523e07fbcd21e322c1 | 2,372 | https://github.com/node-cache/node-cache/blob/082b540e219ad4c96b6a3b523e07fbcd21e322c1/lib/utils.coffee | 1 | 49 |
node-cache/node-cache:lib/utils.coffee:1:completion | completion | # configure the time method
# define options and the sequential multiplicators
_timeConfig =
types: [ "ms", "s", "m", "h", "d" ]
multiConfig: [ 1, 1000, 60, 60, 24 ]
# calculate the final multiplacatos
_timeConfig.multi = _.reduce( _timeConfig.multiConfig, ( v1, v2, idx, ar )->
v1.push ( v1[ idx-1 ] or 1 ) * v2
v1
... | #
# **Example:**
#
# utils.getMilliSeconds( 100 ) # 100
# utils.getMilliSeconds( "100" ) # 100
# utils.getMilliSeconds( "5s" ) # 5000
# utils.getMilliSeconds( "3m" ) # 180000
# utils.getMilliSeconds( "3d" ) # 259200000
# utils.getMilliSeconds( "aaa" ) # null
#
getMilliSeconds: ( t... | CoffeeScript | CoffeeScript | node-cache/node-cache | lib/utils.coffee | MIT | 082b540e219ad4c96b6a3b523e07fbcd21e322c1 | 2,372 | https://github.com/node-cache/node-cache/blob/082b540e219ad4c96b6a3b523e07fbcd21e322c1/lib/utils.coffee | 1 | 49 |
gss/engine:spec/conditions.coffee:1:raw_corpus | raw_corpus | remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
xdescribe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container = document.createElement('div')
container.innerH... | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/conditions.coffee | 6 | 55 | ||
gss/engine:spec/conditions.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
xdescribe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container... | var fixtures, remove;
remove = function(el) {
var ref;
return el != null ? (ref = el.parentNode) != null ? ref.removeChild(el) : void 0 : void 0;
};
fixtures = document.getElementById('fixtures');
xdescribe('Conditions', function() {
return describe('conditions that use', function() {
return describe('sing... | CoffeeScript | JavaScript | gss/engine | spec/conditions.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/conditions.coffee | 6 | 55 |
gss/engine:spec/conditions.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var fixtures, remove;
remove = function(el) {
var ref;
return el != null ? (ref = el.parentNode) != null ? ref.removeChild(el) : void 0 : void 0;
};
fixtures = document.getElementById('fixtures');
xdescribe('Conditions', function() {
return describe('condi... | remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
xdescribe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container = document.createElement('div')
container.innerH... | JavaScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/conditions.coffee | 6 | 55 |
gss/engine:spec/conditions.coffee:1:completion | completion | remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
xdescribe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container = document.createElement('div')
container.innerH... | ['==', ['get', 'c'], 3]]
['if', ['>', ['get', ['#', 'div1'], 'x'], 50],
['==', ['get', 'd'], 2]
['==', ['get', 'd'], 3]]
]
expect(solution).to.eql
b: 1,
c: 3,
d: 2,
'$div1[x]': 100
'$div2[x]': 100
solution = en... | CoffeeScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/conditions.coffee | 6 | 55 |
gss/engine:spec/conditions.coffee:2:raw_corpus | raw_corpus | b: 1,
c: 3,
d: 2,
'$div1[x]': 100
'$div2[x]': 100
solution = engine.solve({A: null})
expect(solution).to.eql {A: null, b: null, c: null}
describe 'multiple selectors', ->
describe 'multiple conditions that observe the same condition', ->
it 'should reu... | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/conditions.coffee | 56 | 97 | ||
gss/engine:spec/conditions.coffee:2:completion | completion | b: 1,
c: 3,
d: 2,
'$div1[x]': 100
'$div2[x]': 100
solution = engine.solve({A: null})
expect(solution).to.eql {A: null, b: null, c: null}
describe 'multiple selectors', ->
describe 'multiple conditions that observe the same condition', ->
it 'should reu... | expect(solution).to.eql b: 1, c: 3
solution = engine.solve({A: 50})
expect(solution).to.eql {A: 50, b: null, c: 2}
solution = engine.solve({A: 100})
expect(solution).to.eql {A: 100, b: 1, c: 3}
solution = engine.solve({A: null})
expect(solution).to.eql {A: null, b: null, c: null}
... | CoffeeScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/conditions.coffee | 56 | 97 |
gss/engine:spec/conditions.coffee:1:raw_corpus | raw_corpus | remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
describe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container = document.createElement('div')
container.innerHT... | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 29adfe7789f8f1a7283dd908fdddc849af9dd807 | 2,854 | https://github.com/gss/engine/blob/29adfe7789f8f1a7283dd908fdddc849af9dd807/spec/conditions.coffee | 6 | 55 | ||
gss/engine:spec/conditions.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
describe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container ... | var fixtures, remove;
remove = function(el) {
var ref;
return el != null ? (ref = el.parentNode) != null ? ref.removeChild(el) : void 0 : void 0;
};
fixtures = document.getElementById('fixtures');
describe('Conditions', function() {
return describe('conditions that use', function() {
return describe('singl... | CoffeeScript | JavaScript | gss/engine | spec/conditions.coffee | MIT | 29adfe7789f8f1a7283dd908fdddc849af9dd807 | 2,854 | https://github.com/gss/engine/blob/29adfe7789f8f1a7283dd908fdddc849af9dd807/spec/conditions.coffee | 6 | 55 |
gss/engine:spec/conditions.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var fixtures, remove;
remove = function(el) {
var ref;
return el != null ? (ref = el.parentNode) != null ? ref.removeChild(el) : void 0 : void 0;
};
fixtures = document.getElementById('fixtures');
describe('Conditions', function() {
return describe('condit... | remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
describe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container = document.createElement('div')
container.innerHT... | JavaScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 29adfe7789f8f1a7283dd908fdddc849af9dd807 | 2,854 | https://github.com/gss/engine/blob/29adfe7789f8f1a7283dd908fdddc849af9dd807/spec/conditions.coffee | 6 | 55 |
gss/engine:spec/conditions.coffee:1:completion | completion | remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
describe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize condition once', ->
container = document.createElement('div')
container.innerHT... | ['==', ['get', 'c'], 3]]
['if', ['>', ['get', ['#', 'div1'], 'x'], 50],
['==', ['get', 'd'], 2]
['==', ['get', 'd'], 3]]
]
expect(solution).to.eql
b: 1,
c: 3,
d: 2,
'$div1[x]': 100
'$div2[x]': 100
solution = en... | CoffeeScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 29adfe7789f8f1a7283dd908fdddc849af9dd807 | 2,854 | https://github.com/gss/engine/blob/29adfe7789f8f1a7283dd908fdddc849af9dd807/spec/conditions.coffee | 6 | 55 |
gss/engine:spec/conditions.coffee:1:raw_corpus | raw_corpus | Engine = GSS #require 'gss-engine/lib/Engine.js'
assert = chai.assert
expect = chai.expect
remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
describe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize co... | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 9e3102641c6621717be84eb731c946d345ba76d7 | 2,854 | https://github.com/gss/engine/blob/9e3102641c6621717be84eb731c946d345ba76d7/spec/conditions.coffee | 1 | 50 | ||
gss/engine:spec/conditions.coffee:1:completion | completion | Engine = GSS #require 'gss-engine/lib/Engine.js'
assert = chai.assert
expect = chai.expect
remove = (el) ->
el?.parentNode?.removeChild(el)
fixtures = document.getElementById 'fixtures'
describe 'Conditions', ->
describe 'conditions that use', ->
describe 'single selector', ->
it 'should initialize co... | ['unless', ['>', ['get', ['#', 'div1'], 'x'], 50],
['==', ['get', 'c'], 2]
['==', ['get', 'c'], 3]]
]
expect(solution).to.eql b: 1, c: 3
solution = engine.solve({A: 50})
expect(solution).to.eql {A: 50, b: null, c: 2}
solution = engine.solve({A: 100})
... | CoffeeScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 9e3102641c6621717be84eb731c946d345ba76d7 | 2,854 | https://github.com/gss/engine/blob/9e3102641c6621717be84eb731c946d345ba76d7/spec/conditions.coffee | 1 | 50 |
gss/engine:spec/conditions.coffee:2:raw_corpus | raw_corpus | ]
expect(solution).to.eql b: 1, c: 3
solution = engine.solve({A: 50})
expect(solution).to.eql {A: 50, b: null, c: 2}
solution = engine.solve({A: 100})
expect(solution).to.eql {A: 100, b: 1, c: 3}
solution = engine.solve({A: null})
expect(solution).to.eql {A: null, b: null, c: n... | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 9e3102641c6621717be84eb731c946d345ba76d7 | 2,854 | https://github.com/gss/engine/blob/9e3102641c6621717be84eb731c946d345ba76d7/spec/conditions.coffee | 51 | 72 | ||
gss/engine:spec/conditions.coffee:2:completion | completion | ]
expect(solution).to.eql b: 1, c: 3
solution = engine.solve({A: 50})
expect(solution).to.eql {A: 50, b: null, c: 2}
solution = engine.solve({A: 100})
expect(solution).to.eql {A: 100, b: 1, c: 3}
solution = engine.solve({A: null})
expect(solution).to.eql {A: null, b: null, c: n... | window.engine = engine = new GSS({A: 100})
solution = engine.solve [
['if', ['>', ['get', 'A'], 75],
['==', ['get', 'b'], 1]]
['elseif', ['>', ['get', 'A'], 50],
['==', ['get', 'c'], 2]]
['else',
['==', ['get', 'd'], 3]]
]
expect(solution).to.eql ... | CoffeeScript | CoffeeScript | gss/engine | spec/conditions.coffee | MIT | 9e3102641c6621717be84eb731c946d345ba76d7 | 2,854 | https://github.com/gss/engine/blob/9e3102641c6621717be84eb731c946d345ba76d7/spec/conditions.coffee | 51 | 72 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.