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
xhan/qqbot:src/qqbot.coffee:1:raw_corpus
raw_corpus
class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # @format PROTOCOL `群用户信息` save_group...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
13
62
xhan/qqbot:src/qqbot.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@grou...
var QQBot; QQBot = class QQBot { constructor(name, auth) { this.name = name; this.auth = auth; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } // @format PROTOCOL `用户分组信息格式` save_buddy_info(buddy_info) { this.buddy_info = buddy_info; } // @format PROTOCOL...
CoffeeScript
JavaScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
13
62
xhan/qqbot:src/qqbot.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var QQBot; QQBot = class QQBot { constructor(name, auth) { this.name = name; this.auth = auth; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } // @format PROTOCOL `用户分组信息格式` save_buddy_info(buddy_info) { t...
class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # @format PROTOCOL `群用户信息` save_group...
JavaScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
13
62
xhan/qqbot:src/qqbot.coffee:1:completion
completion
class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # @format PROTOCOL `群用户信息` save_group...
# 获取群用户信息 get_user_ingroup: (uin, gid)-> info = @groupmember_info[gid] users = info.minfo.filter (item)-> item.uin == uin users.pop() # 获取群信息,只支持群 ,支持多关键词搜索 # @options {key:value} # @return {gid,code,name,flag} get_group: (options)-> groups = @group_info.gnamelist.f...
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
13
62
xhan/qqbot:src/qqbot.coffee:2:raw_corpus
raw_corpus
# 回复消息 # @param message 收到的message # @param content:string 回复信息 # @callback ret, error reply_message: (message, content, callback)-> if message.type == 'group' api.send_msg_2group message.from_gid , content , @auth, (ret,e)-> callback(ret,e) if callback else ...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
63
112
xhan/qqbot:src/qqbot.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # 回复消息 # @param message 收到的message # @param content:string 回复信息 # @callback ret, error reply_message: (message, content, callback)-> if message.type == 'group' api.send_msg_2group message.from_gid , content , @auth, (ret,e)-> ...
// 回复消息 // @param message 收到的message // @param content:string 回复信息 // @callback ret, error ({ reply_message: function(message, content, callback) { if (message.type === 'group') { return api.send_msg_2group(message.from_gid, content, this.auth, function(ret, e) { if (callback) { return cal...
CoffeeScript
JavaScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
63
112
xhan/qqbot:src/qqbot.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // 回复消息 // @param message 收到的message // @param content:string 回复信息 // @callback ret, error ({ reply_message: function(message, content, callback) { if (message.type === 'group') { return api.send_msg_2group(message.from_gid, content, this.auth, function...
# 回复消息 # @param message 收到的message # @param content:string 回复信息 # @callback ret, error reply_message: (message, content, callback)-> if message.type == 'group' api.send_msg_2group message.from_gid , content , @auth, (ret,e)-> callback(ret,e) if callback else ...
JavaScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
63
112
xhan/qqbot:src/qqbot.coffee:2:completion
completion
# 回复消息 # @param message 收到的message # @param content:string 回复信息 # @callback ret, error reply_message: (message, content, callback)-> if message.type == 'group' api.send_msg_2group message.from_gid , content , @auth, (ret,e)-> callback(ret,e) if callback else ...
_on_message : (event)-> msg = @_create_message event if msg.type == 'group' log "[群消息]","[#{msg.from_group.name}] #{msg.from_user.nick}:#{msg.content} #{msg.time}" else if msg.type == 'buddy' log "[好友消息]","#{msg.from_user.nick}:#{msg.content} #{msg.time}" # 消息处理 ...
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
63
112
xhan/qqbot:src/qqbot.coffee:3:raw_corpus
raw_corpus
msg.group_code = value.group_code msg.from_uin = value.send_uin # 这才是用户,group消息中 from_uin 是gid msg.from_group = @get_group( {gid:msg.from_gid} ) msg.from_user = @get_user_ingroup( msg.from_uin ,msg.from_gid ) else if msg.type == 'buddy' msg.from_user = @get_user(...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
113
125
xhan/qqbot:src/qqbot.coffee:3:completion
completion
msg.group_code = value.group_code msg.from_uin = value.send_uin # 这才是用户,group消息中 from_uin 是gid msg.from_group = @get_group( {gid:msg.from_gid} ) msg.from_user = @get_user_ingroup( msg.from_uin ,msg.from_gid ) else if msg.type == 'buddy' msg.from_user = @get_user(...
msg # class Message # constructor: (@struct)-> # @content = @struct.content.slice(-1).pop # @time = new Date(@struct.time * 1000)
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
8b77c6f73e033c264fe6405afb380924fb28e186
1,435
https://github.com/xhan/qqbot/blob/8b77c6f73e033c264fe6405afb380924fb28e186/src/qqbot.coffee
113
125
xhan/qqbot:src/qqbot.coffee:1:raw_corpus
raw_corpus
class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # @format PROTOCOL `群用户信息` save_group_...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
fa734d5e0d17033b6abf9877484aa3dfcb49692c
1,435
https://github.com/xhan/qqbot/blob/fa734d5e0d17033b6abf9877484aa3dfcb49692c/src/qqbot.coffee
7
56
xhan/qqbot:src/qqbot.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group...
var QQBot; QQBot = class QQBot { constructor(name, auth) { this.name = name; this.auth = auth; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } // @format PROTOCOL `用户分组信息格式` save_buddy_info(buddy_info) { this.buddy_info = buddy_info; } // @format PROTOCOL...
CoffeeScript
JavaScript
xhan/qqbot
src/qqbot.coffee
MIT
fa734d5e0d17033b6abf9877484aa3dfcb49692c
1,435
https://github.com/xhan/qqbot/blob/fa734d5e0d17033b6abf9877484aa3dfcb49692c/src/qqbot.coffee
7
56
xhan/qqbot:src/qqbot.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var QQBot; QQBot = class QQBot { constructor(name, auth) { this.name = name; this.auth = auth; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } // @format PROTOCOL `用户分组信息格式` save_buddy_info(buddy_info) { t...
class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # @format PROTOCOL `群用户信息` save_group_...
JavaScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
fa734d5e0d17033b6abf9877484aa3dfcb49692c
1,435
https://github.com/xhan/qqbot/blob/fa734d5e0d17033b6abf9877484aa3dfcb49692c/src/qqbot.coffee
7
56
xhan/qqbot:src/qqbot.coffee:1:completion
completion
class QQBot constructor: (@name ,@auth) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # @format PROTOCOL `群用户信息` save_group_...
get_user_ingroup: (uin, gid)-> info = @groupmember_info[gid] users = info.minfo.filter (item)-> item.uin == uin users.pop() # 获取群信息,只支持群 ,支持多关键词搜索 # @options {key:value} # @return {gid,code,name,flag} get_group: (options)-> groups = @group_info.gnamelist.filter (item)->...
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
fa734d5e0d17033b6abf9877484aa3dfcb49692c
1,435
https://github.com/xhan/qqbot/blob/fa734d5e0d17033b6abf9877484aa3dfcb49692c/src/qqbot.coffee
7
56
xhan/qqbot:src/qqbot.coffee:2:raw_corpus
raw_corpus
code = resp.retcode return if code != 0 for idx,event of resp.result @_handle_poll_event(event) _handle_poll_event : (event) -> switch event.poll_type when 'group_message' then @_on_group_message(event) when 'message' then @_on_message(event) ...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
fa734d5e0d17033b6abf9877484aa3dfcb49692c
1,435
https://github.com/xhan/qqbot/blob/fa734d5e0d17033b6abf9877484aa3dfcb49692c/src/qqbot.coffee
57
98
xhan/qqbot:src/qqbot.coffee:2:completion
completion
code = resp.retcode return if code != 0 for idx,event of resp.result @_handle_poll_event(event) _handle_poll_event : (event) -> switch event.poll_type when 'group_message' then @_on_group_message(event) when 'message' then @_on_message(event) ...
msg = content : value.content.slice(-1).pop() time : new Date(value.time * 1000) from_uin: value.from_uin type : if value.group_code then 'group' else 'buddy' if msg.type == 'group' msg.from_gid = msg.from_uin msg.group_code = value....
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
fa734d5e0d17033b6abf9877484aa3dfcb49692c
1,435
https://github.com/xhan/qqbot/blob/fa734d5e0d17033b6abf9877484aa3dfcb49692c/src/qqbot.coffee
57
98
xhan/qqbot:src/qqbot.coffee:1:raw_corpus
raw_corpus
log = console.log class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # 获取用户信息 # @return {nick,ui...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
1
50
xhan/qqbot:src/qqbot.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript log = console.log class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_in...
var QQBot, log; log = console.log; QQBot = class QQBot { constructor(name) { this.name = name; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } // @format PROTOCOL `用户分组信息格式` save_buddy_info(buddy_info) { this.buddy_info = buddy_info; } // @format PROTOCOL `群...
CoffeeScript
JavaScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
1
50
xhan/qqbot:src/qqbot.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var QQBot, log; log = console.log; QQBot = class QQBot { constructor(name) { this.name = name; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } // @format PROTOCOL `用户分组信息格式` save_buddy_info(buddy_info) { this...
log = console.log class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # 获取用户信息 # @return {nick,ui...
JavaScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
1
50
xhan/qqbot:src/qqbot.coffee:1:completion
completion
log = console.log class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info: (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info: (@group_info) -> # 获取用户信息 # @return {nick,ui...
get_group: (options)-> groups = @group_info.gnamelist.filter (item)-> for key ,value of options return item[key] == value groups.pop() handle_poll_responce: (resp)-> code = resp.retcode return if code != 0 for idx,event of resp.result ...
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
1
50
xhan/qqbot:src/qqbot.coffee:2:raw_corpus
raw_corpus
_create_message : (event)-> value = event.value msg = content : value.content.slice(-1).pop() time : new Date(value.time * 1000) from_uin: value.from_uin type : if value.group_code then 'group' else 'buddy' if msg.type == 'group' ...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
51
75
xhan/qqbot:src/qqbot.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _create_message : (event)-> value = event.value msg = content : value.content.slice(-1).pop() time : new Date(value.time * 1000) from_uin: value.from_uin type : if value.group_code then 'group'...
({ _create_message: function(event) { var msg, value; value = event.value; msg = { content: value.content.slice(-1).pop(), time: new Date(value.time * 1000), from_uin: value.from_uin, type: value.group_code ? 'group' : 'buddy' }; if (msg.type === 'group') { msg.from_g...
CoffeeScript
JavaScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
51
75
xhan/qqbot:src/qqbot.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ _create_message: function(event) { var msg, value; value = event.value; msg = { content: value.content.slice(-1).pop(), time: new Date(value.time * 1000), from_uin: value.from_uin, type: value.group_code ? 'group' : 'buddy' ...
_create_message : (event)-> value = event.value msg = content : value.content.slice(-1).pop() time : new Date(value.time * 1000) from_uin: value.from_uin type : if value.group_code then 'group' else 'buddy' if msg.type == 'group' ...
JavaScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
51
75
xhan/qqbot:src/qqbot.coffee:2:completion
completion
_create_message : (event)-> value = event.value msg = content : value.content.slice(-1).pop() time : new Date(value.time * 1000) from_uin: value.from_uin type : if value.group_code then 'group' else 'buddy' if msg.type == 'group' ...
msg.from_user = @get_user( msg.from_uin ) else if msg.type == 'buddy' msg.from_user = @get_user( msg.from_uin ) msg # class Message # constructor: (@struct)-> # @content = @struct.content.slice(-1).pop # @time = new Date(@struct.time * 1000) module.exports = QQBot
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
9b680f3805ecc875e3efa90a435dd458768e9fc3
1,435
https://github.com/xhan/qqbot/blob/9b680f3805ecc875e3efa90a435dd458768e9fc3/src/qqbot.coffee
51
75
xhan/qqbot:src/qqbot.coffee:1:raw_corpus
raw_corpus
jsons = JSON.stringify class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info = (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info = (@group_info) -> # 获取用户信息 # @return ...
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
60e369026ef8fbe0262a0e20b50891965092bf45
1,435
https://github.com/xhan/qqbot/blob/60e369026ef8fbe0262a0e20b50891965092bf45/src/qqbot.coffee
1
31
xhan/qqbot:src/qqbot.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript jsons = JSON.stringify class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info = (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_g...
var QQBot, jsons; jsons = JSON.stringify; QQBot = (function() { var get_group, get_user, save_buddy_info, save_group_info; class QQBot { constructor(name) { this.name = name; this.buddy_info = {}; this.group_info = {}; this.groupmember_info = {}; } }; // @format PROTOCOL `用户...
CoffeeScript
JavaScript
xhan/qqbot
src/qqbot.coffee
MIT
60e369026ef8fbe0262a0e20b50891965092bf45
1,435
https://github.com/xhan/qqbot/blob/60e369026ef8fbe0262a0e20b50891965092bf45/src/qqbot.coffee
1
31
xhan/qqbot:src/qqbot.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var QQBot, jsons; jsons = JSON.stringify; QQBot = (function() { var get_group, get_user, save_buddy_info, save_group_info; class QQBot { constructor(name) { this.name = name; this.buddy_info = {}; this.group_info = {}; this.groupm...
jsons = JSON.stringify class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info = (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info = (@group_info) -> # 获取用户信息 # @return ...
JavaScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
60e369026ef8fbe0262a0e20b50891965092bf45
1,435
https://github.com/xhan/qqbot/blob/60e369026ef8fbe0262a0e20b50891965092bf45/src/qqbot.coffee
1
31
xhan/qqbot:src/qqbot.coffee:1:completion
completion
jsons = JSON.stringify class QQBot constructor: (@name) -> @buddy_info = {} @group_info = {} @groupmember_info = {} # @format PROTOCOL `用户分组信息格式` save_buddy_info = (@buddy_info)-> # @format PROTOCOL `群分组信息格式` save_group_info = (@group_info) ->
# 获取用户信息 # @return {nick,uin,flag,face} get_user = (uin) -> # TODO:加速查询 users = @buddy_info.info.filter (item)-> item.uin == uin users.pop() # 获取群信息,只支持群 ,支持多关键词搜索 # @options {key:value} # @return {gid,code,name,flag} get_group = (options)-> groups = @group_inf...
CoffeeScript
CoffeeScript
xhan/qqbot
src/qqbot.coffee
MIT
60e369026ef8fbe0262a0e20b50891965092bf45
1,435
https://github.com/xhan/qqbot/blob/60e369026ef8fbe0262a0e20b50891965092bf45/src/qqbot.coffee
1
31
linemanjs/lineman:lib/testem-utils.coffee:1:raw_corpus
raw_corpus
fs = require("fs") module.exports = testemRunnerPath: (bin = true) -> testemPath = if bin then "node_modules/.bin/testem" else "node_modules/testem/testem.js" extension = if bin && require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}" lineman...
CoffeeScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require("fs") module.exports = testemRunnerPath: (bin = true) -> testemPath = if bin then "node_modules/.bin/testem" else "node_modules/testem/testem.js" extension = if bin && require('os').platform() == "win32" then ".cmd" else "" localPath =...
var fs; fs = require("fs"); module.exports = { testemRunnerPath: function(bin = true) { var extension, linemanPath, localPath, testemPath; testemPath = bin ? "node_modules/.bin/testem" : "node_modules/testem/testem.js"; extension = bin && require('os').platform() === "win32" ? ".cmd" : ""; localPath...
CoffeeScript
JavaScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fs; fs = require("fs"); module.exports = { testemRunnerPath: function(bin = true) { var extension, linemanPath, localPath, testemPath; testemPath = bin ? "node_modules/.bin/testem" : "node_modules/testem/testem.js"; extension = bin && require('o...
fs = require("fs") module.exports = testemRunnerPath: (bin = true) -> testemPath = if bin then "node_modules/.bin/testem" else "node_modules/testem/testem.js" extension = if bin && require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}" lineman...
JavaScript
CoffeeScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:completion
completion
fs = require("fs") module.exports = testemRunnerPath: (bin = true) -> testemPath = if bin then "node_modules/.bin/testem" else "node_modules/testem/testem.js" extension = if bin && require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}"
linemanPath = "#{__dirname}/../#{testemPath}#{extension}" if fs.existsSync(localPath) localPath else if fs.existsSync(linemanPath) linemanPath else throw "Testem runner wasn't found! Make sure it is installed locally to your project or under `node_modules/lineman`"
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:raw_corpus
raw_corpus
fs = require("fs") module.exports = testemRunnerPath: -> testemPath = "node_modules/.bin/testem" extension = if require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}" linemanPath = "#{__dirname}/../#{testemPath}#{extension}" if fs.existsSy...
CoffeeScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7
1,168
https://github.com/linemanjs/lineman/blob/f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require("fs") module.exports = testemRunnerPath: -> testemPath = "node_modules/.bin/testem" extension = if require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}" linemanPath = "#{__...
var fs; fs = require("fs"); module.exports = { testemRunnerPath: function() { var extension, linemanPath, localPath, testemPath; testemPath = "node_modules/.bin/testem"; extension = require('os').platform() === "win32" ? ".cmd" : ""; localPath = `${process.cwd()}/${testemPath}${extension}`; line...
CoffeeScript
JavaScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7
1,168
https://github.com/linemanjs/lineman/blob/f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fs; fs = require("fs"); module.exports = { testemRunnerPath: function() { var extension, linemanPath, localPath, testemPath; testemPath = "node_modules/.bin/testem"; extension = require('os').platform() === "win32" ? ".cmd" : ""; localPath =...
fs = require("fs") module.exports = testemRunnerPath: -> testemPath = "node_modules/.bin/testem" extension = if require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}" linemanPath = "#{__dirname}/../#{testemPath}#{extension}" if fs.existsSy...
JavaScript
CoffeeScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7
1,168
https://github.com/linemanjs/lineman/blob/f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7/lib/testem-utils.coffee
1
14
linemanjs/lineman:lib/testem-utils.coffee:1:completion
completion
fs = require("fs") module.exports = testemRunnerPath: -> testemPath = "node_modules/.bin/testem" extension = if require('os').platform() == "win32" then ".cmd" else "" localPath = "#{process.cwd()}/#{testemPath}#{extension}"
linemanPath = "#{__dirname}/../#{testemPath}#{extension}" if fs.existsSync(localPath) localPath else if fs.existsSync(linemanPath) linemanPath else throw "Testem runner wasn't found! Make sure it is installed locally to your project or under `node_modules/lineman`"
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/testem-utils.coffee
MIT
f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7
1,168
https://github.com/linemanjs/lineman/blob/f7cd7c7dab8c7c8b9b507174fafedaedca3e7cc7/lib/testem-utils.coffee
1
14
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:completion
completion
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# Directive that hides an element unless authentication # is enabled and the user is logged in cyclotronDirectives.directive 'requiresLogin', (userService) -> { restrict: 'CA' link: (scope, element, attrs) -> $(element).hide() unless userService.authEnabled and userService.isLoggedIn() ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653
1,544
https://github.com/ExpediaGroup/cyclotron/blob/34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653
1,544
https://github.com/ExpediaGroup/cyclotron/blob/34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653
1,544
https://github.com/ExpediaGroup/cyclotron/blob/34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:completion
completion
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# Directive that hides an element unless authentication # is enabled and the user is logged in cyclotronDirectives.directive 'requiresLogin', (userService) -> { restrict: 'CA' link: (scope, element, attrs) -> $(element).hide() unless userService.authEnabled and userService.isLoggedIn() ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653
1,544
https://github.com/ExpediaGroup/cyclotron/blob/34dcd01e4f37b8a9bf5e90cc7ac65d7b51c62653/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee:1:completion
completion
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# Directive that hides an element unless authentication # is enabled and the user is logged in cyclotronDirectives.directive 'requiresLogin', (userService) -> { restrict: 'CA' link: (scope, element, attrs) -> $(element).hide() unless userService.authEnabled and userService.isLoggedIn() ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
MIT
d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/common/directives/directives.requiresLogin.coffee
1
30
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'verify-mobile' propTypes: store: React.PropTypes.instanceOf(Immutable.Map).isRequired onResend: React.PropTypes.func.isRequired onVerify: React.PropTypes.func.isRequired onBack: React.PropTypes.func.isRequired error: React.PropTypes.string is...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
13
62
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'verify-mobile' propTypes: store: React.PropTypes.instanceOf(Immutable.Map).isRequired onResend: React.PropTypes.func.isRequired onVerify: React.PropTypes.func.isRequired onBack: React.PropTypes...
module.exports = React.createClass({ displayName: 'verify-mobile', propTypes: { store: React.PropTypes.instanceOf(Immutable.Map).isRequired, onResend: React.PropTypes.func.isRequired, onVerify: React.PropTypes.func.isRequired, onBack: React.PropTypes.func.isRequired, error: React.PropTypes.strin...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
13
62
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'verify-mobile', propTypes: { store: React.PropTypes.instanceOf(Immutable.Map).isRequired, onResend: React.PropTypes.func.isRequired, onVerify: React.PropTypes.func.isRequired, onBack: React.Prop...
module.exports = React.createClass displayName: 'verify-mobile' propTypes: store: React.PropTypes.instanceOf(Immutable.Map).isRequired onResend: React.PropTypes.func.isRequired onVerify: React.PropTypes.func.isRequired onBack: React.PropTypes.func.isRequired error: React.PropTypes.string is...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
13
62
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:1:completion
completion
module.exports = React.createClass displayName: 'verify-mobile' propTypes: store: React.PropTypes.instanceOf(Immutable.Map).isRequired onResend: React.PropTypes.func.isRequired onVerify: React.PropTypes.func.isRequired onBack: React.PropTypes.func.isRequired error: React.PropTypes.string is...
getLanguage: -> @props.store.getIn ['client', 'language'] startTimer: -> @timer = setInterval @countdown, 1000 countdown: -> if @state.countdown > 1 @setState countdown: @state.countdown - 1 else clearInterval @timer @timer = null @setState countdown: 0 onCodeChange: (ev...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
13
62
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:2:raw_corpus
raw_corpus
if @state.countdown is 0 @props.onResend() @setState countdown: 60 @startTimer() onMobileChange: (account) -> controllers.updateAccount account onSubmit: (event) -> event.preventDefault() @onVerify() render: -> form className: 'verify-mobile control-panel vbox', onSubmit: @onS...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
63
106
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if @state.countdown is 0 @props.onResend() @setState countdown: 60 @startTimer() onMobileChange: (account) -> controllers.updateAccount account onSubmit: (event) -> event.preventDefault() @onVerify() render: -> form clas...
if (this.state.countdown === 0) { this.props.onResend(); this.setState({ countdown: 60 }); this.startTimer(); } ({ onMobileChange: function(account) { return controllers.updateAccount(account); }, onSubmit: function(event) { event.preventDefault(); return this.onVerify(); }, render: f...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
63
106
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (this.state.countdown === 0) { this.props.onResend(); this.setState({ countdown: 60 }); this.startTimer(); } ({ onMobileChange: function(account) { return controllers.updateAccount(account); }, onSubmit: function(event) { event.prevent...
if @state.countdown is 0 @props.onResend() @setState countdown: 60 @startTimer() onMobileChange: (account) -> controllers.updateAccount account onSubmit: (event) -> event.preventDefault() @onVerify() render: -> form className: 'verify-mobile control-panel vbox', onSubmit: @onS...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
63
106
jianliaoim/talk-os:talk-account/client/app/verify-mobile.coffee:2:completion
completion
if @state.countdown is 0 @props.onResend() @setState countdown: 60 @startTimer() onMobileChange: (account) -> controllers.updateAccount account onSubmit: (event) -> event.preventDefault() @onVerify() render: -> form className: 'verify-mobile control-panel vbox', onSubmit: @onS...
input value: @state.verifyCode, onChange: @onCodeChange type: 'text', placeholder: locales.get('verifyCode', @getLanguage()) if @state.countdown > 1 span className: 'resend-button is-disabled', locales.get('resend', @getLanguage()) "(#{@state.countdown})" ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/verify-mobile.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/verify-mobile.coffee
63
106
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. on...
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mou...
var DragManager, _; _ = require("underscore"); /* These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse ...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var DragManager, _; _ = require("underscore"); /* These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user h...
_ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. on...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:completion
completion
_ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. on...
@drag = null window.addEventListener("mousemove", @_onMouseMove) window.addEventListener("mouseup", @_onMouseUp) start: (mouseDownEvent, spec) -> @drag = new Drag(mouseDownEvent, spec) _onMouseMove: (mouseMoveEvent) => return unless @drag if !@drag.consummated # Check if we should consum...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:2:raw_corpus
raw_corpus
@drag.onUp?(mouseUpEvent) @drag = null _consummate: (mouseMoveEvent) -> @drag.consummated = true @drag.onConsummate?(mouseMoveEvent) class Drag constructor: (mouseDownEvent, spec) -> _.extend(this, spec) @originalX = mouseDownEvent.clientX @originalY = mouseDownEvent.clientY @consumma...
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Manager/DragManager.coffee
51
64
cdglabs/apparatus:src/View/Manager/DragManager.coffee:2:completion
completion
@drag.onUp?(mouseUpEvent) @drag = null _consummate: (mouseMoveEvent) -> @drag.consummated = true @drag.onConsummate?(mouseMoveEvent)
class Drag constructor: (mouseDownEvent, spec) -> _.extend(this, spec) @originalX = mouseDownEvent.clientX @originalY = mouseDownEvent.clientY @consummated ?= false
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Manager/DragManager.coffee
51
64
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. on...
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
01049dcb97930be93d691b90680b2de929afeb4c
1,052
https://github.com/cdglabs/apparatus/blob/01049dcb97930be93d691b90680b2de929afeb4c/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mou...
var DragManager, _; _ = require("underscore"); /* These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse ...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
01049dcb97930be93d691b90680b2de929afeb4c
1,052
https://github.com/cdglabs/apparatus/blob/01049dcb97930be93d691b90680b2de929afeb4c/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var DragManager, _; _ = require("underscore"); /* These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user h...
_ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. on...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
01049dcb97930be93d691b90680b2de929afeb4c
1,052
https://github.com/cdglabs/apparatus/blob/01049dcb97930be93d691b90680b2de929afeb4c/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:completion
completion
_ = require "underscore" ### These are the options you can pass in to DragManager.start: cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. on...
constructor: -> @drag = null window.addEventListener("mousemove", @_onMouseMove) window.addEventListener("mouseup", @_onMouseUp) start: (mouseDownEvent, spec) -> @drag = new Drag(mouseDownEvent, spec) _onMouseMove: (mouseMoveEvent) => return unless @drag if !@drag.consummated # Check...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
01049dcb97930be93d691b90680b2de929afeb4c
1,052
https://github.com/cdglabs/apparatus/blob/01049dcb97930be93d691b90680b2de929afeb4c/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:2:raw_corpus
raw_corpus
@drag.onCancel?(mouseUpEvent) @drag.onUp?(mouseUpEvent) @drag = null _consummate: (mouseMoveEvent) -> @drag.consummated = true @drag.onConsummate?(mouseMoveEvent) class Drag constructor: (mouseDownEvent, spec) -> _.extend(this, spec) @originalX = mouseDownEvent.clientX @originalY = mo...
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
01049dcb97930be93d691b90680b2de929afeb4c
1,052
https://github.com/cdglabs/apparatus/blob/01049dcb97930be93d691b90680b2de929afeb4c/src/View/Manager/DragManager.coffee
51
65
cdglabs/apparatus:src/View/Manager/DragManager.coffee:2:completion
completion
@drag.onCancel?(mouseUpEvent) @drag.onUp?(mouseUpEvent) @drag = null _consummate: (mouseMoveEvent) -> @drag.consummated = true @drag.onConsummate?(mouseMoveEvent)
class Drag constructor: (mouseDownEvent, spec) -> _.extend(this, spec) @originalX = mouseDownEvent.clientX @originalY = mouseDownEvent.clientY @consummated ?= false
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
01049dcb97930be93d691b90680b2de929afeb4c
1,052
https://github.com/cdglabs/apparatus/blob/01049dcb97930be93d691b90680b2de929afeb4c/src/View/Manager/DragManager.coffee
51
65
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:raw_corpus
raw_corpus
_ = require "underscore" ### cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. onMove(mouseMoveEvent): Will be called repeatedly, every time t...
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
fec1d030f1711c9a6b08ef756b8e506fc5bdf862
1,052
https://github.com/cdglabs/apparatus/blob/fec1d030f1711c9a6b08ef756b8e506fc5bdf862/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require "underscore" ### cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. onMove...
var DragManager, _; _ = require("underscore"); /* cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. onMove(mouseMoveEvent): Will be called re...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
fec1d030f1711c9a6b08ef756b8e506fc5bdf862
1,052
https://github.com/cdglabs/apparatus/blob/fec1d030f1711c9a6b08ef756b8e506fc5bdf862/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var DragManager, _; _ = require("underscore"); /* cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down l...
_ = require "underscore" ### cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. onMove(mouseMoveEvent): Will be called repeatedly, every time t...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
fec1d030f1711c9a6b08ef756b8e506fc5bdf862
1,052
https://github.com/cdglabs/apparatus/blob/fec1d030f1711c9a6b08ef756b8e506fc5bdf862/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:1:completion
completion
_ = require "underscore" ### cursor: (String) Sets the global cursor for the duration of the drag gesture. onConsummate(mouseMoveEvent): Will be called once the user has moved the mouse 3 pixels from the initial mouse down location. onMove(mouseMoveEvent): Will be called repeatedly, every time t...
window.addEventListener("mousemove", @_onMouseMove) window.addEventListener("mouseup", @_onMouseUp) start: (mouseDownEvent, spec) -> @drag = new Drag(mouseDownEvent, spec) _onMouseMove: (mouseMoveEvent) => return unless @drag if !@drag.consummated # Check if we should consummate. dx = ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
fec1d030f1711c9a6b08ef756b8e506fc5bdf862
1,052
https://github.com/cdglabs/apparatus/blob/fec1d030f1711c9a6b08ef756b8e506fc5bdf862/src/View/Manager/DragManager.coffee
1
50
cdglabs/apparatus:src/View/Manager/DragManager.coffee:2:raw_corpus
raw_corpus
@drag = null _consummate: (mouseMoveEvent) -> @drag.consummated = true @drag.onConsummate?(mouseMoveEvent) class Drag constructor: (mouseDownEvent, spec) -> _.extend(this, spec) @originalX = mouseDownEvent.clientX @originalY = mouseDownEvent.clientY @consummated ?= false
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
fec1d030f1711c9a6b08ef756b8e506fc5bdf862
1,052
https://github.com/cdglabs/apparatus/blob/fec1d030f1711c9a6b08ef756b8e506fc5bdf862/src/View/Manager/DragManager.coffee
51
63
cdglabs/apparatus:src/View/Manager/DragManager.coffee:2:completion
completion
@drag = null _consummate: (mouseMoveEvent) -> @drag.consummated = true @drag.onConsummate?(mouseMoveEvent)
class Drag constructor: (mouseDownEvent, spec) -> _.extend(this, spec) @originalX = mouseDownEvent.clientX @originalY = mouseDownEvent.clientY @consummated ?= false
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/Manager/DragManager.coffee
MIT
fec1d030f1711c9a6b08ef756b8e506fc5bdf862
1,052
https://github.com/cdglabs/apparatus/blob/fec1d030f1711c9a6b08ef756b8e506fc5bdf862/src/View/Manager/DragManager.coffee
51
63
flosse/sloc:spec/formatters/simple.spec.coffee:1:raw_corpus
raw_corpus
chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", -> it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple(summary: {}, files: []).should.be.a 'string'
CoffeeScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", -> it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple(summary: {...
var chai, should, simple; chai = require('chai'); simple = require('../../src/formatters/simple'); should = chai.should(); describe("The simple formatter", function() { it("should be a function", function() { return simple.should.be.a('function'); }); return it("should return a string", function() { r...
CoffeeScript
JavaScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var chai, should, simple; chai = require('chai'); simple = require('../../src/formatters/simple'); should = chai.should(); describe("The simple formatter", function() { it("should be a function", function() { return simple.should.be.a('function'); }); ...
chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", -> it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple(summary: {}, files: []).should.be.a 'string'
JavaScript
CoffeeScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:completion
completion
chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", ->
it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple(summary: {}, files: []).should.be.a 'string'
CoffeeScript
CoffeeScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:raw_corpus
raw_corpus
chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", -> it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple({}).should.be.a 'string'
CoffeeScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
eb0a4abec74996bf99b28d7a703f6272e612dc07
969
https://github.com/flosse/sloc/blob/eb0a4abec74996bf99b28d7a703f6272e612dc07/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", -> it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple({}).should...
var chai, should, simple; chai = require('chai'); simple = require('../../src/formatters/simple'); should = chai.should(); describe("The simple formatter", function() { it("should be a function", function() { return simple.should.be.a('function'); }); return it("should return a string", function() { r...
CoffeeScript
JavaScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
eb0a4abec74996bf99b28d7a703f6272e612dc07
969
https://github.com/flosse/sloc/blob/eb0a4abec74996bf99b28d7a703f6272e612dc07/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var chai, should, simple; chai = require('chai'); simple = require('../../src/formatters/simple'); should = chai.should(); describe("The simple formatter", function() { it("should be a function", function() { return simple.should.be.a('function'); }); ...
chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", -> it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple({}).should.be.a 'string'
JavaScript
CoffeeScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
eb0a4abec74996bf99b28d7a703f6272e612dc07
969
https://github.com/flosse/sloc/blob/eb0a4abec74996bf99b28d7a703f6272e612dc07/spec/formatters/simple.spec.coffee
1
11
flosse/sloc:spec/formatters/simple.spec.coffee:1:completion
completion
chai = require 'chai' simple = require '../../src/formatters/simple' should = chai.should() describe "The simple formatter", ->
it "should be a function", -> simple.should.be.a 'function' it "should return a string", -> simple({}).should.be.a 'string'
CoffeeScript
CoffeeScript
flosse/sloc
spec/formatters/simple.spec.coffee
MIT
eb0a4abec74996bf99b28d7a703f6272e612dc07
969
https://github.com/flosse/sloc/blob/eb0a4abec74996bf99b28d7a703f6272e612dc07/spec/formatters/simple.spec.coffee
1
11
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:raw_corpus
raw_corpus
describe 'builder.provider', -> beforeEach module('builder') describe 'fbFormObjectEditableController', -> $scope = null controller = null beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() controller = $controller 'fbFormObjectEditableCo...
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
1
41
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'builder.provider', -> beforeEach module('builder') describe 'fbFormObjectEditableController', -> $scope = null controller = null beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() ...
describe('builder.provider', function() { beforeEach(module('builder')); return describe('fbFormObjectEditableController', function() { var $scope, controller; $scope = null; controller = null; beforeEach(inject(function($rootScope, $controller) { $scope = $rootScope.$new(); return contr...
CoffeeScript
JavaScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
1
41
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('builder.provider', function() { beforeEach(module('builder')); return describe('fbFormObjectEditableController', function() { var $scope, controller; $scope = null; controller = null; beforeEach(inject(function($rootScope, $controller)...
describe 'builder.provider', -> beforeEach module('builder') describe 'fbFormObjectEditableController', -> $scope = null controller = null beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() controller = $controller 'fbFormObjectEditableCo...
JavaScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
1
41
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:completion
completion
describe 'builder.provider', -> beforeEach module('builder') describe 'fbFormObjectEditableController', -> $scope = null controller = null beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() controller = $controller 'fbFormObjectEditableCo...
description: 'description' placeholder: 'placeholder' required: no options: ['value one', 'two'] $scope.setupScope formObject it '$scope.setupScope(formObject) copy properties from formObject without `$$hashKey`', -> ...
CoffeeScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
1
41
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:2:raw_corpus
raw_corpus
$scope.description = 'new' $scope.$digest() expect(formObject.description).toEqual $scope.description $scope.placeholder = 'new' $scope.$digest() expect(formObject.placeholder).toEqual $scope.placeholder $scope.required = ...
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
43
89
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:2:completion
completion
$scope.description = 'new' $scope.$digest() expect(formObject.description).toEqual $scope.description $scope.placeholder = 'new' $scope.$digest() expect(formObject.placeholder).toEqual $scope.placeholder $scope.required = ...
formObject = null beforeEach -> formObject = $$hashKey: '007' label: 'label' description: 'description' placeholder: 'placeholder' required: no options: ['value one', 'two...
CoffeeScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
43
89
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:raw_corpus
raw_corpus
it '$scope after call $scope.data.rollback()', -> $scope.data.backup() $scope.label = '' $scope.description = '' $scope.placeholder = '' $scope.required = yes $scope.optionsText = '' $scope.data.rollback() ...
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
91
130
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it '$scope after call $scope.data.rollback()', -> $scope.data.backup() $scope.label = '' $scope.description = '' $scope.placeholder = '' $scope.required = yes $scope.o...
it('$scope after call $scope.data.rollback()', function() { $scope.data.backup(); $scope.label = ''; $scope.description = ''; $scope.placeholder = ''; $scope.required = true; $scope.optionsText = ''; $scope.data.rollback(); $scope.$digest(); expect(formObject.label).toEqual($scope.label); expect(for...
CoffeeScript
JavaScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
91
130
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('$scope after call $scope.data.rollback()', function() { $scope.data.backup(); $scope.label = ''; $scope.description = ''; $scope.placeholder = ''; $scope.required = true; $scope.optionsText = ''; $scope.data.rollback(); $scope.$digest(); expec...
it '$scope after call $scope.data.rollback()', -> $scope.data.backup() $scope.label = '' $scope.description = '' $scope.placeholder = '' $scope.required = yes $scope.optionsText = '' $scope.data.rollback() ...
JavaScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
91
130
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:completion
completion
it '$scope after call $scope.data.rollback()', -> $scope.data.backup() $scope.label = '' $scope.description = '' $scope.placeholder = '' $scope.required = yes $scope.optionsText = '' $scope.data.rollback() ...
beforeEach inject ($rootScope, $controller, $builder) -> $builder.registerComponent 'inputText', template: "<div class='form-group'></div>" popoverTemplate: "<div class='form-group'></div>" $scope = $rootScope.$new() controller = $controller 'fbCompon...
CoffeeScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
91
130
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:raw_corpus
raw_corpus
it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) -> spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) -> expect($event).toBeNull() expect($scope.activeGroup).toEqual activeGroup $builder.registerComponen...
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
132
180
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) -> spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) -> expect($event).toBeNull() expect($scope.activeGroup).toEq...
it('$watch $scope.allComponents than call $scope.selectGroup', inject(function($builder) { spyOn($scope, 'selectGroup').andCallFake(function($event, activeGroup) { expect($event).toBeNull(); return expect($scope.activeGroup).toEqual(activeGroup); }); $builder.registerComponent('newComponent', { templa...
CoffeeScript
JavaScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
132
180
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('$watch $scope.allComponents than call $scope.selectGroup', inject(function($builder) { spyOn($scope, 'selectGroup').andCallFake(function($event, activeGroup) { expect($event).toBeNull(); return expect($scope.activeGroup).toEqual(activeGroup); }); ...
it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) -> spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) -> expect($event).toBeNull() expect($scope.activeGroup).toEqual activeGroup $builder.registerComponen...
JavaScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
132
180
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:completion
completion
it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) -> spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) -> expect($event).toBeNull() expect($scope.activeGroup).toEqual activeGroup $builder.registerComponen...
describe 'fbComponentController', -> $scope = null controller = null beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() controller = $controller 'fbComponentController', $scope: $scope describe '$scope.copyObjectToScope()',...
CoffeeScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
132
180
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:5:raw_corpus
raw_corpus
it '$scope.copyObjectToScope(component) copy properties to $scope without `$$hashKey`', -> $scope.copyObjectToScope component expect($scope.$$hashKey).toBeUndefined() expect(component.name).toEqual $scope.name expect(component.label).toEqual $scope.label ...
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
182
192
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it '$scope.copyObjectToScope(component) copy properties to $scope without `$$hashKey`', -> $scope.copyObjectToScope component expect($scope.$$hashKey).toBeUndefined() expect(component.name).toEqual $scope.name ...
it('$scope.copyObjectToScope(component) copy properties to $scope without `$$hashKey`', function() { $scope.copyObjectToScope(component); expect($scope.$$hashKey).toBeUndefined(); expect(component.name).toEqual($scope.name); expect(component.label).toEqual($scope.label); expect(component.description).toEqual(...
CoffeeScript
JavaScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
182
192
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('$scope.copyObjectToScope(component) copy properties to $scope without `$$hashKey`', function() { $scope.copyObjectToScope(component); expect($scope.$$hashKey).toBeUndefined(); expect(component.name).toEqual($scope.name); expect(component.label).toEqual(...
it '$scope.copyObjectToScope(component) copy properties to $scope without `$$hashKey`', -> $scope.copyObjectToScope component expect($scope.$$hashKey).toBeUndefined() expect(component.name).toEqual $scope.name expect(component.label).toEqual $scope.label ...
JavaScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
182
192
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:5:completion
completion
it '$scope.copyObjectToScope(component) copy properties to $scope without `$$hashKey`', -> $scope.copyObjectToScope component expect($scope.$$hashKey).toBeUndefined() expect(component.name).toEqual $scope.name expect(component.label).toEqual $scope.label
expect(component.description).toEqual $scope.description expect(component.placeholder).toEqual $scope.placeholder expect(component.required).toBe no expect(component.options).toEqual $scope.options expect(component.template).toEqual $scope.template ...
CoffeeScript
CoffeeScript
kelp404/angular-form-builder
test/specs/controllerSpec.coffee
MIT
5470e7835f171d7e314e82c93a3f8c8ae2ff134e
600
https://github.com/kelp404/angular-form-builder/blob/5470e7835f171d7e314e82c93a3f8c8ae2ff134e/test/specs/controllerSpec.coffee
182
192