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
orktes/atom-react:spec/autocomplete-spec.coffee:1:completion
completion
describe "Tag autocomplete tests", -> [editor, buffer, languageMode] = [] beforeEach -> waitsForPromise -> atom.packages.activatePackage("react") waitsForPromise -> atom.workspace.open("foofoo", autoIndent: false).then (o) -> editor = o {buffer, languageMode} = editor ...
describe "tag handling", -> it "should autocomplete tag", -> editor.insertText('<p>') expect(editor.getText()).toBe('<p></p>') it "should remove closing tag", -> editor.insertText('<p>') expect(editor.getText()).toBe('<p></p>') editor.backspace() expect(editor.getText()).toB...
CoffeeScript
CoffeeScript
orktes/atom-react
spec/autocomplete-spec.coffee
MIT
937b65b36d0c076d44a12e7fb61ff1a0e8a8e95a
473
https://github.com/orktes/atom-react/blob/937b65b36d0c076d44a12e7fb61ff1a0e8a8e95a/spec/autocomplete-spec.coffee
1
35
jianliaoim/talk-os:talk-web/client/app/message-system.coffee:1:raw_corpus
raw_corpus
React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' emojiUtil = require '../util/emoji' div = React.createFactory 'div' span = React.createFactory 'span' hr = React.createFactory 'hr' T = React.PropTypes module.exports = React.createClass di...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/message-system.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/message-system.coffee
1
47
jianliaoim/talk-os:talk-web/client/app/message-system.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' emojiUtil = require '../util/emoji' div = React.createFactory 'div' span = React.createFactory 'span' hr = React.createFactory 'hr' T =...
var PureRenderMixin, React, T, div, emojiUtil, hr, lang, span; React = require('react'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); emojiUtil = require('../util/emoji'); div = React.createFactory('div'); span = React.createFactory('span'); hr = React.createFac...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/message-system.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/message-system.coffee
1
47
jianliaoim/talk-os:talk-web/client/app/message-system.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PureRenderMixin, React, T, div, emojiUtil, hr, lang, span; React = require('react'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); emojiUtil = require('../util/emoji'); div = React.createFactory('div'); sp...
React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' emojiUtil = require '../util/emoji' div = React.createFactory 'div' span = React.createFactory 'span' hr = React.createFactory 'hr' T = React.PropTypes module.exports = React.createClass di...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/message-system.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/message-system.coffee
1
47
jianliaoim/talk-os:talk-web/client/app/message-system.coffee:1:completion
completion
React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' emojiUtil = require '../util/emoji' div = React.createFactory 'div' span = React.createFactory 'span' hr = React.createFactory 'hr' T = React.PropTypes module.exports = React.createClass di...
text = lang.getText(key) if text then text else raw content = emojiUtil.replace content span dangerouslySetInnerHTML: __html: content renderNames: -> if @props.message.has('creators') @props.message.get('creators') .map (creator) -> creator?.get('name') or lan...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/message-system.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/message-system.coffee
1
47
jianliaoim/talk-os:talk-web/client/app/inte-hooks.coffee:1:raw_corpus
raw_corpus
React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' InteAdding = React.createFactory require './inte-adding' div = React.createFactory 'div' T = React.PropTypes module.exports = React.createClass displayName: 'inte-hooks' mixins: [PureRenderMixin] ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-hooks.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-hooks.coffee
1
33
jianliaoim/talk-os:talk-web/client/app/inte-hooks.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' InteAdding = React.createFactory require './inte-adding' div = React.createFactory 'div' T = React.PropTypes module.exports = React.createClass...
var InteAdding, PureRenderMixin, React, T, div, lang; React = require('react'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); InteAdding = React.createFactory(require('./inte-adding')); div = React.createFactory('div'); T = React.PropTypes; module.exports = React...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/inte-hooks.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-hooks.coffee
1
33
jianliaoim/talk-os:talk-web/client/app/inte-hooks.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var InteAdding, PureRenderMixin, React, T, div, lang; React = require('react'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); InteAdding = React.createFactory(require('./inte-adding')); div = React.createFactor...
React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' InteAdding = React.createFactory require './inte-adding' div = React.createFactory 'div' T = React.PropTypes module.exports = React.createClass displayName: 'inte-hooks' mixins: [PureRenderMixin] ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-hooks.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-hooks.coffee
1
33
jianliaoim/talk-os:talk-web/client/app/inte-hooks.coffee:1:completion
completion
React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' InteAdding = React.createFactory require './inte-adding' div = React.createFactory 'div' T = React.PropTypes module.exports = React.createClass displayName: 'inte-hooks' mixins: [PureRenderMixin] ...
intes: T.object.isRequired # immutable array onWebhookClick: (inteId) -> @props.onPageSwitch inteId renderHooks: -> intes = @props.intes.filter (value, key) -> value.get('isCustomized') intes.map (inte) => onClick = => @onWebhookClick inte.get('name') InteAdding inte: inte, o...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-hooks.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-hooks.coffee
1
33
jianliaoim/talk-os:talk-web/client/app/guide-anchor.coffee:1:raw_corpus
raw_corpus
React = require 'react' recorder = require 'actions-recorder' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' config = require '../config' eventBus = require '../event-bus' prefsActions = require '../actions/prefs' LitePopover = React.createFa...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/guide-anchor.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/guide-anchor.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/guide-anchor.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' recorder = require 'actions-recorder' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' config = require '../config' eventBus = require '../event-bus' prefsActions =...
var GuideCircle, LitePopover, PureRenderMixin, React, T, config, div, eventBus, lang, prefsActions, query, recorder, span; React = require('react'); recorder = require('actions-recorder'); PureRenderMixin = require('react-addons-pure-render-mixin'); query = require('../query'); lang = require('../locales/lang'); ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/guide-anchor.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/guide-anchor.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/guide-anchor.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var GuideCircle, LitePopover, PureRenderMixin, React, T, config, div, eventBus, lang, prefsActions, query, recorder, span; React = require('react'); recorder = require('actions-recorder'); PureRenderMixin = require('react-addons-pure-render-mixin'); query = req...
React = require 'react' recorder = require 'actions-recorder' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' config = require '../config' eventBus = require '../event-bus' prefsActions = require '../actions/prefs' LitePopover = React.createFa...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/guide-anchor.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/guide-anchor.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/guide-anchor.coffee:1:completion
completion
React = require 'react' recorder = require 'actions-recorder' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' config = require '../config' eventBus = require '../event-bus' prefsActions = require '../actions/prefs' LitePopover = React.createFa...
title: T.string.isRequired content: T.string getInitialState: -> prefs = query.prefs(recorder.getState()) showCard: false hasShownTips: prefs?.get('hasShownTips') or false componentDidMount: -> @_rootEl = @refs.root eventBus.addListener 'dirty-action/show-guide', @setShowCard compon...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/guide-anchor.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/guide-anchor.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/guide-anchor.coffee:2:raw_corpus
raw_corpus
@setState hasShownTips: true, showCard: false onCircleClick: -> unless @state.hasShownTips prefsActions.prefsUpdate hasShownTips: true prefsActions.silentUpdate hasShownTips: true @setState showCard: true renderCard: -> LitePopover title: lang.getText(@props.title) showClose: t...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/guide-anchor.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/guide-anchor.coffee
51
76
jianliaoim/talk-os:talk-web/client/app/guide-anchor.coffee:2:completion
completion
@setState hasShownTips: true, showCard: false onCircleClick: -> unless @state.hasShownTips prefsActions.prefsUpdate hasShownTips: true prefsActions.silentUpdate hasShownTips: true @setState showCard: true renderCard: -> LitePopover title: lang.getText(@props.title) showClose: t...
onPopoverClose: @onCardHide show: @state.showCard name: 'guide-anchor' div className: 'guide-content', lang.getText(@props.content) render: -> if config.isGuest return span() div ref: 'root', className: 'guide-anchor', if (not @state.hasShownTips) or @state.showCard Gui...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/guide-anchor.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/guide-anchor.coffee
51
76
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:completion
completion
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# language governing permissions and limitations under the License. ### cyclotronDirectives.directive 'tableColumn', -> { restrict: 'CA' link: (scope, element, attrs) -> border = scope.column.border if border? if border.indexOf('left') >= 0 ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
08680403c1ab72b7789517426293681c2224eada
1,544
https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
08680403c1ab72b7789517426293681c2224eada
1,544
https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
08680403c1ab72b7789517426293681c2224eada
1,544
https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/table/directives.tableColumn.coffee:1:completion
completion
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# language governing permissions and limitations under the License. ### cyclotronDirectives.directive 'tableColumn', -> { restrict: 'CA' link: (scope, element, attrs) -> border = scope.column.border if border? if border.indexOf('left') >= 0 ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/widgets/table/directives.tableColumn.coffee
MIT
08680403c1ab72b7789517426293681c2224eada
1,544
https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/app/widgets/table/directives.tableColumn.coffee
1
27
orktes/atom-react:lib/tag-matcher.coffee:1:raw_corpus
raw_corpus
class TagMacher startRegex: /\S/ endRegex: /\S(\s+)?$/ constructor: (editor) -> @editor = editor lineStartsWithOpeningTag: (bufferLine) -> if match = bufferLine.match(/\S/) scopeDescriptor = @editor.tokenForBufferPosition([bufferRow, match.index]) return scopeDescriptor.scopes.indexOf('tag...
CoffeeScript
orktes/atom-react
lib/tag-matcher.coffee
MIT
f045e1c6682360a2c74f3de522ce93a9ea4fcbfb
473
https://github.com/orktes/atom-react/blob/f045e1c6682360a2c74f3de522ce93a9ea4fcbfb/lib/tag-matcher.coffee
1
30
orktes/atom-react:lib/tag-matcher.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TagMacher startRegex: /\S/ endRegex: /\S(\s+)?$/ constructor: (editor) -> @editor = editor lineStartsWithOpeningTag: (bufferLine) -> if match = bufferLine.match(/\S/) scopeDescriptor = @editor.tokenForBufferPosition([bufferRow, match...
var TagMacher; TagMacher = (function() { class TagMacher { constructor(editor) { this.editor = editor; } lineStartsWithOpeningTag(bufferLine) { var match, scopeDescriptor; if (match = bufferLine.match(/\S/)) { scopeDescriptor = this.editor.tokenForBufferPosition([bufferRow, mat...
CoffeeScript
JavaScript
orktes/atom-react
lib/tag-matcher.coffee
MIT
f045e1c6682360a2c74f3de522ce93a9ea4fcbfb
473
https://github.com/orktes/atom-react/blob/f045e1c6682360a2c74f3de522ce93a9ea4fcbfb/lib/tag-matcher.coffee
1
30
orktes/atom-react:lib/tag-matcher.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TagMacher; TagMacher = (function() { class TagMacher { constructor(editor) { this.editor = editor; } lineStartsWithOpeningTag(bufferLine) { var match, scopeDescriptor; if (match = bufferLine.match(/\S/)) { scopeDescript...
class TagMacher startRegex: /\S/ endRegex: /\S(\s+)?$/ constructor: (editor) -> @editor = editor lineStartsWithOpeningTag: (bufferLine) -> if match = bufferLine.match(/\S/) scopeDescriptor = @editor.tokenForBufferPosition([bufferRow, match.index]) return scopeDescriptor.scopes.indexOf('tag...
JavaScript
CoffeeScript
orktes/atom-react
lib/tag-matcher.coffee
MIT
f045e1c6682360a2c74f3de522ce93a9ea4fcbfb
473
https://github.com/orktes/atom-react/blob/f045e1c6682360a2c74f3de522ce93a9ea4fcbfb/lib/tag-matcher.coffee
1
30
orktes/atom-react:lib/tag-matcher.coffee:1:completion
completion
class TagMacher startRegex: /\S/ endRegex: /\S(\s+)?$/ constructor: (editor) -> @editor = editor lineStartsWithOpeningTag: (bufferLine) -> if match = bufferLine.match(/\S/) scopeDescriptor = @editor.tokenForBufferPosition([bufferRow, match.index]) return scopeDescriptor.scopes.indexOf('tag...
lineStartWithAttribute: (bufferLine) -> if match = bufferLine.match(/\S/) scopeDescriptor = @editor.tokenForBufferPosition([bufferRow, match.index]) return scopeDescriptor.scopes.indexOf('meta.tag.attribute-name.js') > -1 return false lineStartsWithClosingTag: (bufferRow) -> if match = buffe...
CoffeeScript
CoffeeScript
orktes/atom-react
lib/tag-matcher.coffee
MIT
f045e1c6682360a2c74f3de522ce93a9ea4fcbfb
473
https://github.com/orktes/atom-react/blob/f045e1c6682360a2c74f3de522ce93a9ea4fcbfb/lib/tag-matcher.coffee
1
30
oozcitak/xmlbuilder-js:test/basic/xmldeclaration.coffee:1:raw_corpus
raw_corpus
suite 'XML Declaration:', -> test 'From create() without arguments', -> eq( xml('test').end() '<?xml version="1.0"?><test/>' ) test 'From create() with arguments', -> eq( xml('test', { version: '1.1', encoding: 'UTF-8', standalone: true }).end() '<?xml version="1.1" encoding="UT...
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/xmldeclaration.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/xmldeclaration.coffee
1
24
oozcitak/xmlbuilder-js:test/basic/xmldeclaration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'XML Declaration:', -> test 'From create() without arguments', -> eq( xml('test').end() '<?xml version="1.0"?><test/>' ) test 'From create() with arguments', -> eq( xml('test', { version: '1.1', encoding: 'UTF-8', standalo...
suite('XML Declaration:', function() { test('From create() without arguments', function() { return eq(xml('test').end(), '<?xml version="1.0"?><test/>'); }); test('From create() with arguments', function() { return eq(xml('test', { version: '1.1', encoding: 'UTF-8', standalone: true ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/basic/xmldeclaration.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/xmldeclaration.coffee
1
24
oozcitak/xmlbuilder-js:test/basic/xmldeclaration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('XML Declaration:', function() { test('From create() without arguments', function() { return eq(xml('test').end(), '<?xml version="1.0"?><test/>'); }); test('From create() with arguments', function() { return eq(xml('test', { version: '1.1...
suite 'XML Declaration:', -> test 'From create() without arguments', -> eq( xml('test').end() '<?xml version="1.0"?><test/>' ) test 'From create() with arguments', -> eq( xml('test', { version: '1.1', encoding: 'UTF-8', standalone: true }).end() '<?xml version="1.1" encoding="UT...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/xmldeclaration.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/xmldeclaration.coffee
1
24
oozcitak/xmlbuilder-js:test/basic/xmldeclaration.coffee:1:completion
completion
suite 'XML Declaration:', -> test 'From create() without arguments', -> eq( xml('test').end() '<?xml version="1.0"?><test/>' ) test 'From create() with arguments', -> eq( xml('test', { version: '1.1', encoding: 'UTF-8', standalone: true }).end() '<?xml version="1.1" encoding="UT...
test 'From dec() without arguments', -> eq( xml('test', { headless: true }).dec().ele('node').end() '<?xml version="1.0"?><test><node/></test>' ) test 'From dec() with arguments', -> eq( xml('test').dec({ version: '1.1', encoding: 'UTF-8', standalone: true }).ele('node').end() '<?...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/xmldeclaration.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/xmldeclaration.coffee
1
24
gss/engine:src/commands/Source.coffee:1:raw_corpus
raw_corpus
Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(source) ...
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
63c38e948590ed19059b2d43bf6525e22c3cec82
2,854
https://github.com/gss/engine/blob/63c38e948590ed19059b2d43bf6525e22c3cec82/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/g...
var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Selector', 'String', 'Node'] }, [ { '...
CoffeeScript
JavaScript
gss/engine
src/commands/Source.coffee
MIT
63c38e948590ed19059b2d43bf6525e22c3cec82
2,854
https://github.com/gss/engine/blob/63c38e948590ed19059b2d43bf6525e22c3cec82/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Selector', ...
Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(source) ...
JavaScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
63c38e948590ed19059b2d43bf6525e22c3cec82
2,854
https://github.com/gss/engine/blob/63c38e948590ed19059b2d43bf6525e22c3cec82/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:completion
completion
Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(source) ...
"eval": (node, type = 'text/gss', text, engine, operation, continuation, scope) -> if node.nodeType if nodeType = node.getAttribute('type') type = nodeType source = text || node.textContent || node if (nodeContinuation = node._continuation)? engine.queries.clean(@delimit(nodeContin...
CoffeeScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
63c38e948590ed19059b2d43bf6525e22c3cec82
2,854
https://github.com/gss/engine/blob/63c38e948590ed19059b2d43bf6525e22c3cec82/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:2:raw_corpus
raw_corpus
xhr = new XMLHttpRequest() engine.requesting = (engine.requesting || 0) + 1 xhr.onreadystatechange = => if xhr.readyState == 4 && xhr.status == 200 --engine.requesting op = ['eval', node, type, xhr.responseText] engine.Command(op).solve(engine, op, continuation, scope) ...
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
63c38e948590ed19059b2d43bf6525e22c3cec82
2,854
https://github.com/gss/engine/blob/63c38e948590ed19059b2d43bf6525e22c3cec82/src/commands/Source.coffee
51
62
gss/engine:src/commands/Source.coffee:2:completion
completion
xhr = new XMLHttpRequest() engine.requesting = (engine.requesting || 0) + 1 xhr.onreadystatechange = => if xhr.readyState == 4 && xhr.status == 200 --engine.requesting op = ['eval', node, type, xhr.responseText]
engine.Command(op).solve(engine, op, continuation, scope) xhr.open('GET', method && method.toUpperCase() || src) xhr.send() module.exports = Source
CoffeeScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
63c38e948590ed19059b2d43bf6525e22c3cec82
2,854
https://github.com/gss/engine/blob/63c38e948590ed19059b2d43bf6525e22c3cec82/src/commands/Source.coffee
51
62
gss/engine:src/commands/Source.coffee:1:raw_corpus
raw_corpus
Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(source) ...
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
31938f86e04f67ada173275db8f0e673655a12e9
2,854
https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/g...
var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Selector', 'String', 'Node'] }, [ { '...
CoffeeScript
JavaScript
gss/engine
src/commands/Source.coffee
MIT
31938f86e04f67ada173275db8f0e673655a12e9
2,854
https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Selector', ...
Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(source) ...
JavaScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
31938f86e04f67ada173275db8f0e673655a12e9
2,854
https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:completion
completion
Parser = require('ccss-compiler') Command = require('../Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(source) ...
"eval": (node, type = 'text/gss', text, engine, operation, continuation, scope) -> if node.nodeType if nodeType = node.getAttribute('type') type = nodeType source = text || node.textContent || node if (nodeContinuation = node._continuation)? engine.queries.clean(nodeContinuation) ...
CoffeeScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
31938f86e04f67ada173275db8f0e673655a12e9
2,854
https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:raw_corpus
raw_corpus
Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(sou...
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
ca12495ce84271272bb93ed0afd03d6f8254daf5
2,854
https://github.com/gss/engine/blob/ca12495ce84271272bb93ed0afd03d6f8254daf5/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: ...
var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../concepts/Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Selector', 'String', 'Node'] }, [ { ...
CoffeeScript
JavaScript
gss/engine
src/commands/Source.coffee
MIT
ca12495ce84271272bb93ed0afd03d6f8254daf5
2,854
https://github.com/gss/engine/blob/ca12495ce84271272bb93ed0afd03d6f8254daf5/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../concepts/Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Sel...
Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(sou...
JavaScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
ca12495ce84271272bb93ed0afd03d6f8254daf5
2,854
https://github.com/gss/engine/blob/ca12495ce84271272bb93ed0afd03d6f8254daf5/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:completion
completion
Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(sou...
"eval": (node, type = 'text/gss', text, engine, operation, continuation, scope) -> if node.nodeType if nodeType = node.getAttribute('type') type = nodeType source = text || node.textContent || node if (nodeContinuation = node._continuation)? engine.queries.clean(nodeContinuation) ...
CoffeeScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
ca12495ce84271272bb93ed0afd03d6f8254daf5
2,854
https://github.com/gss/engine/blob/ca12495ce84271272bb93ed0afd03d6f8254daf5/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:raw_corpus
raw_corpus
Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(sou...
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
5b9cdc8206e187bfd07869d3f159fc262c27b575
2,854
https://github.com/gss/engine/blob/5b9cdc8206e187bfd07869d3f159fc262c27b575/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: ...
var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../concepts/Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Selector', 'String', 'Node'] }, [ { ...
CoffeeScript
JavaScript
gss/engine
src/commands/Source.coffee
MIT
5b9cdc8206e187bfd07869d3f159fc262c27b575
2,854
https://github.com/gss/engine/blob/5b9cdc8206e187bfd07869d3f159fc262c27b575/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Command, Parser, Source; Parser = require('ccss-compiler'); Command = require('../concepts/Command'); Source = (function() { class Source extends Command {}; Source.prototype.type = 'Source'; Source.prototype.signature = [ { 'source': ['Sel...
Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(sou...
JavaScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
5b9cdc8206e187bfd07869d3f159fc262c27b575
2,854
https://github.com/gss/engine/blob/5b9cdc8206e187bfd07869d3f159fc262c27b575/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:1:completion
completion
Parser = require('ccss-compiler') Command = require('../concepts/Command') class Source extends Command type: 'Source' signature: [ 'source': ['Selector', 'String', 'Node'] [ 'type': ['String'] 'text': ['String'] ] ] types: "text/gss-ast": (source) -> return JSON.parse(sou...
"eval": (node, type = 'text/gss', text, engine, operation, continuation, scope) -> if node.nodeType if nodeType = node.getAttribute('type') type = nodeType source = text || node.textContent || node if (nodeContinuation = node._continuation)? engine.queries.clean(nodeContinuation) ...
CoffeeScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
5b9cdc8206e187bfd07869d3f159fc262c27b575
2,854
https://github.com/gss/engine/blob/5b9cdc8206e187bfd07869d3f159fc262c27b575/src/commands/Source.coffee
1
50
gss/engine:src/commands/Source.coffee:2:raw_corpus
raw_corpus
src = node.href || node.src || node type ||= node.type || 'text/gss' xhr = new XMLHttpRequest() engine.requesting = (engine.requesting || 0) + 1 xhr.onreadystatechange = => if xhr.readyState == 4 && xhr.status == 200 --engine.requesting op = ['eval', node, type, xhr.r...
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
5b9cdc8206e187bfd07869d3f159fc262c27b575
2,854
https://github.com/gss/engine/blob/5b9cdc8206e187bfd07869d3f159fc262c27b575/src/commands/Source.coffee
51
64
gss/engine:src/commands/Source.coffee:2:completion
completion
src = node.href || node.src || node type ||= node.type || 'text/gss' xhr = new XMLHttpRequest() engine.requesting = (engine.requesting || 0) + 1 xhr.onreadystatechange = => if xhr.readyState == 4 && xhr.status == 200 --engine.requesting
op = ['eval', node, type, xhr.responseText] engine.Command(op).solve(engine, op, continuation, scope) xhr.open('GET', method && method.toUpperCase() || src) xhr.send() module.exports = Source
CoffeeScript
CoffeeScript
gss/engine
src/commands/Source.coffee
MIT
5b9cdc8206e187bfd07869d3f159fc262c27b575
2,854
https://github.com/gss/engine/blob/5b9cdc8206e187bfd07869d3f159fc262c27b575/src/commands/Source.coffee
51
64
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:raw_corpus
raw_corpus
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNamedNodeMap.coffee
1
42
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. construct...
// Represents a map of nodes accessed by a string key var XMLNamedNodeMap; module.exports = XMLNamedNodeMap = (function() { class XMLNamedNodeMap { // Initializes a new instance of `XMLNamedNodeMap` // This is just a wrapper around an ordinary // JS object. // `nodes` the object containing nodes. ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNamedNodeMap.coffee
1
42
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Represents a map of nodes accessed by a string key var XMLNamedNodeMap; module.exports = XMLNamedNodeMap = (function() { class XMLNamedNodeMap { // Initializes a new instance of `XMLNamedNodeMap` // This is just a wrapper around an ordinary // JS ...
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNamedNodeMap.coffee
1
42
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:completion
completion
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty...
# whether the wrapped object is null and supply a new object # (from the clone). @nodes = null # DOM Level 1 getNamedItem: (name) -> @nodes[name] setNamedItem: (node) -> oldNode = @nodes[node.nodeName] @nodes[node.nodeName] = node return oldNode or null removeNamedItem: (name) -> oldNo...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNamedNodeMap.coffee
1
42
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:raw_corpus
raw_corpus
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProper...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLNamedNodeMap.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. construct...
// Represents a map of nodes accessed by a string key var XMLNamedNodeMap; module.exports = XMLNamedNodeMap = class XMLNamedNodeMap { // Initializes a new instance of `XMLNamedNodeMap` // This is just a wrapper around an ordinary // JS object. // `nodes` the object containing nodes. constructor(nodes) { ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLNamedNodeMap.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Represents a map of nodes accessed by a string key var XMLNamedNodeMap; module.exports = XMLNamedNodeMap = class XMLNamedNodeMap { // Initializes a new instance of `XMLNamedNodeMap` // This is just a wrapper around an ordinary // JS object. // `nodes` ...
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProper...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLNamedNodeMap.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:completion
completion
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProper...
# (from the clone). @nodes = null # DOM Level 1 getNamedItem: (name) -> @nodes[name] setNamedItem: (node) -> oldNode = @nodes[node.nodeName] @nodes[node.nodeName] = node return oldNode or null removeNamedItem: (name) -> oldNode = @nodes[name] delete @nodes[name] return oldNode or n...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLNamedNodeMap.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:raw_corpus
raw_corpus
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProper...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNamedNodeMap.coffee
1
35
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. construct...
// Represents a map of nodes accessed by a string key var XMLNamedNodeMap; module.exports = XMLNamedNodeMap = class XMLNamedNodeMap { // Initializes a new instance of `XMLNamedNodeMap` // This is just a wrapper around an ordinary // JS object. // `nodes` the object containing nodes. constructor(nodes) { ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNamedNodeMap.coffee
1
35
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Represents a map of nodes accessed by a string key var XMLNamedNodeMap; module.exports = XMLNamedNodeMap = class XMLNamedNodeMap { // Initializes a new instance of `XMLNamedNodeMap` // This is just a wrapper around an ordinary // JS object. // `nodes` ...
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProper...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNamedNodeMap.coffee
1
35
oozcitak/xmlbuilder-js:src/XMLNamedNodeMap.coffee:1:completion
completion
# Represents a map of nodes accessed by a string key module.exports = class XMLNamedNodeMap # Initializes a new instance of `XMLNamedNodeMap` # This is just a wrapper around an ordinary # JS object. # # `nodes` the object containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProper...
# this class should not be cloned since it wraps # around a given object. The calling function should check # whether the wrapped object is null and supply a new object # (from the clone). @nodes = null # DOM Level 1 getNamedItem: (name) -> @nodes[name] setNamedItem: (node) -> oldNode = @nod...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNamedNodeMap.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNamedNodeMap.coffee
1
35
nevir/groc:lib/logger.coffee:1:raw_corpus
raw_corpus
# # groc.Logger # We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 DEBUG: 1 INFO: 2 PASS: 2 ...
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # # groc.Logger # We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVEL...
// # groc.Logger // We have pretty simple needs for a logger, and so far have been unable to find a reasonable // off-the-shelf solution that fits them without being too overbearing: var Logger; Logger = (function() { class Logger { constructor(minLevel = this.LEVELS.INFO) { var name; this.minLevel ...
CoffeeScript
JavaScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // # groc.Logger // We have pretty simple needs for a logger, and so far have been unable to find a reasonable // off-the-shelf solution that fits them without being too overbearing: var Logger; Logger = (function() { class Logger { constructor(minLevel = t...
# # groc.Logger # We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 DEBUG: 1 INFO: 2 PASS: 2 ...
JavaScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:1:completion
completion
# # groc.Logger # We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 DEBUG: 1 INFO: 2 PASS: 2 ...
# * Colors make the world better. LEVEL_COLORS: TRACE: 'grey' DEBUG: 'grey' INFO: 'black' PASS: 'green' WARN: 'yellow' ERROR: 'red' # * Don't forget the semantics of our output. LEVEL_STREAMS: TRACE: console.log DEBUG: console.log INFO: console.log PASS: console.log ...
CoffeeScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:2:raw_corpus
raw_corpus
emit: (levelName, args...) -> if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{outp...
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
51
68
nevir/groc:lib/logger.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript emit: (levelName, args...) -> if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVE...
var globalLogger, level; ({ emit: function(levelName, ...args) { var output; if (this.LEVELS[levelName] >= this.minLevel) { output = utils.CompatibilityHelpers.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelNam...
CoffeeScript
JavaScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
51
68
nevir/groc:lib/logger.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var globalLogger, level; ({ emit: function(levelName, ...args) { var output; if (this.LEVELS[levelName] >= this.minLevel) { output = utils.CompatibilityHelpers.format(...args); // * We like nicely indented output output = output.split(/...
emit: (levelName, args...) -> if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{outp...
JavaScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
51
68
nevir/groc:lib/logger.coffee:2:completion
completion
emit: (levelName, args...) -> if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{outp...
output # * Sometimes we just want one-off logging globalLogger = new Logger Logger::LEVELS.TRACE for level of globalLogger.LEVELS do (level) -> Logger[level.toLowerCase()] = (args...) -> globalLogger[level.toLowerCase()] args...
CoffeeScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
30cbbae947d749cda607d399eaa012e5c8642ffe
579
https://github.com/nevir/groc/blob/30cbbae947d749cda607d399eaa012e5c8642ffe/lib/logger.coffee
51
68
nevir/groc:lib/logger.coffee:1:raw_corpus
raw_corpus
# We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 DEBUG: 1 INFO: 2 PASS: 2 WARN: 3 ER...
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 ...
// We have pretty simple needs for a logger, and so far have been unable to find a reasonable // off-the-shelf solution that fits them without being too overbearing: var Logger; Logger = (function() { class Logger { constructor(minLevel = this.LEVELS.INFO) { var name; this.minLevel = minLevel; ...
CoffeeScript
JavaScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // We have pretty simple needs for a logger, and so far have been unable to find a reasonable // off-the-shelf solution that fits them without being too overbearing: var Logger; Logger = (function() { class Logger { constructor(minLevel = this.LEVELS.INFO) {...
# We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 DEBUG: 1 INFO: 2 PASS: 2 WARN: 3 ER...
JavaScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:1:completion
completion
# We have pretty simple needs for a logger, and so far have been unable to find a reasonable # off-the-shelf solution that fits them without being too overbearing: class Logger # * We want the standard levels of output, plus a few more. LEVELS: TRACE: 0 DEBUG: 1 INFO: 2 PASS: 2 WARN: 3 ER...
TRACE: 'grey' DEBUG: 'grey' INFO: 'black' PASS: 'green' WARN: 'yellow' ERROR: 'red' # * Don't forget the semantics of our output. LEVEL_STREAMS: TRACE: console.log DEBUG: console.log INFO: console.log PASS: console.log WARN: console.error ERROR: console.error co...
CoffeeScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
1
50
nevir/groc:lib/logger.coffee:2:raw_corpus
raw_corpus
if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}" output # * Sometimes ...
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
51
66
nevir/groc:lib/logger.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PRE...
var globalLogger, level, output; if (this.LEVELS[levelName] >= this.minLevel) { output = utils.CompatibilityHelpers.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelName](colors[this.LEVEL_COLORS[levelName]](`${this.LEVEL_PREFIXES[levelNa...
CoffeeScript
JavaScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
51
66
nevir/groc:lib/logger.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var globalLogger, level, output; if (this.LEVELS[levelName] >= this.minLevel) { output = utils.CompatibilityHelpers.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelName](colors[this....
if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}" output # * Sometimes ...
JavaScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
51
66
nevir/groc:lib/logger.coffee:2:completion
completion
if @LEVELS[levelName] >= @minLevel output = utils.CompatibilityHelpers.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}"
output # * Sometimes we just want one-off logging globalLogger = new Logger Logger::LEVELS.TRACE for level of globalLogger.LEVELS do (level) -> Logger[level.toLowerCase()] = (args...) -> globalLogger[level.toLowerCase()] args...
CoffeeScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f
579
https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/logger.coffee
51
66
nevir/groc:lib/logger.coffee:2:raw_corpus
raw_corpus
if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}" output # * Sometimes we just want one-off lo...
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
540691821a2107c3cbd7e8368be08c154126d9a3
579
https://github.com/nevir/groc/blob/540691821a2107c3cbd7e8368be08c154126d9a3/lib/logger.coffee
51
65
nevir/groc:lib/logger.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{outp...
var globalLogger, level, output; if (this.LEVELS[levelName] >= this.minLevel) { output = util.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelName](colors[this.LEVEL_COLORS[levelName]](`${this.LEVEL_PREFIXES[levelName]}${output}`)); ou...
CoffeeScript
JavaScript
nevir/groc
lib/logger.coffee
MIT
540691821a2107c3cbd7e8368be08c154126d9a3
579
https://github.com/nevir/groc/blob/540691821a2107c3cbd7e8368be08c154126d9a3/lib/logger.coffee
51
65
nevir/groc:lib/logger.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var globalLogger, level, output; if (this.LEVELS[levelName] >= this.minLevel) { output = util.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelName](colors[this.LEVEL_COLORS[levelName...
if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}" output # * Sometimes we just want one-off lo...
JavaScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
540691821a2107c3cbd7e8368be08c154126d9a3
579
https://github.com/nevir/groc/blob/540691821a2107c3cbd7e8368be08c154126d9a3/lib/logger.coffee
51
65
nevir/groc:lib/logger.coffee:2:completion
completion
if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}"
output # * Sometimes we just want one-off logging globalLogger = new Logger Logger::LEVELS.TRACE for level of globalLogger.LEVELS do (level) -> Logger[level.toLowerCase()] = (args...) -> globalLogger[level.toLowerCase()] args...
CoffeeScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
540691821a2107c3cbd7e8368be08c154126d9a3
579
https://github.com/nevir/groc/blob/540691821a2107c3cbd7e8368be08c154126d9a3/lib/logger.coffee
51
65
nevir/groc:lib/logger.coffee:2:raw_corpus
raw_corpus
if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}" output # * Sometimes we just want one-off lo...
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8
579
https://github.com/nevir/groc/blob/bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8/lib/logger.coffee
51
64
nevir/groc:lib/logger.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{outp...
var globalLogger, level, output; if (this.LEVELS[levelName] >= this.minLevel) { output = util.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelName](colors[this.LEVEL_COLORS[levelName]](`${this.LEVEL_PREFIXES[levelName]}${output}`)); ou...
CoffeeScript
JavaScript
nevir/groc
lib/logger.coffee
MIT
bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8
579
https://github.com/nevir/groc/blob/bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8/lib/logger.coffee
51
64
nevir/groc:lib/logger.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var globalLogger, level, output; if (this.LEVELS[levelName] >= this.minLevel) { output = util.format(...args); // * We like nicely indented output output = output.split(/\r?\n/).join('\n '); this.LEVEL_STREAMS[levelName](colors[this.LEVEL_COLORS[levelName...
if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}" output # * Sometimes we just want one-off lo...
JavaScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8
579
https://github.com/nevir/groc/blob/bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8/lib/logger.coffee
51
64
nevir/groc:lib/logger.coffee:2:completion
completion
if @LEVELS[levelName] >= @minLevel output = util.format args... # * We like nicely indented output output = output.split(/\r?\n/).join('\n ') @LEVEL_STREAMS[levelName] colors[@LEVEL_COLORS[levelName]] "#{@LEVEL_PREFIXES[levelName]}#{output}"
output # * Sometimes we just want one-off logging globalLogger = new Logger Logger::LEVELS.TRACE for level of globalLogger.LEVELS Logger[level.toLowerCase()] = (args...) -> globalLogger[level.toLowerCase()] args...
CoffeeScript
CoffeeScript
nevir/groc
lib/logger.coffee
MIT
bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8
579
https://github.com/nevir/groc/blob/bf64e810e5b468936ccf8e3dc7ddd9f9955b7bd8/lib/logger.coffee
51
64
jianliaoim/talk-os:talk-web/client/actions/timeline.coffee:1:raw_corpus
raw_corpus
recorder = require 'actions-recorder' exports.init = (_teamId, createdAt, currentAt, success, fail) -> recorder.dispatch 'timeline/init', _teamId: _teamId createdAt: createdAt currentAt: currentAt success?()
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/timeline.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/timeline.coffee
1
8
jianliaoim/talk-os:talk-web/client/actions/timeline.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript recorder = require 'actions-recorder' exports.init = (_teamId, createdAt, currentAt, success, fail) -> recorder.dispatch 'timeline/init', _teamId: _teamId createdAt: createdAt currentAt: currentAt success?() ```
var recorder; recorder = require('actions-recorder'); exports.init = function(_teamId, createdAt, currentAt, success, fail) { recorder.dispatch('timeline/init', { _teamId: _teamId, createdAt: createdAt, currentAt: currentAt }); return typeof success === "function" ? success() : void 0; };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/timeline.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/timeline.coffee
1
8
jianliaoim/talk-os:talk-web/client/actions/timeline.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var recorder; recorder = require('actions-recorder'); exports.init = function(_teamId, createdAt, currentAt, success, fail) { recorder.dispatch('timeline/init', { _teamId: _teamId, createdAt: createdAt, currentAt: currentAt }); return typeof suc...
recorder = require 'actions-recorder' exports.init = (_teamId, createdAt, currentAt, success, fail) -> recorder.dispatch 'timeline/init', _teamId: _teamId createdAt: createdAt currentAt: currentAt success?()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/timeline.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/timeline.coffee
1
8
jianliaoim/talk-os:talk-web/client/updater/fav-result.coffee:1:raw_corpus
raw_corpus
Immutable = require 'immutable' exports.read = (store, messagesList) -> store .update 'favResults', (messages) -> messages.concat messagesList exports.clear = (store, actionData) -> store .set 'favResults', Immutable.List()
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/fav-result.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/fav-result.coffee
1
10
jianliaoim/talk-os:talk-web/client/updater/fav-result.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Immutable = require 'immutable' exports.read = (store, messagesList) -> store .update 'favResults', (messages) -> messages.concat messagesList exports.clear = (store, actionData) -> store .set 'favResults', Immutable.List() ```
var Immutable; Immutable = require('immutable'); exports.read = function(store, messagesList) { return store.update('favResults', function(messages) { return messages.concat(messagesList); }); }; exports.clear = function(store, actionData) { return store.set('favResults', Immutable.List()); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/fav-result.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/fav-result.coffee
1
10
jianliaoim/talk-os:talk-web/client/updater/fav-result.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable; Immutable = require('immutable'); exports.read = function(store, messagesList) { return store.update('favResults', function(messages) { return messages.concat(messagesList); }); }; exports.clear = function(store, actionData) { return sto...
Immutable = require 'immutable' exports.read = (store, messagesList) -> store .update 'favResults', (messages) -> messages.concat messagesList exports.clear = (store, actionData) -> store .set 'favResults', Immutable.List()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/fav-result.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/fav-result.coffee
1
10
jianliaoim/talk-os:talk-web/client/updater/fav-result.coffee:1:completion
completion
Immutable = require 'immutable' exports.read = (store, messagesList) -> store .update 'favResults', (messages) ->
messages.concat messagesList exports.clear = (store, actionData) -> store .set 'favResults', Immutable.List()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/fav-result.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/fav-result.coffee
1
10
jianliaoim/talk-os:talk-web/client/handlers/topic.coffee:1:raw_corpus
raw_corpus
exports.remove = (roomData) -> store = recorder.getState() router = store.get('router') currentTeamId = router.getIn ['data', '_teamId'] currentRoomId = router.getIn ['data', '_roomId'] _teamId = roomData.get('_teamId') _roomId = roomData.get('_id') if _teamId is currentTeamId and _roomId is currentRoom...
CoffeeScript
jianliaoim/talk-os
talk-web/client/handlers/topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/topic.coffee
11
32
jianliaoim/talk-os:talk-web/client/handlers/topic.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.remove = (roomData) -> store = recorder.getState() router = store.get('router') currentTeamId = router.getIn ['data', '_teamId'] currentRoomId = router.getIn ['data', '_roomId'] _teamId = roomData.get('_teamId') _roomId = roomData.get('_id') ...
exports.remove = function(roomData) { var _roomId, _teamId, currentRoomId, currentTeamId, generalRoom, router, store, warningText; store = recorder.getState(); router = store.get('router'); currentTeamId = router.getIn(['data', '_teamId']); currentRoomId = router.getIn(['data', '_roomId']); _teamId = roomDa...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/handlers/topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/topic.coffee
11
32
jianliaoim/talk-os:talk-web/client/handlers/topic.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.remove = function(roomData) { var _roomId, _teamId, currentRoomId, currentTeamId, generalRoom, router, store, warningText; store = recorder.getState(); router = store.get('router'); currentTeamId = router.getIn(['data', '_teamId']); currentRoomId ...
exports.remove = (roomData) -> store = recorder.getState() router = store.get('router') currentTeamId = router.getIn ['data', '_teamId'] currentRoomId = router.getIn ['data', '_roomId'] _teamId = roomData.get('_teamId') _roomId = roomData.get('_id') if _teamId is currentTeamId and _roomId is currentRoom...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/handlers/topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/topic.coffee
11
32
jianliaoim/talk-os:talk-web/client/handlers/topic.coffee:1:completion
completion
exports.remove = (roomData) -> store = recorder.getState() router = store.get('router') currentTeamId = router.getIn ['data', '_teamId'] currentRoomId = router.getIn ['data', '_roomId'] _teamId = roomData.get('_teamId') _roomId = roomData.get('_id') if _teamId is currentTeamId and _roomId is currentRoom...
routerHanlders.room _teamId, generalRoom.get('_id') warningText = lang.getText('topic-%s-removed') .replace '%s', roomData.get('topic') notifyActions.warn warningText # dispatching should happen in actions creator dispatcher.handleServerAction type: 'topic/remove' data: roomData # http://talk....
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/handlers/topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/topic.coffee
11
32
jianliaoim/talk-os:talk-web/client/handlers/topic.coffee:2:raw_corpus
raw_corpus
exports.leave = (leaveEvent) -> _teamId = leaveEvent.get('_teamId') _roomId = leaveEvent.get('_roomId') _contactId = leaveEvent.get('_userId') store = recorder.getState() _userId = store.getIn ['user', '_id'] routerData = store.getIn ['router', 'data'] roomData = query.topicsByOne(store, _teamId, _roomId...
CoffeeScript
jianliaoim/talk-os
talk-web/client/handlers/topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/topic.coffee
33
59
jianliaoim/talk-os:talk-web/client/handlers/topic.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.leave = (leaveEvent) -> _teamId = leaveEvent.get('_teamId') _roomId = leaveEvent.get('_roomId') _contactId = leaveEvent.get('_userId') store = recorder.getState() _userId = store.getIn ['user', '_id'] routerData = store.getIn ['router', 'data...
exports.leave = function(leaveEvent) { var _contactId, _roomId, _teamId, _userId, currentRoomId, currentTeamId, generalRoom, roomData, routerData, store, warningText; _teamId = leaveEvent.get('_teamId'); _roomId = leaveEvent.get('_roomId'); _contactId = leaveEvent.get('_userId'); store = recorder.getState(); ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/handlers/topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/topic.coffee
33
59