code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
$elm$core$Result$Err = function (a) {
return {$: 'Err', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Result$Err | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Result$Ok = function (a) {
return {$: 'Ok', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Result$Ok | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$json$Json$Decode$OneOf = function (a) {
return {$: 'OneOf', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$json$Json$Decode$OneOf | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Maybe$Just = function (a) {
return {$: 'Just', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Maybe$Just | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$json$Json$Decode$indent = function (str) {
return A2(
$elm$core$String$join,
'\n ',
A2($elm$core$String$split, '\n', str));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$json$Json$Decode$indent | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$List$length = function (xs) {
return A3(
$elm$core$List$foldl,
F2(
function (_v0, i) {
return i + 1;
}),
0,
xs);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$List$length | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Char$isLower = function (_char) {
var code = $elm$core$Char$toCode(_char);
return (97 <= code) && (code <= 122);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Char$isLower | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Char$isUpper = function (_char) {
var code = $elm$core$Char$toCode(_char);
return (code <= 90) && (65 <= code);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Char$isUpper | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Char$isAlpha = function (_char) {
return $elm$core$Char$isLower(_char) || $elm$core$Char$isUpper(_char);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Char$isAlpha | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Char$isDigit = function (_char) {
var code = $elm$core$Char$toCode(_char);
return (code <= 57) && (48 <= code);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Char$isDigit | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Char$isAlphaNum = function (_char) {
return $elm$core$Char$isLower(_char) || ($elm$core$Char$isUpper(_char) || $elm$core$Char$isDigit(_char));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Char$isAlphaNum | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$List$reverse = function (list) {
return A3($elm$core$List$foldl, $elm$core$List$cons, _List_Nil, list);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$List$reverse | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$json$Json$Decode$errorToString = function (error) {
return A2($elm$json$Json$Decode$errorToStringHelp, error, _List_Nil);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$json$Json$Decode$errorToString | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Array$Leaf = function (a) {
return {$: 'Leaf', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Array$Leaf | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Array$SubTree = function (a) {
return {$: 'SubTree', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Array$SubTree | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Tuple$first = function (_v0) {
var x = _v0.a;
return x;
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Tuple$first | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Result$isOk = function (result) {
if (result.$ === 'Ok') {
return true;
} else {
return false;
}
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Result$isOk | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$virtual_dom$VirtualDom$toHandlerInt = function (handler) {
switch (handler.$) {
case 'Normal':
return 0;
case 'MayStopPropagation':
return 1;
case 'MayPreventDefault':
return 2;
default:
return 3;
}
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$virtual_dom$VirtualDom$toHandlerInt | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$browser$Browser$External = function (a) {
return {$: 'External', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$browser$Browser$External | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$browser$Browser$Internal = function (a) {
return {$: 'Internal', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$browser$Browser$Internal | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Basics$identity = function (x) {
return x;
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Basics$identity | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$browser$Browser$Dom$NotFound = function (a) {
return {$: 'NotFound', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$browser$Browser$Dom$NotFound | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$String$isEmpty = function (string) {
return string === '';
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$String$isEmpty | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$url$Url$fromString = function (str) {
return A2($elm$core$String$startsWith, 'http://', str) ? A2(
$elm$url$Url$chompAfterProtocol,
$elm$url$Url$Http,
A2($elm$core$String$dropLeft, 7, str)) : (A2($elm$core$String$startsWith, 'https://', str) ? A2(
$elm$url$Url$chompAfterProtocol,
$elm$url$Url$Https,
A... | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$url$Url$fromString | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Basics$never = function (_v0) {
never:
while (true) {
var nvr = _v0.a;
var $temp$_v0 = nvr;
_v0 = $temp$_v0;
continue never;
}
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Basics$never | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Task$Perform = function (a) {
return {$: 'Perform', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Task$Perform | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Task$sequence = function (tasks) {
return A3(
$elm$core$List$foldr,
$elm$core$Task$map2($elm$core$List$cons),
$elm$core$Task$succeed(_List_Nil),
tasks);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Task$sequence | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$json$Json$Encode$object = function (pairs) {
return _Json_wrap(
A3(
$elm$core$List$foldl,
F2(
function (_v0, obj) {
var k = _v0.a;
var v = _v0.b;
return A3(_Json_addField, k, v, obj);
}),
_Json_emptyObject(_Utils_Tuple0),
pairs));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$json$Json$Encode$object | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$encodeRustCommand = function (command) {
switch (command.$) {
case 'Init':
return $elm$json$Json$Encode$object(
_List_fromArray(
[
_Utils_Tuple2(
'cmd',
$elm$json$Json$Encode$string('Init'))
]));
case 'Log':
var text = command.a.text;
return $elm$json$J... | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$encodeRustCommand | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$init = function (_v0) {
return _Utils_Tuple2(
{field: '', str: '', tasks: _List_Nil},
$author$project$Main$toRust(
$author$project$Main$encodeRustCommand($author$project$Main$Init)));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$init | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$Log = function (a) {
return {$: 'Log', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$Log | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$SendToRust = function (a) {
return {$: 'SendToRust', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$SendToRust | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$UpdateTasks = function (a) {
return {$: 'UpdateTasks', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$UpdateTasks | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$decodeValue = function (x) {
var result = A2($elm$json$Json$Decode$decodeValue, $author$project$Main$taskListDecoder, x);
if (result.$ === 'Ok') {
var tasks = result.a;
return $author$project$Main$UpdateTasks(tasks);
} else {
var err = result.a;
return $author$project$Main$SendToRust(
... | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$decodeValue | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$subscriptions = function (model) {
return $author$project$Main$fromRust($author$project$Main$decodeValue);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$subscriptions | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$AddTask = function (a) {
return {$: 'AddTask', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$AddTask | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$UpdateField = function (a) {
return {$: 'UpdateField', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$UpdateField | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$virtual_dom$VirtualDom$Normal = function (a) {
return {$: 'Normal', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$virtual_dom$VirtualDom$Normal | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$html$Html$Events$onClick = function (msg) {
return A2(
$elm$html$Html$Events$on,
'click',
$elm$json$Json$Decode$succeed(msg));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$html$Html$Events$onClick | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$html$Html$Events$alwaysStop = function (x) {
return _Utils_Tuple2(x, true);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$html$Html$Events$alwaysStop | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) {
return {$: 'MayStopPropagation', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$virtual_dom$VirtualDom$MayStopPropagation | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$html$Html$Events$onInput = function (tagger) {
return A2(
$elm$html$Html$Events$stopPropagationOn,
'input',
A2(
$elm$json$Json$Decode$map,
$elm$html$Html$Events$alwaysStop,
A2($elm$json$Json$Decode$map, tagger, $elm$html$Html$Events$targetValue)));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$html$Html$Events$onInput | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$html$Html$Events$alwaysPreventDefault = function (msg) {
return _Utils_Tuple2(msg, true);
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$html$Html$Events$alwaysPreventDefault | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$virtual_dom$VirtualDom$MayPreventDefault = function (a) {
return {$: 'MayPreventDefault', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$virtual_dom$VirtualDom$MayPreventDefault | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$html$Html$Events$onSubmit = function (msg) {
return A2(
$elm$html$Html$Events$preventDefaultOn,
'submit',
A2(
$elm$json$Json$Decode$map,
$elm$html$Html$Events$alwaysPreventDefault,
$elm$json$Json$Decode$succeed(msg)));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$html$Html$Events$onSubmit | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$MarkTask = function (a) {
return {$: 'MarkTask', a: a};
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$MarkTask | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$core$Tuple$second = function (_v0) {
var y = _v0.b;
return y;
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$core$Tuple$second | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$elm$html$Html$Attributes$classList = function (classes) {
return $elm$html$Html$Attributes$class(
A2(
$elm$core$String$join,
' ',
A2(
$elm$core$List$map,
$elm$core$Tuple$first,
A2($elm$core$List$filter, $elm$core$Tuple$second, classes))));
} | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $elm$html$Html$Attributes$classList | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
$author$project$Main$view = function (model) {
return A2(
$elm$html$Html$div,
_List_fromArray(
[
$elm$html$Html$Attributes$class('container')
]),
_List_fromArray(
[
$elm$html$Html$text(model.str),
A2(
$elm$html$Html$form,
_List_fromArray(
[
$elm$html$Html$Attributes$class(... | /
var domNode = args && args['node'] ? args['node'] : _Debug_crash(0);
// | $author$project$Main$view | javascript | Boscop/web-view | webview-examples/examples/todo-elm/elm.js | https://github.com/Boscop/web-view/blob/master/webview-examples/examples/todo-elm/elm.js | MIT |
exit = (code) => {
if (process.env.NODE_ENV === 'test') {
throw new Error(`Exit called with code: ${code}`);
} else {
process.exit(code);
}
} | Custom exit function that handles both production and test environments
@param {number} code - Exit code to return
@throws {Error} In test environment instead of exiting | exit | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
exit = (code) => {
if (process.env.NODE_ENV === 'test') {
throw new Error(`Exit called with code: ${code}`);
} else {
process.exit(code);
}
} | Custom exit function that handles both production and test environments
@param {number} code - Exit code to return
@throws {Error} In test environment instead of exiting | exit | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
function normalizeGitHubUrl(url) {
try {
// Remove trailing slashes
url = url.replace(/\/+$/, '');
// Handle git@ URLs
if (url.startsWith('git@github.com:')) {
return url;
}
// Handle full HTTPS URLs
if (url.startsWith('https://gi... | Normalizes various GitHub URL formats to a consistent format
@param {string} url - The GitHub repository URL to normalize
@returns {string} Normalized GitHub URL
@throws {Error} If URL format is invalid | normalizeGitHubUrl | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function validateInput(input) {
if (!input || input.length === 0) {
throw new Error('Repository URL is required');
}
const url = input[0];
if (!url.includes('github.com') && !url.match(/^[\w-]+\/[\w-]+$/)) {
throw new Error('Only GitHub repositories are supported');
}
ret... | Validates the command line input
@param {string[]} input - Command line arguments
@returns {Promise<string>} Validated repository URL
@throws {Error} If input is missing or invalid | validateInput | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function downloadRepository(url) {
const spinner = process.env.NODE_ENV !== 'test' ? ora('Downloading repository...').start() : null;
const tempDir = path.join(os.tmpdir(), `git2txt-${Date.now()}`);
try {
// Normalize the GitHub URL
const normalizedUrl = normalizeGitHubUrl(url);
... | Downloads a GitHub repository to a temporary directory
@param {string} url - GitHub repository URL
@returns {Promise<Object>} Object containing temporary directory path and repository name
@throws {Error} If download fails | downloadRepository | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function processFiles(directory, options) {
let spinner = process.env.NODE_ENV !== 'test' ? ora('Processing files...').start() : null;
const thresholdBytes = options.threshold * 1024 * 1024;
let output = '';
let processedFiles = 0;
let skippedFiles = 0;
/**
* Recursively processes fi... | Processes files in the repository directory and combines them into a single text output
@param {string} directory - Path to the repository directory
@param {Object} options - Processing options
@param {number} options.threshold - File size threshold in MB
@param {boolean} options.includeAll - Whether to include all fil... | processFiles | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function processDirectory(dir) {
const entries = await fs.readdir(dir, { withFileTypes: true });
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory() && entry.name !== 'node_modules' && entry.name !== '.gi... | Recursively processes files in a directory
@param {string} dir - Directory to process | processDirectory | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function writeOutput(content, outputPath) {
let spinner = process.env.NODE_ENV !== 'test' ? ora('Writing output file...').start() : null;
try {
await fs.writeFile(outputPath, content);
if (spinner) spinner.succeed(`Output saved to ${chalk.green(outputPath)}`);
} catch (error) {
... | Writes the processed content to an output file
@param {string} content - Content to write
@param {string} outputPath - Path to the output file
@returns {Promise<void>}
@throws {Error} If writing fails | writeOutput | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function cleanup(directory) {
try {
await fs.rm(directory, { recursive: true, force: true });
} catch (error) {
if (process.env.NODE_ENV !== 'test') {
console.error(chalk.yellow('Warning: Failed to clean up temporary files'));
}
}
} | Cleans up temporary files and directories
@param {string} directory - Directory to clean up
@returns {Promise<void>} | cleanup | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
async function main() {
let tempDir;
try {
const url = await validateInput(cli.input);
if (process.env.NODE_ENV !== 'test') {
const result = await downloadRepository(url);
tempDir = result.tempDir;
const outputPath = cli.flags.output || `${result.... | Main application function that orchestrates the entire process
@returns {Promise<void>} | main | javascript | addyosmani/git2txt | index.js | https://github.com/addyosmani/git2txt/blob/master/index.js | MIT |
renderLoop = function(){
requestAnimationFrame(renderLoop);
game._board.render();
} | Update the sizes of the renderer (this makes the game responsive) | renderLoop | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
function Shape(game, orientations, symmetrical, blockType) {
$.extend(this, {
x: 0,
y: 0,
symmetrical: symmetrical,
init: function() {
$.extend(this, {
orientation: 0,
x: Math.floor(game._BLOCK_WIDTH / 2) - 1,
y: -1
... | The shapes have a reference point (the dot) and always rotate left.
Keep in mind that the blocks should keep in the same relative position when rotating,
to allow for custom per-block themes. | Shape | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
getCustomBlockImageCoordinates = function(image, blockType, blockIndex) {
// The image is based on the first ("upright") orientation
var positions = game._shapes[blockType][0];
// Find the number of tiles it should have
var minX = Math.min(positions[0], po... | Draws one block (Each piece is made of 4 blocks)
The blockType is used to draw any block.
The falling attribute is needed to apply different styles for falling and placed blocks. | getCustomBlockImageCoordinates | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
getBlockVariation = function(blockTheme, blockVariation) {
if( $.isArray(blockTheme) ) {
if( blockVariation !== null && typeof blockTheme[blockVariation] !== 'undefined' ) {
return blockTheme[blockVariation];
}
else if(blockTheme.length > 0) {
... | The theme allows us to do many things:
- Use a specific color for the falling block (primary), regardless of the proper color.
- Use another color for the placed blocks (secondary).
- Default to the "original" block color in any of those cases by setting primary and/or secondary to null.
- With primary and secondary as... | getBlockVariation | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
handleAssetLoad = function() {
// Rerender the board as soon as an asset loads
if( game._board ) {
game._board.render(true);
}
} | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | handleAssetLoad | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
loadAsset = function(src) {
var plainSrc = src;
if( ! hexColorcheck.test( plainSrc ) ) {
// It's an image
src = new Image();
src.src = plainSrc;
src.onload = handleAssetLoad;
} else {
// It's a color
src = plainSrc;
}
re... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | loadAsset | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
startAssetLoad = function(block) {
// Assets can be an array of variation so they can change color/design randomly
if( $.isArray(block) && block.length > 0 ) {
for( var i=0; i<block.length; i++ ) {
block[i] = loadAsset(block[i]);
}
}
else if( typeof block ... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | startAssetLoad | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
function scoreBlocks(possibles, blocks, x, y, filled, width, height) {
var i, len=blocks.length, score=0, bottoms = {}, tx, ty, overlaps;
// base score
for (i=0; i<len; i+=2) {
score += possibles[game._filled.asIndex(x + blocks[i], y + blocks[i+1])] || 0;
}
// overlap... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | scoreBlocks | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
function resetShapes() {
for (var attr in shapes) {
shapes[attr].x = 0;
shapes[attr].y = -1;
}
} | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | resetShapes | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
func = function(filled, checkCollisions, width, height, mode, _one_shape) {
if (!_one_shape) resetShapes();
var possibles = new Array(width * height),
evil = mode == 'evil',
x, y, py,
attr, shape, i, blocks, bounds,
score, best_shape, best_score = (evil ?... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | func | javascript | Aerolab/blockrain.js | dist/blockrain.jquery.js | https://github.com/Aerolab/blockrain.js/blob/master/dist/blockrain.jquery.js | MIT |
renderLoop = function(){
requestAnimationFrame(renderLoop);
game._board.render();
} | Update the sizes of the renderer (this makes the game responsive) | renderLoop | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
function Shape(game, orientations, symmetrical, blockType) {
$.extend(this, {
x: 0,
y: 0,
symmetrical: symmetrical,
init: function() {
$.extend(this, {
orientation: 0,
x: Math.floor(game._BLOCK_WIDTH / 2) - 1,
y: -1
... | The shapes have a reference point (the dot) and always rotate left.
Keep in mind that the blocks should keep in the same relative position when rotating,
to allow for custom per-block themes. | Shape | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
getCustomBlockImageCoordinates = function(image, blockType, blockIndex) {
// The image is based on the first ("upright") orientation
var positions = game._shapes[blockType][0];
// Find the number of tiles it should have
var minX = Math.min(positions[0], po... | Draws one block (Each piece is made of 4 blocks)
The blockType is used to draw any block.
The falling attribute is needed to apply different styles for falling and placed blocks. | getCustomBlockImageCoordinates | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
getBlockVariation = function(blockTheme, blockVariation) {
if( $.isArray(blockTheme) ) {
if( blockVariation !== null && typeof blockTheme[blockVariation] !== 'undefined' ) {
return blockTheme[blockVariation];
}
else if(blockTheme.length > 0) {
... | The theme allows us to do many things:
- Use a specific color for the falling block (primary), regardless of the proper color.
- Use another color for the placed blocks (secondary).
- Default to the "original" block color in any of those cases by setting primary and/or secondary to null.
- With primary and secondary as... | getBlockVariation | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
handleAssetLoad = function() {
// Rerender the board as soon as an asset loads
if( game._board ) {
game._board.render(true);
}
} | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | handleAssetLoad | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
loadAsset = function(src) {
var plainSrc = src;
if( ! hexColorcheck.test( plainSrc ) ) {
// It's an image
src = new Image();
src.src = plainSrc;
src.onload = handleAssetLoad;
} else {
// It's a color
src = plainSrc;
}
re... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | loadAsset | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
startAssetLoad = function(block) {
// Assets can be an array of variation so they can change color/design randomly
if( $.isArray(block) && block.length > 0 ) {
for( var i=0; i<block.length; i++ ) {
block[i] = loadAsset(block[i]);
}
}
else if( typeof block ... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | startAssetLoad | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
function scoreBlocks(possibles, blocks, x, y, filled, width, height) {
var i, len=blocks.length, score=0, bottoms = {}, tx, ty, overlaps;
// base score
for (i=0; i<len; i+=2) {
score += possibles[game._filled.asIndex(x + blocks[i], y + blocks[i+1])] || 0;
}
// overlap... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | scoreBlocks | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
function resetShapes() {
for (var attr in shapes) {
shapes[attr].x = 0;
shapes[attr].y = -1;
}
} | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | resetShapes | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
func = function(filled, checkCollisions, width, height, mode, _one_shape) {
if (!_one_shape) resetShapes();
var possibles = new Array(width * height),
evil = mode == 'evil',
x, y, py,
attr, shape, i, blocks, bounds,
score, best_shape, best_score = (evil ?... | Find base64 encoded images and load them as image objects, which can be used by the canvas renderer | func | javascript | Aerolab/blockrain.js | src/blockrain.jquery.src.js | https://github.com/Aerolab/blockrain.js/blob/master/src/blockrain.jquery.src.js | MIT |
create = object => ({
...suffixProperties(object, "Object"),
...StyleSheet.create(object)
}) | Very frequently you may want to use a style with some tweaks.
This class generates properties with the Object suffix, that can be
used to create a customized entry in a `StyleSheet`, e.g.:
const styles = StyleSheet.create({
wrapper: {
...material.title1Object,
color: 'palevioletred',
},
});
P... | create | javascript | hectahertz/react-native-typography | src/internal/CombinedStyleSheet.js | https://github.com/hectahertz/react-native-typography/blob/master/src/internal/CombinedStyleSheet.js | MIT |
create = object => ({
...suffixProperties(object, "Object"),
...StyleSheet.create(object)
}) | Very frequently you may want to use a style with some tweaks.
This class generates properties with the Object suffix, that can be
used to create a customized entry in a `StyleSheet`, e.g.:
const styles = StyleSheet.create({
wrapper: {
...material.title1Object,
color: 'palevioletred',
},
});
P... | create | javascript | hectahertz/react-native-typography | src/internal/CombinedStyleSheet.js | https://github.com/hectahertz/react-native-typography/blob/master/src/internal/CombinedStyleSheet.js | MIT |
function O2(r,e,t,i){Li.has(e)||Li.set(e,new Lg.default({maxSize:25e3}));for(let n of r.split(`
`))if(n=n.trim(),!i.has(n))if(i.add(n),Li.get(e).has(n))for(let s of Li.get(e).get(n))t.add(s);else{let s=e(n).filter(o=>o!=="!*"),a=new Set(s);for(let o of a)t.add(o);Li.get(e).set(n,a)}} | ":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,C... | O2 | javascript | LibreSpark/LibreTV | libs/tailwindcss.min.js | https://github.com/LibreSpark/LibreTV/blob/master/libs/tailwindcss.min.js | Apache-2.0 |
function Vg(r,e,t){let i=new Set,n=[];if(r.walkAtRules("apply",l=>{let[c]=Ug(l.params);for(let f of c)i.add(f);n.push(l)}),n.length===0)return;let s=L2([t,q2(i,e)]);function a(l,c,f){let d=Il(l),p=Il(c),b=Il(`.${Te(f)}`).nodes[0].nodes[0];return d.each(v=>{let y=new Set;p.each(w=>{let k=!1;w=w.clone(),w.walkClasses(S=>... | ":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,C... | Vg | javascript | LibreSpark/LibreTV | libs/tailwindcss.min.js | https://github.com/LibreSpark/LibreTV/blob/master/libs/tailwindcss.min.js | Apache-2.0 |
restoreBefore(e){let t=e.raw("before").split(`
`),i=t[t.length-1];this.all.group(e).up(n=>{let s=n.raw("before").split(`
`),a=s[s.length-1];a.length<i.length&&(i=a)}),t[t.length-1]=i,e.raws.before=t.join(`
`)} | ":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,C... | restoreBefore | javascript | LibreSpark/LibreTV | libs/tailwindcss.min.js | https://github.com/LibreSpark/LibreTV/blob/master/libs/tailwindcss.min.js | Apache-2.0 |
remove(e,t){let i=this.prefixes.remove["@resolution"];e.walkAtRules((n,s)=>{this.prefixes.remove[`@${n.name}`]?this.disabled(n,t)||n.parent.removeChild(s):n.name==="media"&&n.params.includes("-resolution")&&i&&i.clean(n)});for(let n of this.prefixes.remove.selectors)e.walkRules((s,a)=>{n.check(s)&&(this.disabled(s,t)||... | ":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,C... | remove | javascript | LibreSpark/LibreTV | libs/tailwindcss.min.js | https://github.com/LibreSpark/LibreTV/blob/master/libs/tailwindcss.min.js | Apache-2.0 |
reduceSpaces(e){let t=!1;if(this.prefixes.group(e).up(()=>(t=!0,!0)),t)return;let i=e.raw("before").split(`
`),n=i[i.length-1].length,s=!1;this.prefixes.group(e).down(a=>{i=a.raw("before").split(`
`);let o=i.length-1;i[o].length>n&&(s===!1&&(s=i[o].length-n),i[o]=i[o].slice(0,-s),a.raws.before=i.join(`
`))})} | ":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,C... | reduceSpaces | javascript | LibreSpark/LibreTV | libs/tailwindcss.min.js | https://github.com/LibreSpark/LibreTV/blob/master/libs/tailwindcss.min.js | Apache-2.0 |
function H5(r,e){e.browsers.selected.length!==0&&(e.add.selectors.length>0||Object.keys(e.add).length>2||r.warn(`Autoprefixer target browsers do not need any prefixes.You do not need Autoprefixer anymore.
Check your Browserslist config to be sure that your targets are set up correctly.
Learn more at:
https://githu... | ":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,C... | H5 | javascript | LibreSpark/LibreTV | libs/tailwindcss.min.js | https://github.com/LibreSpark/LibreTV/blob/master/libs/tailwindcss.min.js | Apache-2.0 |
function QR8bitByte(data) {
this.mode = QRMode.MODE_8BIT_BYTE;
this.data = data;
this.parsedData = [];
// Added to support UTF-8 Characters
for (var i = 0, l = this.data.length; i < l; i++) {
var byteArray = [];
var code = this.data.charCodeAt(i);
if (code > 0x10000) {
byteArray[0] = 0xF0 | ((c... | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | QR8bitByte | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function QRCodeModel(typeNumber, errorCorrectLevel) {
this.typeNumber = typeNumber;
this.errorCorrectLevel = errorCorrectLevel;
this.modules = null;
this.moduleCount = 0;
this.dataCache = null;
this.dataList = [];
} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | QRCodeModel | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function QRPolynomial(num,shift){if(num.length==undefined){throw new Error(num.length+"/"+shift);}
var offset=0;while(offset<num.length&&num[offset]==0){offset++;}
this.num=new Array(num.length-offset+shift);for(var i=0;i<num.length-offset;i++){this.num[i]=num[i+offset];}} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | QRPolynomial | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function _isSupportCanvas() {
return typeof CanvasRenderingContext2D != "undefined";
} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | _isSupportCanvas | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function _getAndroid() {
var android = false;
var sAgent = navigator.userAgent;
if (/android/i.test(sAgent)) { // android
android = true;
var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
if (aMat && aMat[1]) {
android = parseFloat(aMat[1]);
}
}
return android;
} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | _getAndroid | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
Drawing = function (el, htOption) {
this._el = el;
this._htOption = htOption;
} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | Drawing | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function makeSVG(tag, attrs) {
var el = document.createElementNS('http://www.w3.org/2000/svg', tag);
for (var k in attrs)
if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);
return el;
} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | makeSVG | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
Drawing = function (el, htOption) {
this._el = el;
this._htOption = htOption;
} | @fileoverview
- Using the 'QRCode for Javascript library'
- Fixed dataset of 'QRCode for Javascript library' for support full-spec.
- this library has no dependencies.
@author davidshimjs
@see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
@see <a href="http://jeromeetienne.github.co... | Drawing | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function _safeSetDataURI(fSuccess, fFail) {
var self = this;
self._fFail = fFail;
self._fSuccess = fSuccess;
// Check it just once
if (self._bSupportDataURI === null) {
var el = document.createElement("img");
var fOnError = fun... | Check whether the user's browser supports Data URI or not
@private
@param {Function} fSuccess Occurs if it supports Data URI
@param {Function} fFail Occurs if it doesn't support Data URI | _safeSetDataURI | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
fOnError = function() {
self._bSupportDataURI = false;
if (self._fFail) {
self._fFail.call(self);
}
} | Check whether the user's browser supports Data URI or not
@private
@param {Function} fSuccess Occurs if it supports Data URI
@param {Function} fFail Occurs if it doesn't support Data URI | fOnError | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
fOnSuccess = function() {
self._bSupportDataURI = true;
if (self._fSuccess) {
self._fSuccess.call(self);
}
} | Check whether the user's browser supports Data URI or not
@private
@param {Function} fSuccess Occurs if it supports Data URI
@param {Function} fFail Occurs if it doesn't support Data URI | fOnSuccess | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
Drawing = function (el, htOption) {
this._bIsPainted = false;
this._android = _getAndroid();
this._htOption = htOption;
this._elCanvas = document.createElement("canvas");
this._elCanvas.width = htOption.width;
this._elCanvas.height = htOption.height;
el.appendChild(this._elCanvas);
this._... | Drawing QRCode by using canvas
@constructor
@param {HTMLElement} el
@param {Object} htOption QRCode Options | Drawing | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
function _getTypeNumber(sText, nCorrectLevel) {
var nType = 1;
var length = _getUTF8Length(sText);
for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
var nLimit = 0;
switch (nCorrectLevel) {
case QRErrorCorrectLevel.L :
nLimit = QRCodeLimitLength[i][0];
break;
case QRErrorC... | Get the type by string length
@private
@param {String} sText
@param {Number} nCorrectLevel
@return {Number} type | _getTypeNumber | javascript | bryanbraun/checkboxland | docs/demos/qr-code/qrcode.js | https://github.com/bryanbraun/checkboxland/blob/master/docs/demos/qr-code/qrcode.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.