id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
jashkenas/coffeescript:test/tagged_template_literals.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test "tagged template literal with invalidly escaped ES interpolation", -> eq 'text: [ES template literals also look like this: `3 + 5 = \${3+5}`] expressions: []', func"ES template literals also look like this: `3 + 5 = \${3+5}`" ```
test("tagged template literal with invalidly escaped ES interpolation", function() { return eq('text: [ES template literals also look like this: `3 + 5 = \${3+5}`] expressions: []', func`ES template literals also look like this: \`3 + 5 = \${3+5}\``); });
CoffeeScript
JavaScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
d8abfae45749d99b409202408fcf845e1af0554b
16,577
https://github.com/jashkenas/coffeescript/blob/d8abfae45749d99b409202408fcf845e1af0554b/test/tagged_template_literals.coffee
165
167
jashkenas/coffeescript:test/tagged_template_literals.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript test("tagged template literal with invalidly escaped ES interpolation", function() { return eq('text: [ES template literals also look like this: `3 + 5 = \${3+5}`] expressions: []', func`ES template literals also look like this: \`3 + 5 = \${3+5}\``); }); ```
test "tagged template literal with invalidly escaped ES interpolation", -> eq 'text: [ES template literals also look like this: `3 + 5 = \${3+5}`] expressions: []', func"ES template literals also look like this: `3 + 5 = \${3+5}`"
JavaScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
d8abfae45749d99b409202408fcf845e1af0554b
16,577
https://github.com/jashkenas/coffeescript/blob/d8abfae45749d99b409202408fcf845e1af0554b/test/tagged_template_literals.coffee
165
167
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:raw_corpus
raw_corpus
test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq 'text: [] expressions: []', func'' test "tagged templat...
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
47c0a5cbef3025053015a1005ea878a267f2d7fb
16,577
https://github.com/jashkenas/coffeescript/blob/47c0a5cbef3025053015a1005ea878a267f2d7fb/test/tagged_template_literals.coffee
115
151
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq '...
test("tagged template literal mixed dot and bracket notation recognized as a callable function", function() { return eq('text: [mixed notation] expressions: []', outerobj['obj'].func`mixed notation`); }); // Edge cases test("tagged template literal with an empty string", function() { return eq('text: [] expression...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
47c0a5cbef3025053015a1005ea878a267f2d7fb
16,577
https://github.com/jashkenas/coffeescript/blob/47c0a5cbef3025053015a1005ea878a267f2d7fb/test/tagged_template_literals.coffee
115
151
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript test("tagged template literal mixed dot and bracket notation recognized as a callable function", function() { return eq('text: [mixed notation] expressions: []', outerobj['obj'].func`mixed notation`); }); // Edge cases test("tagged template literal with an empty...
test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq 'text: [] expressions: []', func'' test "tagged templat...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
47c0a5cbef3025053015a1005ea878a267f2d7fb
16,577
https://github.com/jashkenas/coffeescript/blob/47c0a5cbef3025053015a1005ea878a267f2d7fb/test/tagged_template_literals.coffee
115
151
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:completion
completion
test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq 'text: [] expressions: []', func'' test "tagged templat...
test "tagged template literal with an interpolated string that itself contains an interpolated string", -> eq 'text: [inner | string] expressions: [interpolated]', func"inner #{"#{'inter'}polated"} string" test "tagged template literal with an interpolated string that contains a tagged template literal", -> eq '...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
47c0a5cbef3025053015a1005ea878a267f2d7fb
16,577
https://github.com/jashkenas/coffeescript/blob/47c0a5cbef3025053015a1005ea878a267f2d7fb/test/tagged_template_literals.coffee
115
151
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:raw_corpus
raw_corpus
test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq 'text: [] expressions: []', func'' test "tagged templat...
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
555e47dbb92862305c8949d1a1ed0149cb0cce02
16,577
https://github.com/jashkenas/coffeescript/blob/555e47dbb92862305c8949d1a1ed0149cb0cce02/test/tagged_template_literals.coffee
115
139
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq '...
test("tagged template literal mixed dot and bracket notation recognized as a callable function", function() { return eq('text: [mixed notation] expressions: []', outerobj['obj'].func`mixed notation`); }); // Edge cases test("tagged template literal with an empty string", function() { return eq('text: [] expression...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
555e47dbb92862305c8949d1a1ed0149cb0cce02
16,577
https://github.com/jashkenas/coffeescript/blob/555e47dbb92862305c8949d1a1ed0149cb0cce02/test/tagged_template_literals.coffee
115
139
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript test("tagged template literal mixed dot and bracket notation recognized as a callable function", function() { return eq('text: [mixed notation] expressions: []', outerobj['obj'].func`mixed notation`); }); // Edge cases test("tagged template literal with an empty...
test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq 'text: [] expressions: []', func'' test "tagged templat...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
555e47dbb92862305c8949d1a1ed0149cb0cce02
16,577
https://github.com/jashkenas/coffeescript/blob/555e47dbb92862305c8949d1a1ed0149cb0cce02/test/tagged_template_literals.coffee
115
139
jashkenas/coffeescript:test/tagged_template_literals.coffee:3:completion
completion
test "tagged template literal mixed dot and bracket notation recognized as a callable function", -> eq 'text: [mixed notation] expressions: []', outerobj['obj'].func'mixed notation' # Edge cases test "tagged template literal with an empty string", -> eq 'text: [] expressions: []', func'' test "tagged templat...
func"#{}" test "tagged template literal as single interpolated expression", -> eq 'text: [|] expressions: [3]', func"#{3}" test "tagged template literal with an interpolated string that itself contains an interpolated string", -> eq 'text: [inner | string] expressions: [interpolated]', func"inner #{"#{'inter'...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
555e47dbb92862305c8949d1a1ed0149cb0cce02
16,577
https://github.com/jashkenas/coffeescript/blob/555e47dbb92862305c8949d1a1ed0149cb0cce02/test/tagged_template_literals.coffee
115
139
jashkenas/coffeescript:test/tagged_template_literals.coffee:1:raw_corpus
raw_corpus
func = (text, expressions...) -> "text: [#{text.join '|'}] expressions: [#{expressions.join '|'}]" outerobj = obj: func: func # Example use test "tagged template literal for html templating", -> html = (htmlFragments, expressions...) -> htmlFragments.reduce (fullHtml, htmlFragment, i) -> fullHtml ...
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
78e1f43b24df219c8092f11b23b0b54e126d2194
16,577
https://github.com/jashkenas/coffeescript/blob/78e1f43b24df219c8092f11b23b0b54e126d2194/test/tagged_template_literals.coffee
15
64
jashkenas/coffeescript:test/tagged_template_literals.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript func = (text, expressions...) -> "text: [#{text.join '|'}] expressions: [#{expressions.join '|'}]" outerobj = obj: func: func # Example use test "tagged template literal for html templating", -> html = (htmlFragments, expressions...) -> htmlFragme...
var func, outerobj; func = function(text, ...expressions) { return `text: [${text.join('|')}] expressions: [${expressions.join('|')}]`; }; outerobj = { obj: { func: func } }; // Example use test("tagged template literal for html templating", function() { var html, state; html = function(htmlFragments, ...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
78e1f43b24df219c8092f11b23b0b54e126d2194
16,577
https://github.com/jashkenas/coffeescript/blob/78e1f43b24df219c8092f11b23b0b54e126d2194/test/tagged_template_literals.coffee
15
64
jashkenas/coffeescript:test/tagged_template_literals.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var func, outerobj; func = function(text, ...expressions) { return `text: [${text.join('|')}] expressions: [${expressions.join('|')}]`; }; outerobj = { obj: { func: func } }; // Example use test("tagged template literal for html templating", function()...
func = (text, expressions...) -> "text: [#{text.join '|'}] expressions: [#{expressions.join '|'}]" outerobj = obj: func: func # Example use test "tagged template literal for html templating", -> html = (htmlFragments, expressions...) -> htmlFragments.reduce (fullHtml, htmlFragment, i) -> fullHtml ...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
78e1f43b24df219c8092f11b23b0b54e126d2194
16,577
https://github.com/jashkenas/coffeescript/blob/78e1f43b24df219c8092f11b23b0b54e126d2194/test/tagged_template_literals.coffee
15
64
jashkenas/coffeescript:test/tagged_template_literals.coffee:1:completion
completion
func = (text, expressions...) -> "text: [#{text.join '|'}] expressions: [#{expressions.join '|'}]" outerobj = obj: func: func # Example use test "tagged template literal for html templating", -> html = (htmlFragments, expressions...) -> htmlFragments.reduce (fullHtml, htmlFragment, i) -> fullHtml ...
Hi ${state.name}. You're looking ${state.adjective}! </p> """ # Simple, non-interpolated strings test "tagged template literal with a single-line single-quote string", -> eq 'text: [single-line single quotes] expressions: []', func'single-line single quotes' test "tagged template literal with a single-l...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/tagged_template_literals.coffee
MIT
78e1f43b24df219c8092f11b23b0b54e126d2194
16,577
https://github.com/jashkenas/coffeescript/blob/78e1f43b24df219c8092f11b23b0b54e126d2194/test/tagged_template_literals.coffee
15
64
jianliaoim/talk-os:talk-api2x/server/util/url.coffee:1:raw_corpus
raw_corpus
path = require 'path' _ = require 'lodash' qs = require 'querystring' urlLib = require 'url' config = require 'config' module.exports = urlUtil = buildIndexUrl: -> "#{config.schema}://#{config.webHost}" buildApiUrl: -> "#{config.schema}://#{config.apiHost}/#{config.apiVersion}" buildAccountPageUrl: -> config....
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/util/url.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/util/url.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/util/url.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript path = require 'path' _ = require 'lodash' qs = require 'querystring' urlLib = require 'url' config = require 'config' module.exports = urlUtil = buildIndexUrl: -> "#{config.schema}://#{config.webHost}" buildApiUrl: -> "#{config.schema}://#{config.apiHost}...
var _, config, path, qs, urlLib, urlUtil; path = require('path'); _ = require('lodash'); qs = require('querystring'); urlLib = require('url'); config = require('config'); module.exports = urlUtil = { buildIndexUrl: function() { return `${config.schema}://${config.webHost}`; }, buildApiUrl: function() { ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/util/url.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/util/url.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/util/url.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _, config, path, qs, urlLib, urlUtil; path = require('path'); _ = require('lodash'); qs = require('querystring'); urlLib = require('url'); config = require('config'); module.exports = urlUtil = { buildIndexUrl: function() { return `${config.schema}:...
path = require 'path' _ = require 'lodash' qs = require 'querystring' urlLib = require 'url' config = require 'config' module.exports = urlUtil = buildIndexUrl: -> "#{config.schema}://#{config.webHost}" buildApiUrl: -> "#{config.schema}://#{config.apiHost}/#{config.apiVersion}" buildAccountPageUrl: -> config....
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/util/url.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/util/url.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/util/url.coffee:1:completion
completion
path = require 'path' _ = require 'lodash' qs = require 'querystring' urlLib = require 'url' config = require 'config' module.exports = urlUtil = buildIndexUrl: -> "#{config.schema}://#{config.webHost}" buildApiUrl: -> "#{config.schema}://#{config.apiHost}/#{config.apiVersion}" buildAccountPageUrl: -> config....
buildStoryUrl: (_teamId, _storyId) -> url = "#{config.schema}://#{config.webHost}/team/#{_teamId}/story/#{_storyId}" buildShortTeamUrl: (shortName) -> url = if shortName then "#{config.schema}://#{config.webHost}/t/#{shortName}" else undefined buildCamoUrl: (url) -> # @osv return url return ur...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/util/url.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/util/url.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/util/url.coffee:2:raw_corpus
raw_corpus
return urlUtil.buildApiUrl() + "/services/webhook/#{hashId}" buildTbOrgzUrl: (_orgzId) -> "#{config.tbHost}/organization/#{_orgzId}/projects" randomAvatarUrl: -> "https://dn-st.qbox.me/user_default_avatars/#{Math.floor(Math.random() * 20 + 1)}.png" getBaseUrl: (url) -> urlOptions = urlLib.parse url "#{...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/util/url.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/util/url.coffee
51
75
jianliaoim/talk-os:talk-api2x/server/util/url.coffee:2:completion
completion
return urlUtil.buildApiUrl() + "/services/webhook/#{hashId}" buildTbOrgzUrl: (_orgzId) -> "#{config.tbHost}/organization/#{_orgzId}/projects" randomAvatarUrl: -> "https://dn-st.qbox.me/user_default_avatars/#{Math.floor(Math.random() * 20 + 1)}.png" getBaseUrl: (url) -> urlOptions = urlLib.parse url "#{...
return url if url.indexOf('utm_source=jianliao.com') > -1 if url.indexOf('?') is -1 url += '?utm_source=jianliao.com' else url += '&utm_source=jianliao.com' url buildAppMsgUrl: (url, params = {}) -> return url unless url if url.indexOf('?') is -1 url += "?#{qs.stringify(params)}...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/util/url.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/util/url.coffee
51
75
alekseykulikov/backbone-offline:spec/lib/collection_spec.coffee:1:raw_corpus
raw_corpus
describe 'Offline.Collection', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @collection = new Offline.Collection(@dreams) afterEach -> localStorage.clear() describe 'dirty', -> it 'should return items where "dirty" attribute is equal true', -> @dreams.add ...
CoffeeScript
alekseykulikov/backbone-offline
spec/lib/collection_spec.coffee
MIT
2db4d38dcbafe42fc8431e21a5838513feaad7a0
717
https://github.com/alekseykulikov/backbone-offline/blob/2db4d38dcbafe42fc8431e21a5838513feaad7a0/spec/lib/collection_spec.coffee
1
44
alekseykulikov/backbone-offline:spec/lib/collection_spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'Offline.Collection', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @collection = new Offline.Collection(@dreams) afterEach -> localStorage.clear() describe 'dirty', -> it 'should return items wher...
describe('Offline.Collection', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.collection = new Offline.Collection(this.dreams); }); afterEach(function() { return localStorage.clear(); }); describe('dirty', function() { retur...
CoffeeScript
JavaScript
alekseykulikov/backbone-offline
spec/lib/collection_spec.coffee
MIT
2db4d38dcbafe42fc8431e21a5838513feaad7a0
717
https://github.com/alekseykulikov/backbone-offline/blob/2db4d38dcbafe42fc8431e21a5838513feaad7a0/spec/lib/collection_spec.coffee
1
44
alekseykulikov/backbone-offline:spec/lib/collection_spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('Offline.Collection', function() { beforeEach(function() { localStorage.setItem('dreams', ''); this.dreams = new Dreams(); return this.collection = new Offline.Collection(this.dreams); }); afterEach(function() { return localStorage.cl...
describe 'Offline.Collection', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @collection = new Offline.Collection(@dreams) afterEach -> localStorage.clear() describe 'dirty', -> it 'should return items where "dirty" attribute is equal true', -> @dreams.add ...
JavaScript
CoffeeScript
alekseykulikov/backbone-offline
spec/lib/collection_spec.coffee
MIT
2db4d38dcbafe42fc8431e21a5838513feaad7a0
717
https://github.com/alekseykulikov/backbone-offline/blob/2db4d38dcbafe42fc8431e21a5838513feaad7a0/spec/lib/collection_spec.coffee
1
44
alekseykulikov/backbone-offline:spec/lib/collection_spec.coffee:1:completion
completion
describe 'Offline.Collection', -> beforeEach -> localStorage.setItem('dreams', '') @dreams = new Dreams() @collection = new Offline.Collection(@dreams) afterEach -> localStorage.clear() describe 'dirty', -> it 'should return items where "dirty" attribute is equal true', -> @dreams.add ...
@dreams.create(name: 'item 2', sid: '2') @dreams.create(name: 'item 3', sid: '3') it 'should destroy items by "sid" which difference from response', -> response = [{name: 'item 1', id: '2'}] @collection.destroyDiff(response) expect(@collection.items.pluck 'sid').toEqual(['2']) it 'sho...
CoffeeScript
CoffeeScript
alekseykulikov/backbone-offline
spec/lib/collection_spec.coffee
MIT
2db4d38dcbafe42fc8431e21a5838513feaad7a0
717
https://github.com/alekseykulikov/backbone-offline/blob/2db4d38dcbafe42fc8431e21a5838513feaad7a0/spec/lib/collection_spec.coffee
1
44
CaryLandholt/AngularFun:scripts/bootstrap.coffee:1:raw_corpus
raw_corpus
###global define### define ['require', 'libs/angular', 'app'], (require, angular) -> 'use strict' require ['libs/domReady!'], (document) -> angular.bootstrap document, ['app']
CoffeeScript
CaryLandholt/AngularFun
scripts/bootstrap.coffee
MIT
0ae299ec8a05ddbfb2e26f04898245b95f7ab37c
672
https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/bootstrap.coffee
1
7
CaryLandholt/AngularFun:scripts/bootstrap.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ###global define### define ['require', 'libs/angular', 'app'], (require, angular) -> 'use strict' require ['libs/domReady!'], (document) -> angular.bootstrap document, ['app'] ```
/*global define*/ define(['require', 'libs/angular', 'app'], function(require, angular) { 'use strict'; return require(['libs/domReady!'], function(document) { return angular.bootstrap(document, ['app']); }); });
CoffeeScript
JavaScript
CaryLandholt/AngularFun
scripts/bootstrap.coffee
MIT
0ae299ec8a05ddbfb2e26f04898245b95f7ab37c
672
https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/bootstrap.coffee
1
7
CaryLandholt/AngularFun:scripts/bootstrap.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /*global define*/ define(['require', 'libs/angular', 'app'], function(require, angular) { 'use strict'; return require(['libs/domReady!'], function(document) { return angular.bootstrap(document, ['app']); }); }); ```
###global define### define ['require', 'libs/angular', 'app'], (require, angular) -> 'use strict' require ['libs/domReady!'], (document) -> angular.bootstrap document, ['app']
JavaScript
CoffeeScript
CaryLandholt/AngularFun
scripts/bootstrap.coffee
MIT
0ae299ec8a05ddbfb2e26f04898245b95f7ab37c
672
https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/bootstrap.coffee
1
7
CaryLandholt/AngularFun:scripts/bootstrap.coffee:1:completion
completion
###global define### define ['require', 'libs/angular', 'app'], (require, angular) ->
'use strict' require ['libs/domReady!'], (document) -> angular.bootstrap document, ['app']
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
scripts/bootstrap.coffee
MIT
0ae299ec8a05ddbfb2e26f04898245b95f7ab37c
672
https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/bootstrap.coffee
1
7
gss/engine:src/engine/domains/Input.coffee:1:raw_corpus
raw_corpus
class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @getPath(id, 'x')], ['get', @getPath(id, 'widt...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+...
var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.helps = true; Input.prototype.Iterator = require('../commands/Iterator'); Input.prototype.Condition = require('../commands/Con...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.helps = true; Input.prototype.Iterator = require('../commands/Iterator'); ...
class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @getPath(id, 'x')], ['get', @getPath(id, 'widt...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:completion
completion
class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @getPath(id, 'x')], ['get', @getPath(id, 'widt...
return ['+', ['get', @getPath(id, 'y')], ['/', ['get', @getPath(id, 'height')], 2]] Input::Remove = Command.extend { signature: false extras: 1 }, remove: (args..., engine)-> for path in args engine.triggerEvent('remove', path) return true # Catch-all class for unknown commands Input::Default ...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:2:raw_corpus
raw_corpus
condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return false operation.index ||= engine.input.index = (engine.input.index || 0) + 1 return true extras: 4 execute: (args..., engine, operation, continuation, scope) -> meta = ...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:completion
completion
condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return false operation.index ||= engine.input.index = (engine.input.index || 0) + 1 return true extras: 4 execute: (args..., engine, operation, continuation, scope) -> meta = ...
wrapper.parent = operation.parent wrapper.domain ||= domain if engine.update(wrapper, undefined, undefined, domain) == undefined return engine.data.solve(args) produce: (meta, args)-> return [meta, args] domain: (engine, operation) -> if parent = operation.parent if domain = parent....
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:3:raw_corpus
raw_corpus
}, 'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine.scope scope = undefined object = engine.Query::getScope(engine, scope, continuation) return ['get', engine.getPath(object, property)] # Scoped variable Input::Variable.Getter = Input::Vari...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:3:completion
completion
}, 'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine.scope scope = undefined object = engine.Query::getScope(engine, scope, continuation) return ['get', engine.getPath(object, property)] # Scoped variable Input::Variable.Getter = Input::Vari...
return ['get', engine.getPath(prefix, property)] # Proxy math that passes basic expressions along Input::Variable.Expression = Variable.Expression.extend {}, '+': (left, right) -> ['+', left, right] '-': (left, right) -> ['-', left, right] '/': (left, right) -> ['/', left, right] '*': (left, rig...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:4:raw_corpus
raw_corpus
] }, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style = Input::Assignment.extend { signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Any'] ] log: -> unlog: -> # Register assignment within p...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
158
197
gss/engine:src/engine/domains/Input.coffee:4:completion
completion
] }, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style = Input::Assignment.extend { signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Any'] ] log: -> unlog: -> # Register assignment within p...
parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent operation.index ||= parent.assignments = (parent.assignments || 0) + 1 if rule (rule.properties ||= []).push(operation.index) retu...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/engine/domains/Input.coffee
158
197
gss/engine:src/engine/domains/Input.coffee:1:raw_corpus
raw_corpus
class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @getPath(id, 'x')], ['get', @getPath(id, 'width')]] bot...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @ge...
var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.Iterator = require('../commands/Iterator'); Input.prototype.Condition = require('../commands/Condition'); Input.prototype.Prop...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.Iterator = require('../commands/Iterator'); Input.prototype.Condition = re...
class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @getPath(id, 'x')], ['get', @getPath(id, 'width')]] bot...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:completion
completion
class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Properties: class right: (scope) -> id = @identify(scope) return ['+', ['get', @getPath(id, 'x')], ['get', @getPath(id, 'width')]] bot...
return ['+', ['get', @getPath(id, 'y')], ['/', ['get', @getPath(id, 'height')], 2]] Input::Remove = Command.extend { signature: false extras: 1 }, remove: (args..., engine)-> for path in args engine.triggerEvent('remove', path) return true # Catch-all class for unknown commands Input::Default ...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:2:raw_corpus
raw_corpus
condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return false operation.index ||= engine.input.index = (engine.input.index || 0) + 1 return true extras: 4 execute: (args..., engine, operation, continuation, scope) -> meta = ...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return false operation.index ||= engine.input.index = (engine.input.index || 0) + 1 return true extras: 4 execute: (args......
var splice = [].splice; ({ condition: function(engine, operation) { var parent; if (parent = operation.parent) { if (parent.command instanceof Input.prototype.Default) { return false; } } operation.index || (operation.index = engine.input.index = (engine.input.index || 0) + 1); ...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var splice = [].splice; ({ condition: function(engine, operation) { var parent; if (parent = operation.parent) { if (parent.command instanceof Input.prototype.Default) { return false; } } operation.index || (operation.index = ...
condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return false operation.index ||= engine.input.index = (engine.input.index || 0) + 1 return true extras: 4 execute: (args..., engine, operation, continuation, scope) -> meta = ...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:completion
completion
condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return false operation.index ||= engine.input.index = (engine.input.index || 0) + 1 return true extras: 4 execute: (args..., engine, operation, continuation, scope) -> meta = ...
wrapper.domain ||= domain if engine.update(wrapper, undefined, undefined, domain) == undefined return engine.data.solve(args) produce: (meta, args)-> return [meta, args] domain: (engine, operation) -> if parent = operation.parent if domain = parent.command.domains?[parent.indexOf(operatio...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:3:raw_corpus
raw_corpus
'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine.scope scope = undefined object = engine.Query::getScope(engine, scope, continuation) return ['get', engine.getPath(object, property)] # Scoped variable Input::Variable.Getter = Input::Variable....
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:3:completion
completion
'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine.scope scope = undefined object = engine.Query::getScope(engine, scope, continuation) return ['get', engine.getPath(object, property)] # Scoped variable Input::Variable.Getter = Input::Variable....
# Proxy math that passes basic expressions along Input::Variable.Expression = Variable.Expression.extend {}, '+': (left, right) -> ['+', left, right] '-': (left, right) -> ['-', left, right] '/': (left, right) -> ['/', left, right] '*': (left, right) -> ['*', left, right] # Constant definit...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:4:raw_corpus
raw_corpus
}, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style = Input::Assignment.extend { signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Any'] ] log: -> unlog: -> # Register assignment within par...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
158
196
gss/engine:src/engine/domains/Input.coffee:4:completion
completion
}, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style = Input::Assignment.extend { signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Any'] ] log: -> unlog: -> # Register assignment within par...
parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent operation.index ||= parent.assignments = (parent.assignments || 0) + 1 if rule (rule.properties ||= []).push(operation.index) retu...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
c9f22fd388a6f2ca132fa2cfad35d0888346ce7d
2,854
https://github.com/gss/engine/blob/c9f22fd388a6f2ca132fa2cfad35d0888346ce7d/src/engine/domains/Input.coffee
158
196
gss/engine:src/engine/domains/Input.coffee:1:raw_corpus
raw_corpus
class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::Remove = Command.extend { signature: false extras: 1...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::...
var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.Iterator = require('../commands/Iterator'); Input.prototype.Condition = require('../commands/Condition'); Input.prototype.Unit...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.Iterator = require('../commands/Iterator'); Input.prototype.Condition = re...
class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::Remove = Command.extend { signature: false extras: 1...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:completion
completion
class Input extends Domain displayName: 'Input' url: undefined Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::Remove = Command.extend { signature: false extras: 1...
execute: (args..., engine, operation) -> args.unshift operation[0] return args # Topmost unknown command returns processed operation back to engine Top = Input::Default.extend condition: (engine, operation) -> if parent = operation.parent if parent.command instanceof Input::Default return ...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:2:raw_corpus
raw_corpus
args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= domain if engine.update(wrapper, undefined, undefined, domain) == undef...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:completion
completion
args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= domain if engine.update(wrapper, undefined, undefined, domain) == undef...
Input::List = Command.List # Global variable Input::Variable = Variable.extend { signature: [ property: ['String'] ], }, 'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine.scope scope = undefined object = engine.Query::getScope(engine, sc...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:3:raw_corpus
raw_corpus
if prop = engine.properties[property] unless prop.matcher return prop.call(engine, object, continuation) debugger if !prefix && engine.data.check(engine.scope, property) prefix = engine.scope return ['get', engine.getPath(prefix, property)] # Proxy math that passes basic expressions al...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:3:completion
completion
if prop = engine.properties[property] unless prop.matcher return prop.call(engine, object, continuation) debugger if !prefix && engine.data.check(engine.scope, property) prefix = engine.scope return ['get', engine.getPath(prefix, property)] # Proxy math that passes basic expressions al...
# Constant definition Input::Assignment = Command.extend { type: 'Assignment' signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Variable'] ] }, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style =...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:4:raw_corpus
raw_corpus
# by its auto-incremented property local to operation list advices: [ (engine, operation, command) -> parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent operation.index ||= parent.assignmen...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
158
180
gss/engine:src/engine/domains/Input.coffee:4:completion
completion
# by its auto-incremented property local to operation list advices: [ (engine, operation, command) -> parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent operation.index ||= parent.assignmen...
if rule (rule.properties ||= []).push(operation.index) return ] }, 'set': (object, property, value, engine, operation, continuation, scope) -> if engine.data engine.setStyle object || scope, property, value, continuation, operation else engine.input.set object || scope, property, ...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
dd0070ab8687793b8b0d1da85f23842df5d88f08
2,854
https://github.com/gss/engine/blob/dd0070ab8687793b8b0d1da85f23842df5d88f08/src/engine/domains/Input.coffee
158
180
gss/engine:src/engine/domains/Input.coffee:1:raw_corpus
raw_corpus
class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::Remove = Command.extend { signature: fal...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensi...
var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.helps = true; Input.prototype.Iterator = require('../commands/Iterator'); Input.prototype.Condition = require('../commands/Con...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Input, Top, splice = [].splice; Input = (function() { class Input extends Domain {}; Input.prototype.displayName = 'Input'; Input.prototype.url = void 0; Input.prototype.helps = true; Input.prototype.Iterator = require('../commands/Iterator'); ...
class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::Remove = Command.extend { signature: fal...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:1:completion
completion
class Input extends Domain displayName: 'Input' url: undefined helps: true Iterator: require('../commands/Iterator') Condition: require('../commands/Condition') Unit: require('../commands/Unit') Properties: require('../properties/Dimensions') Input::Remove = Command.extend { signature: fal...
# Catch-all class for unknown commands Input::Default = Command.Default.extend extras: 2 execute: (args..., engine, operation) -> args.unshift operation[0] return args # Topmost unknown command returns processed operation back to engine Top = Input::Default.extend condition: (engine, operation) -> ...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
8
57
gss/engine:src/engine/domains/Input.coffee:2:raw_corpus
raw_corpus
if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= doma...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrappe...
var domain, wrapper; if (scope !== engine.scope) { meta.scope = engine.identify(scope); } args.unshift(operation[0]); wrapper = this.produce(meta, args, operation); wrapper.index = operation.index; args.parent = wrapper; if (domain = typeof this.domain === "function" ? this.domain(engine, operation) : void 0) {...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var domain, wrapper; if (scope !== engine.scope) { meta.scope = engine.identify(scope); } args.unshift(operation[0]); wrapper = this.produce(meta, args, operation); wrapper.index = operation.index; args.parent = wrapper; if (domain = typeof this.domain === ...
if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= doma...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:completion
completion
if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= doma...
# Array of commands, stops command propagation Input::List = Command.List # Global variable Input::Variable = Variable.extend { signature: [ property: ['String'] ], }, 'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine.scope scope = undefined ...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:3:raw_corpus
raw_corpus
if engine.queries prefix = engine.Query::getScope(engine, object, continuation) if prop = engine.properties[property] unless prop.matcher return prop.call(engine, object, continuation) debugger if !prefix && engine.data.check(engine.scope, property) prefix = engine.scope retu...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:3:completion
completion
if engine.queries prefix = engine.Query::getScope(engine, object, continuation) if prop = engine.properties[property] unless prop.matcher return prop.call(engine, object, continuation) debugger if !prefix && engine.data.check(engine.scope, property) prefix = engine.scope retu...
# Constant definition Input::Assignment = Command.extend { type: 'Assignment' signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Variable'] ] }, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style =...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:4:raw_corpus
raw_corpus
# Register assignment within parent rule # by its auto-incremented property local to operation list advices: [ (engine, operation, command) -> parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent ...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
158
182
gss/engine:src/engine/domains/Input.coffee:4:completion
completion
# Register assignment within parent rule # by its auto-incremented property local to operation list advices: [ (engine, operation, command) -> parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent ...
if rule (rule.properties ||= []).push(operation.index) return ] }, 'set': (object, property, value, engine, operation, continuation, scope) -> if engine.data engine.data.restyle object || scope, property, value, continuation, operation else engine.input.set object || scope, proper...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
daa2a82301cb1696b74d4bda01f1eefdbc0a3151
2,854
https://github.com/gss/engine/blob/daa2a82301cb1696b74d4bda01f1eefdbc0a3151/src/engine/domains/Input.coffee
158
182
gss/engine:src/engine/domains/Input.coffee:2:raw_corpus
raw_corpus
if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= doma...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrappe...
var domain, wrapper; if (scope !== engine.scope) { meta.scope = engine.identify(scope); } args.unshift(operation[0]); wrapper = this.produce(meta, args, operation); wrapper.index = operation.index; args.parent = wrapper; if (domain = typeof this.domain === "function" ? this.domain(engine, operation) : void 0) {...
CoffeeScript
JavaScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var domain, wrapper; if (scope !== engine.scope) { meta.scope = engine.identify(scope); } args.unshift(operation[0]); wrapper = this.produce(meta, args, operation); wrapper.index = operation.index; args.parent = wrapper; if (domain = typeof this.domain === ...
if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= doma...
JavaScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:2:completion
completion
if scope != engine.scope meta.scope = engine.identify(scope) args.unshift operation[0] wrapper = @produce(meta, args, operation) wrapper.index = operation.index args.parent = wrapper if domain = @domain?(engine, operation) wrapper.parent = operation.parent wrapper.domain ||= doma...
Input::Default::advices = [Top] # Array of commands, stops command propagation Input::List = Command.List # Global variable Input::Variable = Variable.extend { signature: [ property: ['String'] ], }, 'get': (property, engine, operation, continuation, scope) -> if engine.queries if scope == engine....
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
58
107
gss/engine:src/engine/domains/Input.coffee:3:raw_corpus
raw_corpus
'get': (object, property, engine, operation, continuation, scope) -> if engine.queries prefix = engine.Query::getScope(engine, object, continuation) if prop = engine.properties[property] unless prop.matcher return prop.call(engine, object, continuation) if !prefix && engine.intrinsic?....
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:3:completion
completion
'get': (object, property, engine, operation, continuation, scope) -> if engine.queries prefix = engine.Query::getScope(engine, object, continuation) if prop = engine.properties[property] unless prop.matcher return prop.call(engine, object, continuation) if !prefix && engine.intrinsic?....
# Constant definition Input::Assignment = Command.extend { type: 'Assignment' signature: [ [object: ['Query', 'Selector']] property: ['String'] value: ['Variable'] ] }, '=': (object, name, value, engine) -> engine.input.set(object, name, value) # Style assignment Input::Assignment.Style =...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
108
157
gss/engine:src/engine/domains/Input.coffee:4:raw_corpus
raw_corpus
# Register assignment within parent rule # by its auto-incremented property local to operation list advices: [ (engine, operation, command) -> parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent ...
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
158
182
gss/engine:src/engine/domains/Input.coffee:4:completion
completion
# Register assignment within parent rule # by its auto-incremented property local to operation list advices: [ (engine, operation, command) -> parent = operation rule = undefined while parent.parent if !rule && parent[0] == 'rule' rule = parent parent = parent.parent ...
if rule (rule.properties ||= []).push(operation.index) return ] }, 'set': (object, property, value, engine, operation, continuation, scope) -> if engine.intrinsic engine.intrinsic.restyle object || scope, property, value, continuation, operation else engine.input.set object || sco...
CoffeeScript
CoffeeScript
gss/engine
src/engine/domains/Input.coffee
MIT
6861fa637aa485f894e1176032b9b0dc897282cd
2,854
https://github.com/gss/engine/blob/6861fa637aa485f894e1176032b9b0dc897282cd/src/engine/domains/Input.coffee
158
182
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:1:raw_corpus
raw_corpus
_createMessages = -> # Message to user2 $message1 = Promise.resolve().then -> message = new MessageModel team: app.team1._id creator: app.user1._id to: app.user2._id body: 'direct message' message.$save() # Message to room1 $message2 = Promise.resolve().then -> message = new ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
14
63
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _createMessages = -> # Message to user2 $message1 = Promise.resolve().then -> message = new MessageModel team: app.team1._id creator: app.user1._id to: app.user2._id body: 'direct message' message.$save() # Message to room1 ...
var _createMessages; _createMessages = function() { var $broadcast, $message1, $message2; // Message to user2 $message1 = Promise.resolve().then(function() { var message; message = new MessageModel({ team: app.team1._id, creator: app.user1._id, to: app.user2._id, body: 'direct mes...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
14
63
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _createMessages; _createMessages = function() { var $broadcast, $message1, $message2; // Message to user2 $message1 = Promise.resolve().then(function() { var message; message = new MessageModel({ team: app.team1._id, creator: app.user...
_createMessages = -> # Message to user2 $message1 = Promise.resolve().then -> message = new MessageModel team: app.team1._id creator: app.user1._id to: app.user2._id body: 'direct message' message.$save() # Message to room1 $message2 = Promise.resolve().then -> message = new ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
14
63
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:1:completion
completion
_createMessages = -> # Message to user2 $message1 = Promise.resolve().then -> message = new MessageModel team: app.team1._id creator: app.user1._id to: app.user2._id body: 'direct message' message.$save() # Message to room1 $message2 = Promise.resolve().then -> message = new ...
resolve() if num is 2 Promise.all [$message1, $message2, $broadcast] describe 'Notification#CURD', -> before (done) -> $prepare = prepareAsync() $prepare.then _createMessages .nodeify done it 'should read the latest notifications', (done) -> options = method: 'GET' url: '/notifi...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
14
63
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:2:raw_corpus
raw_corpus
hits = 0 notifications.forEach (notification) -> "#{notification.creator._id}".should.eql "#{app.user1._id}" "#{notification._userId}".should.eql "#{app.user2._id}" notification.unreadNum.should.eql 1 if notification.type is 'dms' hits |= 0b1 "#{notification.ta...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
64
113
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:2:completion
completion
hits = 0 notifications.forEach (notification) -> "#{notification.creator._id}".should.eql "#{app.user1._id}" "#{notification._userId}".should.eql "#{app.user2._id}" notification.unreadNum.should.eql 1 if notification.type is 'dms' hits |= 0b1 "#{notification.ta...
isPinned: true _sessionUserId: app.user2._id unreadNum: 0 app.request options, (err, res, notification) -> notification.should.have.properties 'pinnedAt', 'isPinned', 'oldUnreadNum' notification.oldUnreadNum.should.eql 1 done err it 'should hide the notification', (done) -> ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
64
113
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:3:raw_corpus
raw_corpus
options = method: 'PUT' url: "/notifications/#{app.notification1._id}" body: _sessionUserId: app.user2._id isHidden: true app.requestAsync options Promise.all [$broadcast, $hideNotification] .nodeify done it 'should create a notification', (done) -> tex...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
114
157
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript options = method: 'PUT' url: "/notifications/#{app.notification1._id}" body: _sessionUserId: app.user2._id isHidden: true app.requestAsync options Promise.all [$broadcast, $hideNotification] .nodeify done...
var options; options = { method: 'PUT', url: `/notifications/${app.notification1._id}`, body: { _sessionUserId: app.user2._id, isHidden: true } }; app.requestAsync(options); Promise.all([$broadcast, $hideNotification]).nodeify(done); it('should create a notification', function(done) { var $broadca...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
114
157
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var options; options = { method: 'PUT', url: `/notifications/${app.notification1._id}`, body: { _sessionUserId: app.user2._id, isHidden: true } }; app.requestAsync(options); Promise.all([$broadcast, $hideNotification]).nodeify(done); it('should ...
options = method: 'PUT' url: "/notifications/#{app.notification1._id}" body: _sessionUserId: app.user2._id isHidden: true app.requestAsync options Promise.all [$broadcast, $hideNotification] .nodeify done it 'should create a notification', (done) -> tex...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
114
157
jianliaoim/talk-os:talk-api2x/test/controllers/notification.coffee:3:completion
completion
options = method: 'PUT' url: "/notifications/#{app.notification1._id}" body: _sessionUserId: app.user2._id isHidden: true app.requestAsync options Promise.all [$broadcast, $hideNotification] .nodeify done it 'should create a notification', (done) -> tex...
data._userId.should.eql app.user1._id data.unreadNum.should.eql 0 resolve() if hits is 0b1 catch err reject err $createNotification = Promise.resolve().then -> options = method: 'POST' url: "/notifications" body: _sessionUserId: app.us...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/notification.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/notification.coffee
114
157
yakyak/yakyak:test/test-entity-init.coffee:1:raw_corpus
raw_corpus
init = require './init.json' entity = require '../src/ui/models/entity' describe 'entity', -> beforeEach -> entity._reset() describe 'initFromEntities', -> it 'populates lookup', -> added = entity._initFromEntities init.entities eql 2, added eql 2, entit...
CoffeeScript
yakyak/yakyak
test/test-entity-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-entity-init.coffee
1
47
yakyak/yakyak:test/test-entity-init.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript init = require './init.json' entity = require '../src/ui/models/entity' describe 'entity', -> beforeEach -> entity._reset() describe 'initFromEntities', -> it 'populates lookup', -> added = entity._initFromEntities init.e...
var entity, init; init = require('./init.json'); entity = require('../src/ui/models/entity'); describe('entity', function() { beforeEach(function() { return entity._reset(); }); describe('initFromEntities', function() { return it('populates lookup', function() { var added, ent; added = enti...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-entity-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-entity-init.coffee
1
47
yakyak/yakyak:test/test-entity-init.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var entity, init; init = require('./init.json'); entity = require('../src/ui/models/entity'); describe('entity', function() { beforeEach(function() { return entity._reset(); }); describe('initFromEntities', function() { return it('populates lookup'...
init = require './init.json' entity = require '../src/ui/models/entity' describe 'entity', -> beforeEach -> entity._reset() describe 'initFromEntities', -> it 'populates lookup', -> added = entity._initFromEntities init.entities eql 2, added eql 2, entit...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-entity-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-entity-init.coffee
1
47
yakyak/yakyak:test/test-entity-init.coffee:1:completion
completion
init = require './init.json' entity = require '../src/ui/models/entity' describe 'entity', -> beforeEach -> entity._reset() describe 'initFromEntities', -> it 'populates lookup', -> added = entity._initFromEntities init.entities eql 2, added eql 2, entit...
assert 'Martin Algesten', e.display_name assert.strictEqual e, entity['10964681753'] it 'adds entity as .self', -> e = entity._initFromSelfEntity init.self_entity assert.isNotNull e assert 'Martin Algesten', e.display_name assert.strictEqual e, entity...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-entity-init.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-entity-init.coffee
1
47
jianliaoim/talk-os:talk-api2x/server/schemas/tag.coffee:1:raw_corpus
raw_corpus
### Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) ### {Schema} = require 'mongoose' _ = require 'lodash' module.exports = TagSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' name: type: String createdAt:...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/tag.coffee
1
32
jianliaoim/talk-os:talk-api2x/server/schemas/tag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) ### {Schema} = require 'mongoose' _ = require 'lodash' module.exports = TagSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Type...
/* Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) */ var Schema, TagSchema, _; ({Schema} = require('mongoose')); _ = require('lodash'); module.exports = TagSchema = new Schema({ creator: { type: Schema.Types.ObjectId, ref: 'User' }, team: { type: Schema.Types....
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/tag.coffee
1
32
jianliaoim/talk-os:talk-api2x/server/schemas/tag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) */ var Schema, TagSchema, _; ({Schema} = require('mongoose')); _ = require('lodash'); module.exports = TagSchema = new Schema({ creator: { type: Schema.Types.ObjectId,...
### Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) ### {Schema} = require 'mongoose' _ = require 'lodash' module.exports = TagSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' name: type: String createdAt:...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/tag.coffee
1
32
jianliaoim/talk-os:talk-api2x/server/schemas/tag.coffee:1:completion
completion
### Indexes: * db.tags.ensureIndex({team: 1, name: 1}, {unique: true, background: true}) ### {Schema} = require 'mongoose' _ = require 'lodash' module.exports = TagSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' name: type: String createdAt:...
toObject: virtuals: true getters: true toJSON: virtuals: true getters: true # ============================== Virtuals ============================== TagSchema.virtual '_teamId' .get -> @team?._id or @team .set (_id) -> @team = _id TagSchema.virtual '_creatorId' .get -> @creator?._id or @creato...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/tag.coffee
1
32
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_splats.coffee:1:raw_corpus
raw_corpus
func: (first, second, rest...) -> rest.join ' ' result: func 1, 2, 3, 4, 5 ok result is "3 4 5" gold: silver: bronze: the_field: last: null
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_splats.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_splats.coffee
1
9
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_splats.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript func: (first, second, rest...) -> rest.join ' ' result: func 1, 2, 3, 4, 5 ok result is "3 4 5" gold: silver: bronze: the_field: last: null ```
({ func: function(first, second, ...rest) { return rest.join(' '); }, result: func(1, 2, 3, 4, 5) }); ok(result === "3 4 5"); ({ gold: { silver: { bronze: { the_field: { last: null } } } } });
CoffeeScript
JavaScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_splats.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_splats.coffee
1
9