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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scalaParser, supportExts;
helpers = require('../helpers');
... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scala... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | try
commit = JSON.parse commit if 'string' is helpers.extractType commit
commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionToken... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:2:raw_corpus | raw_corpus | supportExts.some (elem) ->
elem is ext
getParser = (ext) ->
switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 51 | 59 | ||
outsideris/popularconvention:src/parser/parser.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
supportExts.some (elem) ->
elem is ext
getParser = (ext) ->
switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser
``` | var getParser;
supportExts.some(function(elem) {
return elem === ext;
});
getParser = function(ext) {
switch (ext) {
case '.js':
return jsParser;
case '.java':
return javaParser;
case '.py':
return pythonParser;
case '.scala':
return scalaParser;
}
}; | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 51 | 59 |
outsideris/popularconvention:src/parser/parser.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var getParser;
supportExts.some(function(elem) {
return elem === ext;
});
getParser = function(ext) {
switch (ext) {
case '.js':
return jsParser;
case '.java':
return javaParser;
case '.py':
return pythonParser;
case '.scala'... | supportExts.some (elem) ->
elem is ext
getParser = (ext) ->
switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 51 | 59 |
outsideris/popularconvention:src/parser/parser.coffee:2:completion | completion | supportExts.some (elem) ->
elem is ext
getParser = (ext) -> | switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 8e22316359ae8613b414e5650c95b107a20fec4e | 730 | https://github.com/outsideris/popularconvention/blob/8e22316359ae8613b414e5650c95b107a20fec4e/src/parser/parser.coffee | 51 | 59 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 1 | 50 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scalaParser, supportExts;
helpers = require('../... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonPa... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | commit = JSON.parse commit if 'string' is helpers.extractType commit
commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
l... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:2:raw_corpus | raw_corpus | switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 51 | 55 | ||
outsideris/popularconvention:src/parser/parser.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser
``` | switch (ext) {
case '.js':
jsParser;
break;
case '.java':
javaParser;
break;
case '.py':
pythonParser;
break;
case '.scala':
scalaParser;
} | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 51 | 55 |
outsideris/popularconvention:src/parser/parser.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
switch (ext) {
case '.js':
jsParser;
break;
case '.java':
javaParser;
break;
case '.py':
pythonParser;
break;
case '.scala':
scalaParser;
}
``` | switch ext
when '.js' then jsParser
when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 51 | 55 |
outsideris/popularconvention:src/parser/parser.coffee:2:completion | completion | switch ext
when '.js' then jsParser | when '.java' then javaParser
when '.py' then pythonParser
when '.scala' then scalaParser | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 2891d3b8a72f65472b0ade74deef12b441efae30 | 730 | https://github.com/outsideris/popularconvention/blob/2891d3b8a72f65472b0ade74deef12b441efae30/src/parser/parser.coffee | 51 | 55 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 01ce684e0ef60f1eb95df2428d6161ab92e73e03 | 730 | https://github.com/outsideris/popularconvention/blob/01ce684e0ef60f1eb95df2428d6161ab92e73e03/src/parser/parser.coffee | 1 | 50 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scalaParser, supportExts;
helpers = require('../... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 01ce684e0ef60f1eb95df2428d6161ab92e73e03 | 730 | https://github.com/outsideris/popularconvention/blob/01ce684e0ef60f1eb95df2428d6161ab92e73e03/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonPa... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 01ce684e0ef60f1eb95df2428d6161ab92e73e03 | 730 | https://github.com/outsideris/popularconvention/blob/01ce684e0ef60f1eb95df2428d6161ab92e73e03/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | commit = JSON.parse commit if 'string' is helpers.extractType commit
commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
l... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 01ce684e0ef60f1eb95df2428d6161ab92e73e03 | 730 | https://github.com/outsideris/popularconvention/blob/01ce684e0ef60f1eb95df2428d6161ab92e73e03/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | fc12520fbf539039d9a39e490b2adec9b441cd5e | 730 | https://github.com/outsideris/popularconvention/blob/fc12520fbf539039d9a39e490b2adec9b441cd5e/src/parser/parser.coffee | 1 | 50 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scalaParser, supportExts;
helpers = require('../helpers');
... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | fc12520fbf539039d9a39e490b2adec9b441cd5e | 730 | https://github.com/outsideris/popularconvention/blob/fc12520fbf539039d9a39e490b2adec9b441cd5e/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scala... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | fc12520fbf539039d9a39e490b2adec9b441cd5e | 730 | https://github.com/outsideris/popularconvention/blob/fc12520fbf539039d9a39e490b2adec9b441cd5e/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | try
commit = JSON.parse commit if 'string' is helpers.extractType commit
commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionToken... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | fc12520fbf539039d9a39e490b2adec9b441cd5e | 730 | https://github.com/outsideris/popularconvention/blob/fc12520fbf539039d9a39e490b2adec9b441cd5e/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 13f9559cf4e61dac48c68bda284054d9df65c2e9 | 730 | https://github.com/outsideris/popularconvention/blob/13f9559cf4e61dac48c68bda284054d9df65c2e9/src/parser/parser.coffee | 1 | 50 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, scalaParser, supportExts;
helpers = require('../... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 13f9559cf4e61dac48c68bda284054d9df65c2e9 | 730 | https://github.com/outsideris/popularconvention/blob/13f9559cf4e61dac48c68bda284054d9df65c2e9/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonPa... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 13f9559cf4e61dac48c68bda284054d9df65c2e9 | 730 | https://github.com/outsideris/popularconvention/blob/13f9559cf4e61dac48c68bda284054d9df65c2e9/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | conventions = []
commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
lines.forEach (line) ->
convention = psr.pa... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 13f9559cf4e61dac48c68bda284054d9df65c2e9 | 730 | https://github.com/outsideris/popularconvention/blob/13f9559cf4e61dac48c68bda284054d9df65c2e9/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 6cda5bc66b67b8d18b96b7ff634f065d9086bffa | 730 | https://github.com/outsideris/popularconvention/blob/6cda5bc66b67b8d18b96b7ff634f065d9086bffa/src/parser/parser.coffee | 1 | 50 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonParser, supportExts;
helpers = require('../helpers');
p... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 6cda5bc66b67b8d18b96b7ff634f065d9086bffa | 730 | https://github.com/outsideris/popularconvention/blob/6cda5bc66b67b8d18b96b7ff634f065d9086bffa/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, pythonPa... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 6cda5bc66b67b8d18b96b7ff634f065d9086bffa | 730 | https://github.com/outsideris/popularconvention/blob/6cda5bc66b67b8d18b96b7ff634f065d9086bffa/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
lines.forEach (line) ->
convention = psr.parse line, convention,... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | 6cda5bc66b67b8d18b96b7ff634f065d9086bffa | 730 | https://github.com/outsideris/popularconvention/blob/6cda5bc66b67b8d18b96b7ff634f065d9086bffa/src/parser/parser.coffee | 1 | 50 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b6b9c9127c12dd0cde36594fe995fa257b6f692c | 730 | https://github.com/outsideris/popularconvention/blob/b6b9c9127c12dd0cde36594fe995fa257b6f692c/src/parser/parser.coffee | 1 | 49 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logge... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, supportExts;
helpers = require('../helpers');
path = require(... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b6b9c9127c12dd0cde36594fe995fa257b6f692c | 730 | https://github.com/outsideris/popularconvention/blob/b6b9c9127c12dd0cde36594fe995fa257b6f692c/src/parser/parser.coffee | 1 | 49 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, javaParser, jsParser, logger, parser, path, supportE... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b6b9c9127c12dd0cde36594fe995fa257b6f692c | 730 | https://github.com/outsideris/popularconvention/blob/b6b9c9127c12dd0cde36594fe995fa257b6f692c/src/parser/parser.coffee | 1 | 49 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
logger = (require '../helpers').logger
jsParser = require './js-parser'
javaParser = require '... | commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
lines.forEach (line) ->
convention = psr.parse line, convention,... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b6b9c9127c12dd0cde36594fe995fa257b6f692c | 730 | https://github.com/outsideris/popularconvention/blob/b6b9c9127c12dd0cde36594fe995fa257b6f692c/src/parser/parser.coffee | 1 | 49 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logger = (require '../helpers').logger
parser = module.expor... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b236618ce63c4d151a3e204ffe8b5d8a9758c534 | 730 | https://github.com/outsideris/popularconvention/blob/b236618ce63c4d151a3e204ffe8b5d8a9758c534/src/parser/parser.coffee | 1 | 46 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logg... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, jsParser, logger, parser, path, supportExts;
helpers = require('../helpers');
path = require('path');
js... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b236618ce63c4d151a3e204ffe8b5d8a9758c534 | 730 | https://github.com/outsideris/popularconvention/blob/b236618ce63c4d151a3e204ffe8b5d8a9758c534/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, jsParser, logger, parser, path, supportExts;
helper... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logger = (require '../helpers').logger
parser = module.expor... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b236618ce63c4d151a3e204ffe8b5d8a9758c534 | 730 | https://github.com/outsideris/popularconvention/blob/b236618ce63c4d151a3e204ffe8b5d8a9758c534/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logger = (require '../helpers').logger
parser = module.expor... | commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
lines.forEach (line) ->
convention = psr.parse line, convention,... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | b236618ce63c4d151a3e204ffe8b5d8a9758c534 | 730 | https://github.com/outsideris/popularconvention/blob/b236618ce63c4d151a3e204ffe8b5d8a9758c534/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logger = (require '../helpers').logger
parser = module.expor... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ae65abb477ee097a58b79b5f06d3c198c1d276ac | 730 | https://github.com/outsideris/popularconvention/blob/ae65abb477ee097a58b79b5f06d3c198c1d276ac/src/parser/parser.coffee | 1 | 46 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logg... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, jsParser, logger, parser, path, supportExts;
helpers = require('../helpers');
path = require('path');
js... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ae65abb477ee097a58b79b5f06d3c198c1d276ac | 730 | https://github.com/outsideris/popularconvention/blob/ae65abb477ee097a58b79b5f06d3c198c1d276ac/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, jsParser, logger, parser, path, supportExts;
helper... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logger = (require '../helpers').logger
parser = module.expor... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ae65abb477ee097a58b79b5f06d3c198c1d276ac | 730 | https://github.com/outsideris/popularconvention/blob/ae65abb477ee097a58b79b5f06d3c198c1d276ac/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
logger = (require '../helpers').logger
parser = module.expor... | commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt(ext) and file.patch?
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
lines.forEach (line) ->
convention = psr.parse line, convention
... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ae65abb477ee097a58b79b5f06d3c198c1d276ac | 730 | https://github.com/outsideris/popularconvention/blob/ae65abb477ee097a58b79b5f06d3c198c1d276ac/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
parser = module.exports =
parsePatch: (commit) ->
comm... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ff72df2e3db01bf82dc753509a6418c17662cc4f | 730 | https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/parser/parser.coffee | 1 | 46 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
par... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, jsParser, parser, path, supportExts;
helpers = require('../helpers');
path = require('path');
jsParser =... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ff72df2e3db01bf82dc753509a6418c17662cc4f | 730 | https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var getParser, helpers, isSupportExt, jsParser, parser, path, supportExts;
helpers = requ... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
parser = module.exports =
parsePatch: (commit) ->
comm... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ff72df2e3db01bf82dc753509a6418c17662cc4f | 730 | https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
path = require 'path'
jsParser = require './js-parser'
parser = module.exports =
parsePatch: (commit) ->
comm... | commit.files.forEach (file) ->
ext = path.extname file.filename
if isSupportExt ext
convention = {lang: ext.substr(1)}
psr = getParser ext
lines = parser.parseAdditionTokens file.patch
lines.forEach (line) ->
convention = psr.parse line, convention
conventio... | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | ff72df2e3db01bf82dc753509a6418c17662cc4f | 730 | https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/parser/parser.coffee | 1 | 46 |
outsideris/popularconvention:src/parser/parser.coffee:1:raw_corpus | raw_corpus | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
module.exports =
parsePatch: (commit) ->
commit = JSON.parse commit if 'string' is helpers.extractType commit... | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | a63c08b3721d317537737c46e4c813893ec71263 | 730 | https://github.com/outsideris/popularconvention/blob/a63c08b3721d317537737c46e4c813893ec71263/src/parser/parser.coffee | 1 | 18 | ||
outsideris/popularconvention:src/parser/parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
module.exports =
parsePatch: (commit) ->
commit = JS... | // parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var helpers;
helpers = require('../helpers');
module.exports = {
parsePatch: function(commit) {
if ('string' === helpers.extractType(comm... | CoffeeScript | JavaScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | a63c08b3721d317537737c46e4c813893ec71263 | 730 | https://github.com/outsideris/popularconvention/blob/a63c08b3721d317537737c46e4c813893ec71263/src/parser/parser.coffee | 1 | 18 |
outsideris/popularconvention:src/parser/parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// parsing source
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
// Licensed under the MIT license.
// <http://outsider.mit-license.org/>
var helpers;
helpers = require('../helpers');
module.exports = {
parsePatch: function(... | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
module.exports =
parsePatch: (commit) ->
commit = JSON.parse commit if 'string' is helpers.extractType commit... | JavaScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | a63c08b3721d317537737c46e4c813893ec71263 | 730 | https://github.com/outsideris/popularconvention/blob/a63c08b3721d317537737c46e4c813893ec71263/src/parser/parser.coffee | 1 | 18 |
outsideris/popularconvention:src/parser/parser.coffee:1:completion | completion | # parsing source
#
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/>
# Licensed under the MIT license.
# <http://outsider.mit-license.org/>
helpers = require '../helpers'
module.exports = | parsePatch: (commit) ->
commit = JSON.parse commit if 'string' is helpers.extractType commit
commit.files
parseAdditionTokens: (patch) ->
patch = patch.split '\n'
line.substr(1) for line in patch when line.charAt(0) is '+'
# private | CoffeeScript | CoffeeScript | outsideris/popularconvention | src/parser/parser.coffee | MIT | a63c08b3721d317537737c46e4c813893ec71263 | 730 | https://github.com/outsideris/popularconvention/blob/a63c08b3721d317537737c46e4c813893ec71263/src/parser/parser.coffee | 1 | 18 |
meltingice/psd.js:shims/init.coffee:1:raw_corpus | raw_corpus | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozRe... | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/init.coffee | 1 | 42 | ||
meltingice/psd.js:shims/init.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
... | var RSVP;
RSVP = require('rsvp');
module.exports = {
extended: function(PSD) {
this.fromURL = function(url) {
return new RSVP.Promise(function(resolve, reject) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.responseType = "arraybuffer";
xhr.o... | CoffeeScript | JavaScript | meltingice/psd.js | shims/init.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/init.coffee | 1 | 42 |
meltingice/psd.js:shims/init.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var RSVP;
RSVP = require('rsvp');
module.exports = {
extended: function(PSD) {
this.fromURL = function(url) {
return new RSVP.Promise(function(resolve, reject) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
... | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozRe... | JavaScript | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/init.coffee | 1 | 42 |
meltingice/psd.js:shims/init.coffee:1:completion | completion | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozRe... | reader = new FileReader()
reader.onload = (e) ->
psd = new PSD(new Uint8Array(e.target.result))
psd.parse()
resolve(psd)
reader.onerror = reject
reader.readAsArrayBuffer(file)
@fromDroppedFile = (file) ->
new RSVP.Promise (resolve, reject) ->
re... | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/init.coffee | 1 | 42 |
meltingice/psd.js:shims/init.coffee:1:raw_corpus | raw_corpus | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozRe... | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/init.coffee | 1 | 30 | ||
meltingice/psd.js:shims/init.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
... | var RSVP;
RSVP = require('rsvp');
module.exports = {
extended: function(PSD) {
this.fromURL = function(url) {
return new RSVP.Promise(function(resolve, reject) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.responseType = "arraybuffer";
xhr.o... | CoffeeScript | JavaScript | meltingice/psd.js | shims/init.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/init.coffee | 1 | 30 |
meltingice/psd.js:shims/init.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var RSVP;
RSVP = require('rsvp');
module.exports = {
extended: function(PSD) {
this.fromURL = function(url) {
return new RSVP.Promise(function(resolve, reject) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
... | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozRe... | JavaScript | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/init.coffee | 1 | 30 |
meltingice/psd.js:shims/init.coffee:1:completion | completion | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozRe... | xhr.send null
@fromEvent = (e) ->
new RSVP.Promise (resolve, reject) ->
file = e.dataTransfer.files[0]
reader = new FileReader()
reader.onload = (e) ->
psd = new PSD(new Uint8Array(e.target.result))
psd.parse()
resolve(psd)
reader.onerror = reje... | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/init.coffee | 1 | 30 |
meltingice/psd.js:shims/init.coffee:1:raw_corpus | raw_corpus | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
return new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xh... | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | b43e5693bd81415b488df0b75206be5b660fa16d | 2,846 | https://github.com/meltingice/psd.js/blob/b43e5693bd81415b488df0b75206be5b660fa16d/shims/init.coffee | 1 | 15 | ||
meltingice/psd.js:shims/init.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
return new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onloa... | var RSVP;
RSVP = require('rsvp');
module.exports = {
extended: function(PSD) {
return this.fromURL = function(url) {
return new RSVP.Promise(function(resolve, reject) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.responseType = "arraybuffer";
... | CoffeeScript | JavaScript | meltingice/psd.js | shims/init.coffee | MIT | b43e5693bd81415b488df0b75206be5b660fa16d | 2,846 | https://github.com/meltingice/psd.js/blob/b43e5693bd81415b488df0b75206be5b660fa16d/shims/init.coffee | 1 | 15 |
meltingice/psd.js:shims/init.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var RSVP;
RSVP = require('rsvp');
module.exports = {
extended: function(PSD) {
return this.fromURL = function(url) {
return new RSVP.Promise(function(resolve, reject) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open("GET", url, ... | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
return new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest()
xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xh... | JavaScript | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | b43e5693bd81415b488df0b75206be5b660fa16d | 2,846 | https://github.com/meltingice/psd.js/blob/b43e5693bd81415b488df0b75206be5b660fa16d/shims/init.coffee | 1 | 15 |
meltingice/psd.js:shims/init.coffee:1:completion | completion | RSVP = require 'rsvp'
module.exports =
extended: (PSD) ->
@fromURL = (url) ->
return new RSVP.Promise (resolve, reject) ->
xhr = new XMLHttpRequest() | xhr.open "GET", url, true
xhr.responseType = "arraybuffer"
xhr.onload = ->
data = new Uint8Array(xhr.response or xhr.mozResponseArrayBuffer)
psd = new PSD(data)
resolve(psd)
xhr.send null | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/init.coffee | MIT | b43e5693bd81415b488df0b75206be5b660fa16d | 2,846 | https://github.com/meltingice/psd.js/blob/b43e5693bd81415b488df0b75206be5b660fa16d/shims/init.coffee | 1 | 15 |
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
A: 65
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN: 40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` set... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/default.coffee | 1 | 49 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
A: 65
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN: 40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js s... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
A: 65,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to tweak At.js such... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/default.coffee | 1 | 49 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
A: 65,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.
// Others de... | KEY_CODE =
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
A: 65
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN: 40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` set... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/default.coffee | 1 | 49 |
ichord/At.js:src/default.coffee:2:raw_corpus | raw_corpus | # À
_a = decodeURI("%C3%80")
# ÿ
_y = decodeURI("%C3%BF")
space = if acceptSpaceBar then "\ " else ""
regexp = new RegExp "#{flag}([A-Za-z#{_a}-#{_y}0-9_#{space}\'\.\+\-]*)$|#{flag}([^\\x00-\\xff]*)$",'gi'
match = regexp.exec subtext
if match then match[2] || match[1] else null
# --------... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/default.coffee | 51 | 95 | ||
ichord/At.js:src/default.coffee:3:raw_corpus | raw_corpus | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Evaluate the template either as a string or as a function
# this allows so... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/default.coffee | 97 | 136 | ||
ichord/At.js:src/default.coffee:3:completion | completion | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Evaluate the template either as a string or as a function
# this allows so... | # Highlight the `matched query` string.
#
# @param li [String] HTML String after eval.
# @param query [String] matched query.
#
# @return [String] highlighted string.
highlighter: (li, query) ->
return li if not query
regexp = new RegExp(">\\s*([^\<]*?)(" + query.replace("+","\\+") + ")([^\<]*)\\s*<... | CoffeeScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/default.coffee | 97 | 136 |
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
A: 65
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | df178b1d689e710dbf04707b5d59ff96f6a4b25a | 5,250 | https://github.com/ichord/At.js/blob/df178b1d689e710dbf04707b5d59ff96f6a4b25a/src/default.coffee | 1 | 50 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
A: 65
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these metho... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
A: 65,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.
// Others developers can override these metho... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | df178b1d689e710dbf04707b5d59ff96f6a4b25a | 5,250 | https://github.com/ichord/At.js/blob/df178b1d689e710dbf04707b5d59ff96f6a4b25a/src/default.coffee | 1 | 50 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
A: 65,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering ... | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
A: 65
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | df178b1d689e710dbf04707b5d59ff96f6a4b25a | 5,250 | https://github.com/ichord/At.js/blob/df178b1d689e710dbf04707b5d59ff96f6a4b25a/src/default.coffee | 1 | 50 |
ichord/At.js:src/default.coffee:3:raw_corpus | raw_corpus | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Evaluate the template either as a string or as a function
# this allows so... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | f8730561200da1a7249838f5e97a170aaecfdc34 | 5,250 | https://github.com/ichord/At.js/blob/f8730561200da1a7249838f5e97a170aaecfdc34/src/default.coffee | 97 | 136 | ||
ichord/At.js:src/default.coffee:3:completion | completion | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Evaluate the template either as a string or as a function
# this allows so... | # Highlight the `matched query` string.
#
# @param li [String] HTML String after eval.
# @param query [String] matched query.
#
# @return [String] highlighted string.
highlighter: (li, query) ->
return li if not query
regexp = new RegExp(">\\s*(\\w*?)(" + query.replace("+","\\+") + ")(\\w*)\\s*<", '... | CoffeeScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | f8730561200da1a7249838f5e97a170aaecfdc34 | 5,250 | https://github.com/ichord/At.js/blob/f8730561200da1a7249838f5e97a170aaecfdc34/src/default.coffee | 97 | 136 |
ichord/At.js:src/default.coffee:4:raw_corpus | raw_corpus | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Evaluate the template either as a string or as a function
# this allows so... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | c374c9335f761b66ecb3dec4770a3f630e5bcb4e | 5,250 | https://github.com/ichord/At.js/blob/c374c9335f761b66ecb3dec4770a3f630e5bcb4e/src/default.coffee | 99 | 137 | ||
ichord/At.js:src/default.coffee:4:completion | completion | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Evaluate the template either as a string or as a function
# this allows so... | ""
# Highlight the `matched query` string.
#
# @param li [String] HTML String after eval.
# @param query [String] matched query.
#
# @return [String] highlighted string.
highlighter: (li, query) ->
return li if not query
regexp = new RegExp(">\\s*(\\w*?)(" + query.replace("+","\\+") + ")(\\w*)\\... | CoffeeScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | c374c9335f761b66ecb3dec4770a3f630e5bcb4e | 5,250 | https://github.com/ichord/At.js/blob/c374c9335f761b66ecb3dec4770a3f630e5bcb4e/src/default.coffee | 99 | 137 |
ichord/At.js:src/default.coffee:3:raw_corpus | raw_corpus | # À
_a = decodeURI("%C3%80")
# ÿ
_y = decodeURI("%C3%BF")
space = if acceptSpaceBar then "\ " else ""
regexp = new RegExp "#{flag}([A-Za-z#{_a}-#{_y}0-9_#{space}\.\+\-]*)$|#{flag}([^\\x00-\\xff]*)$",'gi'
match = regexp.exec subtext
if match then match[2] || match[1] else null
# ----------... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 8078f2738d2b18bbeb0e8cae93d67a1ddfa032dd | 5,250 | https://github.com/ichord/At.js/blob/8078f2738d2b18bbeb0e8cae93d67a1ddfa032dd/src/default.coffee | 53 | 97 | ||
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `cal... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | bf17d438bbaf47595c505ef27f738ff48b6c3356 | 5,250 | https://github.com/ichord/At.js/blob/bf17d438bbaf47595c505ef27f738ff48b6c3356/src/default.coffee | 1 | 50 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tw... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to twe... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | bf17d438bbaf47595c505ef27f738ff48b6c3356 | 5,250 | https://github.com/ichord/At.js/blob/bf17d438bbaf47595c505ef27f738ff48b6c3356/src/default.coffee | 1 | 50 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.... | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `cal... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | bf17d438bbaf47595c505ef27f738ff48b6c3356 | 5,250 | https://github.com/ichord/At.js/blob/bf17d438bbaf47595c505ef27f738ff48b6c3356/src/default.coffee | 1 | 50 |
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `cal... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 4b08222824b696c5deb0f9a7ceab339957bb006d | 5,250 | https://github.com/ichord/At.js/blob/4b08222824b696c5deb0f9a7ceab339957bb006d/src/default.coffee | 1 | 47 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tw... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to twe... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | 4b08222824b696c5deb0f9a7ceab339957bb006d | 5,250 | https://github.com/ichord/At.js/blob/4b08222824b696c5deb0f9a7ceab339957bb006d/src/default.coffee | 1 | 47 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8,
SPACE: 32
};
// Functions set for handling and rendering the data.... | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
SPACE: 32
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `cal... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 4b08222824b696c5deb0f9a7ceab339957bb006d | 5,250 | https://github.com/ichord/At.js/blob/4b08222824b696c5deb0f9a7ceab339957bb006d/src/default.coffee | 1 | 47 |
ichord/At.js:src/default.coffee:2:raw_corpus | raw_corpus | # À
_a = decodeURI("%C3%80")
# ÿ
_y = decodeURI("%C3%BF")
regexp = new RegExp "#{flag}([A-Za-z#{_a}-#{_y}0-9_\.\+\-]*)$|#{flag}([^\\x00-\\xff]*)$",'gi'
match = regexp.exec subtext
if match then match[2] || match[1] else null
# ---------------------
# Filter data by matched string.
#
# ... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 4b08222824b696c5deb0f9a7ceab339957bb006d | 5,250 | https://github.com/ichord/At.js/blob/4b08222824b696c5deb0f9a7ceab339957bb006d/src/default.coffee | 49 | 92 | ||
ichord/At.js:src/default.coffee:3:raw_corpus | raw_corpus | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Eval template for every single item in display list.
#
# @param tpl [Str... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 4c1048b7673b48ca6d458aea1f916c1acf29a72b | 5,250 | https://github.com/ichord/At.js/blob/4c1048b7673b48ca6d458aea1f916c1acf29a72b/src/default.coffee | 94 | 136 | ||
ichord/At.js:src/default.coffee:3:completion | completion | _results = []
for item in items
item.atwho_order = new String(item[searchKey]).toLowerCase().indexOf query.toLowerCase()
_results.push item if item.atwho_order > -1
_results.sort (a,b) -> a.atwho_order - b.atwho_order
# Eval template for every single item in display list.
#
# @param tpl [Str... | #
# @return [String] highlighted string.
highlighter: (li, query) ->
return li if not query
regexp = new RegExp(">\\s*(\\w*?)(" + query.replace("+","\\+") + ")(\\w*)\\s*<", 'ig')
li.replace regexp, (str, $1, $2, $3) -> '> '+$1+'<strong>' + $2 + '</strong>'+$3+' <'
# What to do before inserting item's... | CoffeeScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 4c1048b7673b48ca6d458aea1f916c1acf29a72b | 5,250 | https://github.com/ichord/At.js/blob/4c1048b7673b48ca6d458aea1f916c1acf29a72b/src/default.coffee | 94 | 136 |
ichord/At.js:src/default.coffee:2:raw_corpus | raw_corpus | # À
_a = decodeURI("%C3%80")
# ÿ
_y = decodeURI("%C3%BF")
regexp = new RegExp "#{flag}([A-Za-z#{_a}-#{_y}0-9_'\.\+\-]*)$|#{flag}([^\\x00-\\xff]*)$",'gi'
match = regexp.exec subtext
if match then match[2] || match[1] else null
# ---------------------
# Filter data by matched string.
#
#... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | aa93bfe0eb8dc9f9a1727f870c7f66aaeed1e5d9 | 5,250 | https://github.com/ichord/At.js/blob/aa93bfe0eb8dc9f9a1727f870c7f66aaeed1e5d9/src/default.coffee | 49 | 92 | ||
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` sett... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 5d99c55999baaa389a279315236e590e2ad2d47e | 5,250 | https://github.com/ichord/At.js/blob/5d99c55999baaa389a279315236e590e2ad2d47e/src/default.coffee | 1 | 46 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js su... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to tweak At.js such... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | 5d99c55999baaa389a279315236e590e2ad2d47e | 5,250 | https://github.com/ichord/At.js/blob/5d99c55999baaa389a279315236e590e2ad2d47e/src/default.coffee | 1 | 46 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8
};
// Functions set for handling and rendering the data.
// Others de... | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` sett... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 5d99c55999baaa389a279315236e590e2ad2d47e | 5,250 | https://github.com/ichord/At.js/blob/5d99c55999baaa389a279315236e590e2ad2d47e/src/default.coffee | 1 | 46 |
ichord/At.js:src/default.coffee:2:raw_corpus | raw_corpus | # À
_a = decodeURI("%C3%80")
# ÿ
_y = decodeURI("%C3%BF")
regexp = new RegExp "#{flag}([A-Za-z#{_a}-#{_y}0-9_\+\-]*)$|#{flag}([^\\x00-\\xff]*)$",'gi'
match = regexp.exec subtext
if match then match[2] || match[1] else null
# ---------------------
# Filter data by matched string.
#
# @p... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 1c1900ac52430ace4e772de533303db43743dca8 | 5,250 | https://github.com/ichord/At.js/blob/1c1900ac52430ace4e772de533303db43743dca8/src/default.coffee | 48 | 91 | ||
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` sett... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 88fd9bcbd68bb681f152584999e3b83968e4779d | 5,250 | https://github.com/ichord/At.js/blob/88fd9bcbd68bb681f152584999e3b83968e4779d/src/default.coffee | 1 | 48 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js su... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to tweak At.js such... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | 88fd9bcbd68bb681f152584999e3b83968e4779d | 5,250 | https://github.com/ichord/At.js/blob/88fd9bcbd68bb681f152584999e3b83968e4779d/src/default.coffee | 1 | 48 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
BACKSPACE: 8
};
// Functions set for handling and rendering the data.
// Others de... | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` sett... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 88fd9bcbd68bb681f152584999e3b83968e4779d | 5,250 | https://github.com/ichord/At.js/blob/88fd9bcbd68bb681f152584999e3b83968e4779d/src/default.coffee | 1 | 48 |
ichord/At.js:src/default.coffee:1:completion | completion | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
LEFT: 37
UP:38
RIGHT: 39
DOWN:40
BACKSPACE: 8
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` sett... | #
DEFAULT_CALLBACKS =
# It would be called to restructure the data before At.js invokes `Model#save` to save data
# In default, At.js will convert it to a Hash Array.
#
# @param data [Array] data to refacotor.
# @return [Array] Data after refactor.
beforeSave: (data) ->
return data if not $.isArray dat... | CoffeeScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | 88fd9bcbd68bb681f152584999e3b83968e4779d | 5,250 | https://github.com/ichord/At.js/blob/88fd9bcbd68bb681f152584999e3b83968e4779d/src/default.coffee | 1 | 48 |
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` settings.
#
# @mixin
#
# The context of these functions is `... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/default.coffee | 1 | 43 | ||
ichord/At.js:src/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` set... | var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to tweak At.js such as matcher.
// We can override them in `callbacks` settings.
... | CoffeeScript | JavaScript | ichord/At.js | src/default.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/default.coffee | 1 | 43 |
ichord/At.js:src/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var DEFAULT_CALLBACKS, KEY_CODE;
KEY_CODE = {
DOWN: 40,
UP: 38,
ESC: 27,
TAB: 9,
ENTER: 13,
CTRL: 17,
P: 80,
N: 78
};
// Functions set for handling and rendering the data.
// Others developers can override these methods to tweak At.js such as matc... | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` settings.
#
# @mixin
#
# The context of these functions is `... | JavaScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/default.coffee | 1 | 43 |
ichord/At.js:src/default.coffee:1:completion | completion | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` settings.
#
# @mixin
#
# The context of these functions is `... | # It would be called to restructure the data before At.js invokes `Model#save` to save data
# In default, At.js will convert it to a Hash Array.
#
# @param data [Array] data to refacotor.
# @return [Array] Data after refactor.
beforeSave: (data) ->
return data if not $.isArray data
for item in data
... | CoffeeScript | CoffeeScript | ichord/At.js | src/default.coffee | MIT | ac213212f2d0d421896f8e490ec99698ed1d99f0 | 5,250 | https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/default.coffee | 1 | 43 |
ichord/At.js:src/default.coffee:1:raw_corpus | raw_corpus | KEY_CODE =
DOWN: 40
UP: 38
ESC: 27
TAB: 9
ENTER: 13
CTRL: 17
P: 80
N: 78
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` settings.
#
# @mixin
#
# The context of these functions is `... | CoffeeScript | ichord/At.js | src/default.coffee | MIT | dea7f905a54abd351d68c768fd3d6bd4fc281e9c | 5,250 | https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/default.coffee | 1 | 43 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.