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
Leonidas-from-XIV/node-xml2js:test/bom.test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var assert, equ, xml2js; xml2js = require('../lib/xml2js'); assert = require('assert'); equ = assert.equal; module.exports = { 'test decoded BOM': function(test) { var demo; demo = '\uFEFF<xml><foo>bar</foo></xml>'; return xml2js.parseString(demo,...
xml2js = require '../lib/xml2js' assert = require 'assert' equ = assert.equal module.exports = 'test decoded BOM': (test) -> demo = '\uFEFF<xml><foo>bar</foo></xml>' xml2js.parseString demo, (err, res) -> equ err, undefined equ res.xml.foo[0], 'bar' test.done()
JavaScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/bom.test.coffee
MIT
7173c245aab4c2b417cd4c24f0b54e697a369864
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/7173c245aab4c2b417cd4c24f0b54e697a369864/test/bom.test.coffee
1
11
Leonidas-from-XIV/node-xml2js:test/bom.test.coffee:1:completion
completion
xml2js = require '../lib/xml2js' assert = require 'assert' equ = assert.equal module.exports =
'test decoded BOM': (test) -> demo = '\uFEFF<xml><foo>bar</foo></xml>' xml2js.parseString demo, (err, res) -> equ err, undefined equ res.xml.foo[0], 'bar' test.done()
CoffeeScript
CoffeeScript
Leonidas-from-XIV/node-xml2js
test/bom.test.coffee
MIT
7173c245aab4c2b417cd4c24f0b54e697a369864
4,965
https://github.com/Leonidas-from-XIV/node-xml2js/blob/7173c245aab4c2b417cd4c24f0b54e697a369864/test/bom.test.coffee
1
11
jianliaoim/talk-os:talk-web/client/module/code-viewer.coffee:1:raw_corpus
raw_corpus
cx = require 'classnames' hljs = require 'highlight.js/lib/highlight' React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' code = React.createFactory 'code' div = React.createFactory 'div' pre = React.createFactory 'pre' T = React.PropTypes hljs.configure tabReplace: ' ' lengthLimit = ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/code-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/code-viewer.coffee
1
43
jianliaoim/talk-os:talk-web/client/module/code-viewer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cx = require 'classnames' hljs = require 'highlight.js/lib/highlight' React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' code = React.createFactory 'code' div = React.createFactory 'div' pre = React.createFactory 'pre' T = React....
var PureRenderMixin, React, T, code, cx, div, hljs, lengthLimit, pre; cx = require('classnames'); hljs = require('highlight.js/lib/highlight'); React = require('react'); PureRenderMixin = require('react-addons-pure-render-mixin'); code = React.createFactory('code'); div = React.createFactory('div'); pre = React....
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/code-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/code-viewer.coffee
1
43
jianliaoim/talk-os:talk-web/client/module/code-viewer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PureRenderMixin, React, T, code, cx, div, hljs, lengthLimit, pre; cx = require('classnames'); hljs = require('highlight.js/lib/highlight'); React = require('react'); PureRenderMixin = require('react-addons-pure-render-mixin'); code = React.createFactory('c...
cx = require 'classnames' hljs = require 'highlight.js/lib/highlight' React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' code = React.createFactory 'code' div = React.createFactory 'div' pre = React.createFactory 'pre' T = React.PropTypes hljs.configure tabReplace: ' ' lengthLimit = ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/code-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/code-viewer.coffee
1
43
jianliaoim/talk-os:talk-web/client/module/code-viewer.coffee:1:completion
completion
cx = require 'classnames' hljs = require 'highlight.js/lib/highlight' React = require 'react' PureRenderMixin = require 'react-addons-pure-render-mixin' code = React.createFactory 'code' div = React.createFactory 'div' pre = React.createFactory 'pre' T = React.PropTypes hljs.configure tabReplace: ' ' lengthLimit = ...
text: T.string getDefaultProps: -> codeType: 'nohighlight' text: '' renderCode: -> hljs.highlightAuto(@props.text, [@props.codeType]).value render: -> className = cx 'lite-code-viewer': true "is-for-#{ @props.name }": @props.name? div className: className, ref: 'viewer', ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/code-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/code-viewer.coffee
1
43
oozcitak/xmlbuilder-js:test/basic/insert.coffee:1:raw_corpus
raw_corpus
suite 'Editing:', -> test 'Insert', -> eq( xml('test6', {}, {}, { headless: true }) .e('node','last') .insertBefore('node','1') .insertAfter('node','2') .end() '<test6><node>1</node><node>2</node><node>last</node></test6>' )
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/insert.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/insert.coffee
1
10
oozcitak/xmlbuilder-js:test/basic/insert.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Editing:', -> test 'Insert', -> eq( xml('test6', {}, {}, { headless: true }) .e('node','last') .insertBefore('node','1') .insertAfter('node','2') .end() '<test6><node>1</node><node>2</node><node>last</node>...
suite('Editing:', function() { return test('Insert', function() { return eq(xml('test6', {}, {}, { headless: true }).e('node', 'last').insertBefore('node', '1').insertAfter('node', '2').end(), '<test6><node>1</node><node>2</node><node>last</node></test6>'); }); });
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/basic/insert.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/insert.coffee
1
10
oozcitak/xmlbuilder-js:test/basic/insert.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Editing:', function() { return test('Insert', function() { return eq(xml('test6', {}, {}, { headless: true }).e('node', 'last').insertBefore('node', '1').insertAfter('node', '2').end(), '<test6><node>1</node><node>2</node><node>last</node></t...
suite 'Editing:', -> test 'Insert', -> eq( xml('test6', {}, {}, { headless: true }) .e('node','last') .insertBefore('node','1') .insertAfter('node','2') .end() '<test6><node>1</node><node>2</node><node>last</node></test6>' )
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/insert.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/insert.coffee
1
10
oozcitak/xmlbuilder-js:test/basic/insert.coffee:1:completion
completion
suite 'Editing:', -> test 'Insert', -> eq( xml('test6', {}, {}, { headless: true }) .e('node','last')
.insertBefore('node','1') .insertAfter('node','2') .end() '<test6><node>1</node><node>2</node><node>last</node></test6>' )
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/insert.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/insert.coffee
1
10
Atraci/Atraci:coffee/_notify.coffee:1:raw_corpus
raw_corpus
class Notify emit: (title, options) -> if document.webkitHidden #window is minimized new Notification(title, body: options.body icon: options.link ) else return false
CoffeeScript
Atraci/Atraci
coffee/_notify.coffee
MIT
ee81bf3da452aa9866d9a70b572ffd1077bd9340
800
https://github.com/Atraci/Atraci/blob/ee81bf3da452aa9866d9a70b572ffd1077bd9340/coffee/_notify.coffee
1
10
Atraci/Atraci:coffee/_notify.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Notify emit: (title, options) -> if document.webkitHidden #window is minimized new Notification(title, body: options.body icon: options.link ) else return false ```
var Notify; Notify = class Notify { emit(title, options) { if (document.webkitHidden) { //window is minimized new Notification(title, { body: options.body, icon: options.link }); } else { } return false; } };
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_notify.coffee
MIT
ee81bf3da452aa9866d9a70b572ffd1077bd9340
800
https://github.com/Atraci/Atraci/blob/ee81bf3da452aa9866d9a70b572ffd1077bd9340/coffee/_notify.coffee
1
10
Atraci/Atraci:coffee/_notify.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Notify; Notify = class Notify { emit(title, options) { if (document.webkitHidden) { //window is minimized new Notification(title, { body: options.body, icon: options.link }); } else { } return false; } }; ```
class Notify emit: (title, options) -> if document.webkitHidden #window is minimized new Notification(title, body: options.body icon: options.link ) else return false
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_notify.coffee
MIT
ee81bf3da452aa9866d9a70b572ffd1077bd9340
800
https://github.com/Atraci/Atraci/blob/ee81bf3da452aa9866d9a70b572ffd1077bd9340/coffee/_notify.coffee
1
10
Atraci/Atraci:coffee/_notify.coffee:1:completion
completion
class Notify emit: (title, options) -> if document.webkitHidden #window is minimized new Notification(title,
body: options.body icon: options.link ) else return false
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_notify.coffee
MIT
ee81bf3da452aa9866d9a70b572ffd1077bd9340
800
https://github.com/Atraci/Atraci/blob/ee81bf3da452aa9866d9a70b572ffd1077bd9340/coffee/_notify.coffee
1
10
Atraci/Atraci:coffee/_notify.coffee:1:raw_corpus
raw_corpus
class Notify NowPlaying: (artist, title) -> if document.webkitHidden #window is not visible cover = playerContainer.find(".cover").css("background-image") link = cover.replace(/.*\s?url\([\'\"]?/, "").replace(/[\'\"]?\).*/, "") new Notification("Now Playing", body: artist + ' - ' + titl...
CoffeeScript
Atraci/Atraci
coffee/_notify.coffee
MIT
34601b26bc19de76cf7c4cddd8e907f725a46354
800
https://github.com/Atraci/Atraci/blob/34601b26bc19de76cf7c4cddd8e907f725a46354/coffee/_notify.coffee
1
13
Atraci/Atraci:coffee/_notify.coffee:1:completion
completion
class Notify NowPlaying: (artist, title) -> if document.webkitHidden #window is not visible cover = playerContainer.find(".cover").css("background-image") link = cover.replace(/.*\s?url\([\'\"]?/, "").replace(/[\'\"]?\).*/, "")
new Notification("Now Playing", body: artist + ' - ' + title icon: link ) else return false
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_notify.coffee
MIT
34601b26bc19de76cf7c4cddd8e907f725a46354
800
https://github.com/Atraci/Atraci/blob/34601b26bc19de76cf7c4cddd8e907f725a46354/coffee/_notify.coffee
1
13
HubSpot/BuckyClient:test/spec/bucky.coffee:1:raw_corpus
raw_corpus
hubspot.require ['hubspot.bucky.client'], (Bucky) -> describe 'The Bucky Object', -> it 'should be defined', -> expect(Bucky).toBeDefined() it 'should itself be a client', -> expect(Bucky.send).toBeDefined() expect(Bucky.timer).toBeDefined() expect(Bucky.count).toBeDefined() exp...
CoffeeScript
HubSpot/BuckyClient
test/spec/bucky.coffee
MIT
7113752556335b6d99201520be92bada2abe2e19
1,725
https://github.com/HubSpot/BuckyClient/blob/7113752556335b6d99201520be92bada2abe2e19/test/spec/bucky.coffee
1
42
HubSpot/BuckyClient:test/spec/bucky.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hubspot.require ['hubspot.bucky.client'], (Bucky) -> describe 'The Bucky Object', -> it 'should be defined', -> expect(Bucky).toBeDefined() it 'should itself be a client', -> expect(Bucky.send).toBeDefined() expect(Bucky.timer).toBeDe...
hubspot.require(['hubspot.bucky.client'], function(Bucky) { describe('The Bucky Object', function() { it('should be defined', function() { return expect(Bucky).toBeDefined(); }); it('should itself be a client', function() { expect(Bucky.send).toBeDefined(); expect(Bucky.timer).toBeDefine...
CoffeeScript
JavaScript
HubSpot/BuckyClient
test/spec/bucky.coffee
MIT
7113752556335b6d99201520be92bada2abe2e19
1,725
https://github.com/HubSpot/BuckyClient/blob/7113752556335b6d99201520be92bada2abe2e19/test/spec/bucky.coffee
1
42
HubSpot/BuckyClient:test/spec/bucky.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript hubspot.require(['hubspot.bucky.client'], function(Bucky) { describe('The Bucky Object', function() { it('should be defined', function() { return expect(Bucky).toBeDefined(); }); it('should itself be a client', function() { expect(Bucky.se...
hubspot.require ['hubspot.bucky.client'], (Bucky) -> describe 'The Bucky Object', -> it 'should be defined', -> expect(Bucky).toBeDefined() it 'should itself be a client', -> expect(Bucky.send).toBeDefined() expect(Bucky.timer).toBeDefined() expect(Bucky.count).toBeDefined() exp...
JavaScript
CoffeeScript
HubSpot/BuckyClient
test/spec/bucky.coffee
MIT
7113752556335b6d99201520be92bada2abe2e19
1,725
https://github.com/HubSpot/BuckyClient/blob/7113752556335b6d99201520be92bada2abe2e19/test/spec/bucky.coffee
1
42
HubSpot/BuckyClient:test/spec/bucky.coffee:1:completion
completion
hubspot.require ['hubspot.bucky.client'], (Bucky) -> describe 'The Bucky Object', -> it 'should be defined', -> expect(Bucky).toBeDefined() it 'should itself be a client', -> expect(Bucky.send).toBeDefined() expect(Bucky.timer).toBeDefined() expect(Bucky.count).toBeDefined() exp...
expect(client.send).toBeDefined() describe 'getFullUrl', -> it 'should add the hostname if the url starts with slash', -> expect(Bucky.requests.getFullUrl('/test', {hostname: 'host'})).toBe('host/test') describe 'urlToKey', -> utk = Bucky.requests.urlToKey it 'should convert slashes to dots', -...
CoffeeScript
CoffeeScript
HubSpot/BuckyClient
test/spec/bucky.coffee
MIT
7113752556335b6d99201520be92bada2abe2e19
1,725
https://github.com/HubSpot/BuckyClient/blob/7113752556335b6d99201520be92bada2abe2e19/test/spec/bucky.coffee
1
42
Pagedraw/pagedraw:test/unit/core_tests.coffee:1:raw_corpus
raw_corpus
_l = require 'lodash' chai = require 'chai' fs = require 'fs' assert = (condition) -> chai.assert(condition(), condition.toString()) ## {isEqual} = require('../../src/model') {Doc} = require '../../src/doc' core = require '../../src/core' TextBlock = require '../../src/blocks/text-block' LayoutBlock = require '...
CoffeeScript
Pagedraw/pagedraw
test/unit/core_tests.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/test/unit/core_tests.coffee
1
37
Pagedraw/pagedraw:test/unit/core_tests.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _l = require 'lodash' chai = require 'chai' fs = require 'fs' assert = (condition) -> chai.assert(condition(), condition.toString()) ## {isEqual} = require('../../src/model') {Doc} = require '../../src/doc' core = require '../../src/core' TextBlock = requ...
var ArtboardBlock, Doc, Dynamicable, LayoutBlock, TextBlock, _l, assert, chai, core, fs, isEqual; _l = require('lodash'); chai = require('chai'); fs = require('fs'); assert = function(condition) { return chai.assert(condition(), condition.toString()); }; //# ({isEqual} = require('../../src/model')); ({Doc} = re...
CoffeeScript
JavaScript
Pagedraw/pagedraw
test/unit/core_tests.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/test/unit/core_tests.coffee
1
37
Pagedraw/pagedraw:test/unit/core_tests.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ArtboardBlock, Doc, Dynamicable, LayoutBlock, TextBlock, _l, assert, chai, core, fs, isEqual; _l = require('lodash'); chai = require('chai'); fs = require('fs'); assert = function(condition) { return chai.assert(condition(), condition.toString()); }; //#...
_l = require 'lodash' chai = require 'chai' fs = require 'fs' assert = (condition) -> chai.assert(condition(), condition.toString()) ## {isEqual} = require('../../src/model') {Doc} = require '../../src/doc' core = require '../../src/core' TextBlock = require '../../src/blocks/text-block' LayoutBlock = require '...
JavaScript
CoffeeScript
Pagedraw/pagedraw
test/unit/core_tests.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/test/unit/core_tests.coffee
1
37
Pagedraw/pagedraw:test/unit/core_tests.coffee:1:completion
completion
_l = require 'lodash' chai = require 'chai' fs = require 'fs' assert = (condition) -> chai.assert(condition(), condition.toString()) ## {isEqual} = require('../../src/model') {Doc} = require '../../src/doc' core = require '../../src/core' TextBlock = require '../../src/blocks/text-block' LayoutBlock = require '...
# load blocks require '../../src/blocks' describe 'core', -> simpleDoc = new Doc() artboard = new ArtboardBlock(top: 1, left: 1, height: 500, width: 500) text_block = new TextBlock(top: 10, left: 20, height: 40, width: 50, htmlContent: (Dynamicable String).from('Hello')) layout_block = new LayoutBlock(...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
test/unit/core_tests.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/test/unit/core_tests.coffee
1
37
jianliaoim/talk-os:talk-web/client/util/diff.coffee:1:raw_corpus
raw_corpus
exports.adds = (prev, next) -> arr = [] next.forEach (nextItem) -> if not prev.some((prevItem) -> prevItem is nextItem) arr.push nextItem arr exports.removes = (prev, next) -> arr = [] prev.forEach (prevItem) -> if not next.some((nextItem) -> nextItem is prevItem) arr.push prevItem arr ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/diff.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/diff.coffee
1
21
jianliaoim/talk-os:talk-web/client/util/diff.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.adds = (prev, next) -> arr = [] next.forEach (nextItem) -> if not prev.some((prevItem) -> prevItem is nextItem) arr.push nextItem arr exports.removes = (prev, next) -> arr = [] prev.forEach (prevItem) -> if not next.some((nextItem...
exports.adds = function(prev, next) { var arr; arr = []; next.forEach(function(nextItem) { if (!prev.some(function(prevItem) { return prevItem === nextItem; })) { return arr.push(nextItem); } }); return arr; }; exports.removes = function(prev, next) { var arr; arr = []; prev.for...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/diff.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/diff.coffee
1
21
jianliaoim/talk-os:talk-web/client/util/diff.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.adds = function(prev, next) { var arr; arr = []; next.forEach(function(nextItem) { if (!prev.some(function(prevItem) { return prevItem === nextItem; })) { return arr.push(nextItem); } }); return arr; }; exports.removes = f...
exports.adds = (prev, next) -> arr = [] next.forEach (nextItem) -> if not prev.some((prevItem) -> prevItem is nextItem) arr.push nextItem arr exports.removes = (prev, next) -> arr = [] prev.forEach (prevItem) -> if not next.some((nextItem) -> nextItem is prevItem) arr.push prevItem arr ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/diff.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/diff.coffee
1
21
jianliaoim/talk-os:talk-web/client/util/diff.coffee:1:completion
completion
exports.adds = (prev, next) -> arr = [] next.forEach (nextItem) -> if not prev.some((prevItem) -> prevItem is nextItem) arr.push nextItem arr exports.removes = (prev, next) -> arr = [] prev.forEach (prevItem) ->
if not next.some((nextItem) -> nextItem is prevItem) arr.push prevItem arr # Immutable exports.toggle = (imList, targetItem) -> if imList.contains targetItem imList.filterNot (item) -> item is targetItem else imList.push targetItem
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/diff.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/diff.coffee
1
21
jianliaoim/talk-os:talk-web/client/module/tooltip.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'tooltip' propTypes: # react component or raw js string inside the tooltip template: T.oneOfType([T.string, T.func]).isRequired # tether options options: T.object # accepts children getDefaultProps: -> options: {} shouldComponentUpdate: ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/tooltip.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/tooltip.coffee
29
78
jianliaoim/talk-os:talk-web/client/module/tooltip.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'tooltip' propTypes: # react component or raw js string inside the tooltip template: T.oneOfType([T.string, T.func]).isRequired # tether options options: T.object # accepts children getDe...
module.exports = React.createClass({ displayName: 'tooltip', propTypes: { // react component or raw js string inside the tooltip template: T.oneOfType([T.string, T.func]).isRequired, // tether options options: T.object }, // accepts children getDefaultProps: function() { return { opt...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/tooltip.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/tooltip.coffee
29
78
jianliaoim/talk-os:talk-web/client/module/tooltip.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'tooltip', propTypes: { // react component or raw js string inside the tooltip template: T.oneOfType([T.string, T.func]).isRequired, // tether options options: T.object }, // accepts children...
module.exports = React.createClass displayName: 'tooltip' propTypes: # react component or raw js string inside the tooltip template: T.oneOfType([T.string, T.func]).isRequired # tether options options: T.object # accepts children getDefaultProps: -> options: {} shouldComponentUpdate: ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/tooltip.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/tooltip.coffee
29
78
jianliaoim/talk-os:talk-web/client/module/tooltip.coffee:1:completion
completion
module.exports = React.createClass displayName: 'tooltip' propTypes: # react component or raw js string inside the tooltip template: T.oneOfType([T.string, T.func]).isRequired # tether options options: T.object # accepts children getDefaultProps: -> options: {} shouldComponentUpdate: ...
@updateDrop() componentWillUnmount: -> if @_node ReactDOM.unmountComponentAtNode(@_node) @_drop.destroy() initDrop: -> options = assign TETHER_DEFAULT_OPTIONS, @props.options, target: ReactDOM.findDOMNode(this) content: ' ' @_drop = new Drop(options) updateDrop: -> if type...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/tooltip.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/tooltip.coffee
29
78
jianliaoim/talk-os:talk-account/client/app/page.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'app-page' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDevTools: false path: Immutable.List() componentDidMount: -> window.addEventListener 'keydown', @onWindowKeydown componentWillUnount: -> ...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/page.coffee
29
78
jianliaoim/talk-os:talk-account/client/app/page.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'app-page' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDevTools: false path: Immutable.List() componentDidMount: -> window.addEventListener...
module.exports = React.createClass({ displayName: 'app-page', propTypes: { core: React.PropTypes.instanceOf(Immutable.Map).isRequired }, getInitialState: function() { return { showDevTools: false, path: Immutable.List() }; }, componentDidMount: function() { return window.addEvent...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/client/app/page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/page.coffee
29
78
jianliaoim/talk-os:talk-account/client/app/page.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'app-page', propTypes: { core: React.PropTypes.instanceOf(Immutable.Map).isRequired }, getInitialState: function() { return { showDevTools: false, path: Immutable.List() }; }, com...
module.exports = React.createClass displayName: 'app-page' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDevTools: false path: Immutable.List() componentDidMount: -> window.addEventListener 'keydown', @onWindowKeydown componentWillUnount: -> ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/page.coffee
29
78
jianliaoim/talk-os:talk-account/client/app/page.coffee:1:completion
completion
module.exports = React.createClass displayName: 'app-page' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDevTools: false path: Immutable.List() componentDidMount: -> window.addEventListener 'keydown', @onWindowKeydown componentWillUnount: -> ...
onPopstate: (info, event) -> controllers.routeGo info onBackToApp: -> controllers.signInRedirect() renderError: -> store = @props.core.get('store') div className: 'server-error control-panel', div className: 'as-line-centered', span className: 'hint-error', store.getIn(['serverError'...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/page.coffee
29
78
jianliaoim/talk-os:talk-account/client/app/page.coffee:2:raw_corpus
raw_corpus
when 'reset-password' then EmailResetPassword store: store when 'succeed-resetting' then SucceedResetting store: store when 'bind-mobile' then BindMobile store: store when 'bind-thirdparty' then BindThirdparty store: store when 'bind-email' then BindEmail store: store when 'verify-email' t...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/page.coffee
79
120
jianliaoim/talk-os:talk-account/client/app/page.coffee:2:completion
completion
when 'reset-password' then EmailResetPassword store: store when 'succeed-resetting' then SucceedResetting store: store when 'bind-mobile' then BindMobile store: store when 'bind-thirdparty' then BindThirdparty store: store when 'bind-email' then BindEmail store: store when 'verify-email' t...
path: @state.path, onPathChange: @onPathChange renderFeature: -> div className: 'app-feature', div className: 'brand-cover' Brand language: @getLanguage() render: -> store = @props.core.get('store') div className: 'app-page', div className: 'main-card', @renderFeature() ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/page.coffee
79
120
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
delta: delta if _last _check(false) _last = null _check = (moving, first_move = false) -> if moving if first_move then _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y) if _start_axis isnt null base.trigger(_target, "swiping#{_start_axis}", _last) ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.swipe.coffee
51
79
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
delta: delta if _last _check(false) _last = null _check = (moving, first_move = false) -> if moving if first_move then _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y) if _start_axis isnt null base.trigger(_target, "swiping#{_start_axis}", _last) ...
directions.push (if _last.delta.y < 0 then "Up" else "Down") else directions.push (if _last.delta.x < 0 then "Left" else "Right") if Math.abs(_last.delta.x) > GAP if directions.length base.trigger(_target, "swipe", _last) base.trigger(_target, "swipe#{direction}", _last) for direct...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.swipe.coffee
51
79
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8
2,055
https://github.com/soyjavi/QuoJS/blob/8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8
2,055
https://github.com/soyjavi/QuoJS/blob/8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8
2,055
https://github.com/soyjavi/QuoJS/blob/8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8
2,055
https://github.com/soyjavi/QuoJS/blob/8dd94e40b9c7a31dfda7fcc8fc91735fc941f8b8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
73cc78db510b2610c46df3cacdcd0d9111b39d77
2,055
https://github.com/soyjavi/QuoJS/blob/73cc78db510b2610c46df3cacdcd0d9111b39d77/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
73cc78db510b2610c46df3cacdcd0d9111b39d77
2,055
https://github.com/soyjavi/QuoJS/blob/73cc78db510b2610c46df3cacdcd0d9111b39d77/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
73cc78db510b2610c46df3cacdcd0d9111b39d77
2,055
https://github.com/soyjavi/QuoJS/blob/73cc78db510b2610c46df3cacdcd0d9111b39d77/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
73cc78db510b2610c46df3cacdcd0d9111b39d77
2,055
https://github.com/soyjavi/QuoJS/blob/73cc78db510b2610c46df3cacdcd0d9111b39d77/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
base.trigger(_target, "swiping", _last) else directions = [] if Math.abs(_last.delta.y) > GAP directions.push (if _last.delta.y < 0 then "Up" else "Down") else directions.push (if _last.delta.x < 0 then "Left" else "Right") if Math.abs(_last.delta.x) > GAP if directio...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
73cc78db510b2610c46df3cacdcd0d9111b39d77
2,055
https://github.com/soyjavi/QuoJS/blob/73cc78db510b2610c46df3cacdcd0d9111b39d77/source/quo.gestures.swipe.coffee
51
69
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
base.trigger(_target, "swiping", _last) else directions = [] if Math.abs(_last.delta.y) > GAP directions.push (if _last.delta.y < 0 then "Up" else "Down") else directions.push (if _last.delta.x < 0 then "Left" else "Right") if Math.abs(_last.delta.x) > GAP if directio...
_getInitialAxis = (x, y) -> axis = null if Math.round(Math.abs(x / y)) >= 2 then axis = "Horizontal" else if Math.round(Math.abs(y / x)) >= 2 then axis = "Vertical" return axis start: start move: move end: end
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
73cc78db510b2610c46df3cacdcd0d9111b39d77
2,055
https://github.com/soyjavi/QuoJS/blob/73cc78db510b2610c46df3cacdcd0d9111b39d77/source/quo.gestures.swipe.coffee
51
69
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
53643d0bbb638cd747c38580496632522682ce3f
2,055
https://github.com/soyjavi/QuoJS/blob/53643d0bbb638cd747c38580496632522682ce3f/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
53643d0bbb638cd747c38580496632522682ce3f
2,055
https://github.com/soyjavi/QuoJS/blob/53643d0bbb638cd747c38580496632522682ce3f/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
53643d0bbb638cd747c38580496632522682ce3f
2,055
https://github.com/soyjavi/QuoJS/blob/53643d0bbb638cd747c38580496632522682ce3f/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
53643d0bbb638cd747c38580496632522682ce3f
2,055
https://github.com/soyjavi/QuoJS/blob/53643d0bbb638cd747c38580496632522682ce3f/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
base.trigger(_target, "swiping", _last) else directions = [] if Math.abs(_last.delta.y) > GAP directions.push(if _last.delta.y < 0 then "Up" else "Down") if Math.abs(_last.delta.x) > GAP directions.push(if _last.delta.x < 0 then "Left" else "Right") if direction...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
53643d0bbb638cd747c38580496632522682ce3f
2,055
https://github.com/soyjavi/QuoJS/blob/53643d0bbb638cd747c38580496632522682ce3f/source/quo.gestures.swipe.coffee
51
70
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
base.trigger(_target, "swiping", _last) else directions = [] if Math.abs(_last.delta.y) > GAP directions.push(if _last.delta.y < 0 then "Up" else "Down") if Math.abs(_last.delta.x) > GAP directions.push(if _last.delta.x < 0 then "Left" else "Right") if direction...
_getInitialAxis = (x, y) -> axis = null if Math.round(Math.abs(x / y)) >= 2 then axis = "Horizontal" else if Math.round(Math.abs(y / x)) >= 2 then axis = "Vertical" return axis start: start move: move end: end
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
53643d0bbb638cd747c38580496632522682ce3f
2,055
https://github.com/soyjavi/QuoJS/blob/53643d0bbb638cd747c38580496632522682ce3f/source/quo.gestures.swipe.coffee
51
70
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
f1276e9e4e5bd5f699543a08fadd37a515214174
2,055
https://github.com/soyjavi/QuoJS/blob/f1276e9e4e5bd5f699543a08fadd37a515214174/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
_last = null is_first = _last is null _timeStamp = new Date().getTime() dt = (if is_first then 1 else _timeStamp - _last.timeStamp) start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.leng...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
f1276e9e4e5bd5f699543a08fadd37a515214174
2,055
https://github.com/soyjavi/QuoJS/blob/f1276e9e4e5bd5f699543a08fadd37a515214174/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
_check = (moving, first_move = false) -> if moving if first_move then _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y) if _start_axis isnt null base.trigger(_target, "swiping#{_start_axis}", _last) base.trigger(_target, "swiping", _last) else directions =...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
f1276e9e4e5bd5f699543a08fadd37a515214174
2,055
https://github.com/soyjavi/QuoJS/blob/f1276e9e4e5bd5f699543a08fadd37a515214174/source/quo.gestures.swipe.coffee
51
75
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _check = (moving, first_move = false) -> if moving if first_move then _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y) if _start_axis isnt null base.trigger(_target, "swiping#{_start_axis}", _last) base.trigger(_...
var _check, _getInitialAxis; _check = function(moving, first_move = false) { var _start_axis, direction, directions, i, len, results; if (moving) { if (first_move) { _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y); } if (_start_axis !== null) { base.trigger(_target, `swiping${_s...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
f1276e9e4e5bd5f699543a08fadd37a515214174
2,055
https://github.com/soyjavi/QuoJS/blob/f1276e9e4e5bd5f699543a08fadd37a515214174/source/quo.gestures.swipe.coffee
51
75
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _check, _getInitialAxis; _check = function(moving, first_move = false) { var _start_axis, direction, directions, i, len, results; if (moving) { if (first_move) { _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y); } if (_start_ax...
_check = (moving, first_move = false) -> if moving if first_move then _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y) if _start_axis isnt null base.trigger(_target, "swiping#{_start_axis}", _last) base.trigger(_target, "swiping", _last) else directions =...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
f1276e9e4e5bd5f699543a08fadd37a515214174
2,055
https://github.com/soyjavi/QuoJS/blob/f1276e9e4e5bd5f699543a08fadd37a515214174/source/quo.gestures.swipe.coffee
51
75
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
_check = (moving, first_move = false) -> if moving if first_move then _start_axis = _getInitialAxis(_last.delta.x, _last.delta.y) if _start_axis isnt null base.trigger(_target, "swiping#{_start_axis}", _last) base.trigger(_target, "swiping", _last) else directions =...
if directions.length base.trigger(_target, "swipe", _last) base.trigger(_target, "swipe#{direction}", _last) for direction in directions _getInitialAxis = (x, y) -> axis = null if Math.round(Math.abs(x / y)) >= 2 then axis = "Horizontal" else if Math.round(Math.abs(y / x)) >= ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
f1276e9e4e5bd5f699543a08fadd37a515214174
2,055
https://github.com/soyjavi/QuoJS/blob/f1276e9e4e5bd5f699543a08fadd37a515214174/source/quo.gestures.swipe.coffee
51
75
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8
2,055
https://github.com/soyjavi/QuoJS/blob/a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8
2,055
https://github.com/soyjavi/QuoJS/blob/a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8
2,055
https://github.com/soyjavi/QuoJS/blob/a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8
2,055
https://github.com/soyjavi/QuoJS/blob/a56abf6a53e9aff80b2ce156d1690dd85c8c8ea8/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
51ff59a0a8df44b1ae2e4107ff5105e8e8298f74
2,055
https://github.com/soyjavi/QuoJS/blob/51ff59a0a8df44b1ae2e4107ff5105e8e8298f74/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
51ff59a0a8df44b1ae2e4107ff5105e8e8298f74
2,055
https://github.com/soyjavi/QuoJS/blob/51ff59a0a8df44b1ae2e4107ff5105e8e8298f74/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
51ff59a0a8df44b1ae2e4107ff5105e8e8298f74
2,055
https://github.com/soyjavi/QuoJS/blob/51ff59a0a8df44b1ae2e4107ff5105e8e8298f74/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
51ff59a0a8df44b1ae2e4107ff5105e8e8298f74
2,055
https://github.com/soyjavi/QuoJS/blob/51ff59a0a8df44b1ae2e4107ff5105e8e8298f74/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ef4a79667bc693ccc1f8e75dcb902652dc0dca28
2,055
https://github.com/soyjavi/QuoJS/blob/ef4a79667bc693ccc1f8e75dcb902652dc0dca28/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 console.log target delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _las...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ef4a79667bc693ccc1f8e75dcb902652dc0dca28
2,055
https://github.com/soyjavi/QuoJS/blob/ef4a79667bc693ccc1f8e75dcb902652dc0dca28/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
base.trigger(_target, "swiping#{_start_axis}", _last) base.trigger(_target, "swiping", _last) else directions = [] if Math.abs(_last.delta.y) > GAP directions.push(if _last.delta.y < 0 then "Up" else "Down") if Math.abs(_last.delta.x) > GAP directions.push(if _l...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ef4a79667bc693ccc1f8e75dcb902652dc0dca28
2,055
https://github.com/soyjavi/QuoJS/blob/ef4a79667bc693ccc1f8e75dcb902652dc0dca28/source/quo.gestures.swipe.coffee
51
71
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
base.trigger(_target, "swiping#{_start_axis}", _last) base.trigger(_target, "swiping", _last) else directions = [] if Math.abs(_last.delta.y) > GAP directions.push(if _last.delta.y < 0 then "Up" else "Down") if Math.abs(_last.delta.x) > GAP directions.push(if _l...
base.trigger(_target, "swipe#{direction}", _last) for direction in directions _getInitialAxis = (x, y) -> axis = null if Math.round(Math.abs(x / y)) >= 2 then axis = "Horizontal" else if Math.round(Math.abs(y / x)) >= 2 then axis = "Vertical" return axis start: start move: move ...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ef4a79667bc693ccc1f8e75dcb902652dc0dca28
2,055
https://github.com/soyjavi/QuoJS/blob/ef4a79667bc693ccc1f8e75dcb902652dc0dca28/source/quo.gestures.swipe.coffee
51
71
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gest...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "swipe", events: ["swipe", "swipeLeft",...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures....
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @namespace Quo.Gestures @class Swipe @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events : ["swipe", ...
start = (target, data) -> if data.length is 1 _target = target _start = data[0] _last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
else directions = [] if Math.abs(_last.delta.y) > GAP directions.push(if _last.delta.y < 0 then "Up" else "Down") if Math.abs(_last.delta.x) > GAP directions.push(if _last.delta.x < 0 then "Left" else "Right") if directions.length base.trigger(_target, "swip...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.swipe.coffee
51
69
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
else directions = [] if Math.abs(_last.delta.y) > GAP directions.push(if _last.delta.y < 0 then "Up" else "Down") if Math.abs(_last.delta.x) > GAP directions.push(if _last.delta.x < 0 then "Left" else "Right") if directions.length base.trigger(_target, "swip...
_getInitialAxis = (x, y) -> axis = null if Math.round(Math.abs(x / y)) >= 2 then axis = "Horizontal" else if Math.round(Math.abs(y / x)) >= 2 then axis = "Vertical" return axis start: start move: move end: end
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.swipe.coffee
51
69
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events : "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events ...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "swipe", events: "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,swipin...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "swipe", events: "swip...
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events : "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "swipe" events : "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,...
_last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0].y, delta: delta _check(true, is_first) else _last = null end = (target, data) -> if...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:raw_corpus
raw_corpus
if Math.abs(_last.delta.x) > TRIGGER_PIXELS directions.push(if _last.delta.x < 0 then "Left" else "Right") if directions.length gm.trigger(_target, "swipe", _last) gm.trigger(_target, "swipe#{direction}", _last) for direction in directions _getInitialAxis = (x, y) -> axi...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
51
65
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if Math.abs(_last.delta.x) > TRIGGER_PIXELS directions.push(if _last.delta.x < 0 then "Left" else "Right") if directions.length gm.trigger(_target, "swipe", _last) gm.trigger(_target, "swipe#{direction}", _last) for direction...
var _getInitialAxis, direction, i, len; if (Math.abs(_last.delta.x) > TRIGGER_PIXELS) { directions.push(_last.delta.x < 0 ? "Left" : "Right"); } if (directions.length) { gm.trigger(_target, "swipe", _last); for (i = 0, len = directions.length; i < len; i++) { direction = directions[i]; gm.trigger(_targe...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
51
65
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _getInitialAxis, direction, i, len; if (Math.abs(_last.delta.x) > TRIGGER_PIXELS) { directions.push(_last.delta.x < 0 ? "Left" : "Right"); } if (directions.length) { gm.trigger(_target, "swipe", _last); for (i = 0, len = directions.length; i < len; i++)...
if Math.abs(_last.delta.x) > TRIGGER_PIXELS directions.push(if _last.delta.x < 0 then "Left" else "Right") if directions.length gm.trigger(_target, "swipe", _last) gm.trigger(_target, "swipe#{direction}", _last) for direction in directions _getInitialAxis = (x, y) -> axi...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
51
65
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:2:completion
completion
if Math.abs(_last.delta.x) > TRIGGER_PIXELS directions.push(if _last.delta.x < 0 then "Left" else "Right") if directions.length gm.trigger(_target, "swipe", _last) gm.trigger(_target, "swipe#{direction}", _last) for direction in directions _getInitialAxis = (x, y) ->
axis = null if Math.round(Math.abs(x / y)) >= 2 then axis = "Horizontal" else if Math.round(Math.abs(y / x)) >= 2 then axis = "Vertical" return axis start: start move: move end: end
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.swipe.coffee
51
65
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,s...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events ...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "swipe", events: "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,swiping...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "swipe", events: "swipe...
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,s...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown New gestures added: swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : "swipe,swiping,swipeLeft,swipeRight,swipeUp,swipeDown,s...
_last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0].y, delta: delta _check(true, is_first) else _last = null end = (target, data) -> if...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:raw_corpus
raw_corpus
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown, swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : ["swipe", "swiping", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "s...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown, swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : ["swipe", "swipin...
/* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown, swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "swipe", events: ["swipe", "swiping", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "swiping...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown, swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "swipe", events: ["swipe", "swiping", "swi...
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown, swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : ["swipe", "swiping", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "s...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.swipe.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.swipe.coffee:1:completion
completion
### Quo Swipe Gestures: swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown, swipingHorizontal, swipingVertical @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "swipe" events : ["swipe", "swiping", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "s...
_last = null move = (target, data) -> if data.length is 1 delta = x: (data[0].x - _start.x), y: (data[0].y - _start.y) is_first = _last is null _last = x: data[0].x, y: data[0].y, delta: delta _check(true, is_first) else _last = null end = (target, data) -> if...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.swipe.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.swipe.coffee
1
50