diff --git "a/datasets/javascript/valid.jsonl" "b/datasets/javascript/valid.jsonl" new file mode 100644--- /dev/null +++ "b/datasets/javascript/valid.jsonl" @@ -0,0 +1,3885 @@ +{"repo": "explosion/spaCy", "path": "website/src/widgets/landing.js", "func_name": "getCounts", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Compute the overall total counts of models and languages", "docstring_tokens": ["Compute", "the", "overall", "total", "counts", "of", "models", "and", "languages"], "sha": "a1e07f0d147e470cd4f0fd99bb62d28ddba7dd8d", "url": "https://github.com/explosion/spaCy/blob/a1e07f0d147e470cd4f0fd99bb62d28ddba7dd8d/website/src/widgets/landing.js#L55-L61", "partition": "valid"} +{"repo": "sentsin/layui", "path": "src/lay/modules/mobile/zepto.js", "func_name": "className", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "access className property while respecting SVGAnimatedString", "docstring_tokens": ["access", "className", "property", "while", "respecting", "SVGAnimatedString"], "sha": "1ff124de94e86cd0270b8a99f500aa3149569d67", "url": "https://github.com/sentsin/layui/blob/1ff124de94e86cd0270b8a99f500aa3149569d67/src/lay/modules/mobile/zepto.js#L303-L309", "partition": "valid"} +{"repo": "sentsin/layui", "path": "src/lay/modules/mobile/zepto.js", "func_name": "deserializeValue", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "\"true\" => true \"false\" => false \"null\" => null \"42\" => 42 \"42.5\" => 42.5 \"08\" => \"08\" JSON => parse if valid String => self", "docstring_tokens": ["true", "=", ">", "true", "false", "=", ">", "false", "null", "=", ">", "null", "42", "=", ">", "42", "42", ".", "5", "=", ">", "42", ".", "5", "08", "=", ">", "08", "JSON", "=", ">", "parse", "if", "valid", "String", "=", ">", "self"], "sha": "1ff124de94e86cd0270b8a99f500aa3149569d67", "url": "https://github.com/sentsin/layui/blob/1ff124de94e86cd0270b8a99f500aa3149569d67/src/lay/modules/mobile/zepto.js#L319-L332", "partition": "valid"} +{"repo": "hexojs/hexo", "path": "lib/plugins/tag/code.js", "func_name": "getHighlightOptions", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Code block tag\n\nSyntax:\n{% codeblock [title] [lang:language] [url] [link text] [line_number:(true|false)] [highlight:(true|false)] [first_line:number] [mark:#,#-#] %}\ncode snippet\n{% endcodeblock %}", "docstring_tokens": ["Code", "block", "tag"], "sha": "a6dc0ea28dddad1b5f1bad7c6f86f1e0627b564a", "url": "https://github.com/hexojs/hexo/blob/a6dc0ea28dddad1b5f1bad7c6f86f1e0627b564a/lib/plugins/tag/code.js#L26-L102", "partition": "valid"} +{"repo": "hexojs/hexo", "path": "lib/plugins/console/generate.js", "func_name": "pipeStream", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Pipe a stream from one to another", "docstring_tokens": ["Pipe", "a", "stream", "from", "one", "to", "another"], "sha": "a6dc0ea28dddad1b5f1bad7c6f86f1e0627b564a", "url": "https://github.com/hexojs/hexo/blob/a6dc0ea28dddad1b5f1bad7c6f86f1e0627b564a/lib/plugins/console/generate.js#L162-L177", "partition": "valid"} +{"repo": "hexojs/hexo", "path": "lib/extend/tag.js", "func_name": "formatNunjucksError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Provide context for Nunjucks error\n@param {Error} err Nunjucks error\n@param {string} str string input for Nunjucks\n@return {Error} New error object with embedded context", "docstring_tokens": ["Provide", "context", "for", "Nunjucks", "error"], "sha": "a6dc0ea28dddad1b5f1bad7c6f86f1e0627b564a", "url": "https://github.com/hexojs/hexo/blob/a6dc0ea28dddad1b5f1bad7c6f86f1e0627b564a/lib/extend/tag.js#L93-L109", "partition": "valid"} +{"repo": "awslabs/aws-cdk", "path": "packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/lib/index.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Upload a CloudFormation response for a Custom Resource\n\n@param {object} event the Lambda event payload received by the handler function\n@param {object} context the Lambda context received by the handler function\n@param {string} responseStatus the response status, either 'SUCCESS' or 'FAILED'\n@param {string} physicalResourceId CloudFormation physical resource ID\n@param {object} [responseData] arbitrary response data object\n@param {string} [reason] reason for failure, if any, to convey to the user\n@returns {Promise} Promise that is resolved on success, or rejected on connection error or HTTP error response", "docstring_tokens": ["Upload", "a", "CloudFormation", "response", "for", "a", "Custom", "Resource"], "sha": "0acfa8b047e2bf9f711f4330a3f71fadf9e5abd0", "url": "https://github.com/awslabs/aws-cdk/blob/0acfa8b047e2bf9f711f4330a3f71fadf9e5abd0/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/lib/index.js#L17-L56", "partition": "valid"} +{"repo": "awslabs/aws-cdk", "path": "packages/@aws-cdk/assets-docker/lib/adopt-repository/handler.js", "func_name": "getAdopter", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "The repository must already exist", "docstring_tokens": ["The", "repository", "must", "already", "exist"], "sha": "0acfa8b047e2bf9f711f4330a3f71fadf9e5abd0", "url": "https://github.com/awslabs/aws-cdk/blob/0acfa8b047e2bf9f711f4330a3f71fadf9e5abd0/packages/@aws-cdk/assets-docker/lib/adopt-repository/handler.js#L17-L27", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/modules/cell.js", "func_name": "calculateLineHeight", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Calculate the height for containing the highest column\n\n@name calculateLineHeight\n@function\n@param {Object[]} model is the line of data we want to calculate the height of\n@param {Integer[]} columnWidths is size of each column\n@returns {number} lineHeight\n@private", "docstring_tokens": ["Calculate", "the", "height", "for", "containing", "the", "highest", "column"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/modules/cell.js#L429-L439", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "fontconverter/filereader.js", "func_name": "makeWorker", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "makeWorker is a little wrapper for generating web workers from strings", "docstring_tokens": ["makeWorker", "is", "a", "little", "wrapper", "for", "generating", "web", "workers", "from", "strings"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/fontconverter/filereader.js#L80-L92", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "rollup.config.js", "func_name": "monkeyPatch", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Monkey patching filesaver and html2canvas", "docstring_tokens": ["Monkey", "patching", "filesaver", "and", "html2canvas"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/rollup.config.js#L8-L24", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "rollup.config.js", "func_name": "rawjs", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Rollup removes local variables unless used within a module. This plugin makes sure specified local variables are preserved and kept local. This plugin wouldn't be necessary if es2015 modules would be used.", "docstring_tokens": ["Rollup", "removes", "local", "variables", "unless", "used", "within", "a", "module", ".", "This", "plugin", "makes", "sure", "specified", "local", "variables", "are", "preserved", "and", "kept", "local", ".", "This", "plugin", "wouldn", "t", "be", "necessary", "if", "es2015", "modules", "would", "be", "used", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/rollup.config.js#L30-L50", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/modules/html.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create an HTML element with optional className, innerHTML, and style.\n\n@private\n@ignore", "docstring_tokens": ["Create", "an", "HTML", "element", "with", "optional", "className", "innerHTML", "and", "style", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/modules/html.js#L48-L62", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/Deflater.js", "func_name": "tr_init", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Initialize the tree data structures for a new zlib stream.", "docstring_tokens": ["Initialize", "the", "tree", "data", "structures", "for", "a", "new", "zlib", "stream", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/Deflater.js#L668-L685", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/Deflater.js", "func_name": "_tr_tally", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Save the match info and tally the frequency counts. Return true if the current block must be flushed.", "docstring_tokens": ["Save", "the", "match", "info", "and", "tally", "the", "frequency", "counts", ".", "Return", "true", "if", "the", "current", "block", "must", "be", "flushed", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/Deflater.js#L945-L982", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/Deflater.js", "func_name": "compress_block", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Send the block data compressed using the given Huffman trees", "docstring_tokens": ["Send", "the", "block", "data", "compressed", "using", "the", "given", "Huffman", "trees"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/Deflater.js#L985-L1029", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/Deflater.js", "func_name": "copy_block", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Copy a stored block, storing first the length and its one's complement if requested.", "docstring_tokens": ["Copy", "a", "stored", "block", "storing", "first", "the", "length", "and", "its", "one", "s", "complement", "if", "requested", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/Deflater.js#L1044-L1058", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/Deflater.js", "func_name": "_tr_stored_block", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Send a stored block", "docstring_tokens": ["Send", "a", "stored", "block"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/Deflater.js#L1061-L1067", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/modules/context2d.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "helper functions \nGet the decimal values of r, g, b and a\n\n@name getRGBA\n@function\n@private\n@ignore", "docstring_tokens": ["helper", "functions", "Get", "the", "decimal", "values", "of", "r", "g", "b", "and", "a"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/modules/context2d.js#L937-L1002", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/modules/context2d.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Should only be used if pageWrapYEnabled is true\n\n@name setPageByYPosition\n@function\n@private\n@ignore\n@returns One-based Page Number", "docstring_tokens": ["Should", "only", "be", "used", "if", "pageWrapYEnabled", "is", "true"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/modules/context2d.js#L1229-L1254", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/modules/context2d.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "De Casteljau algorithm", "docstring_tokens": ["De", "Casteljau", "algorithm"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/modules/context2d.js#L1908-L1952", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/deprecated/from_html.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create function render header on every page", "docstring_tokens": ["Create", "function", "render", "header", "on", "every", "page"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/deprecated/from_html.js#L592-L619", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "getFont", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a document-specific font key - a label assigned to a\nfont name + font type combination at the time the font was added\nto the font inventory.\n\nFont key is used as label for the desired font for a block of text\nto be added to the PDF document stream.\n@private\n@function\n@param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\n@param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\n@returns {string} Font key.\n@ignore", "docstring_tokens": ["Returns", "a", "document", "-", "specific", "font", "key", "-", "a", "label", "assigned", "to", "a", "font", "name", "+", "font", "type", "combination", "at", "the", "time", "the", "font", "was", "added", "to", "the", "font", "inventory", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L1427-L1454", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "calculateFontSpace", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Small workaround for calculating the TextMetric approximately.\n\n@param text\n@param fontsize\n@returns {TextMetrics} (Has Height and Width)", "docstring_tokens": ["Small", "workaround", "for", "calculating", "the", "TextMetric", "approximately", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L3877-L3893", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "YesPushDown", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the standard On Appearance for a CheckBox\n\n@returns {AcroFormXObject}", "docstring_tokens": ["Returns", "the", "standard", "On", "Appearance", "for", "a", "CheckBox"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L5996-L6018", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "OffPushDown", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the standard Off Appearance for a CheckBox\n\n@returns {AcroFormXObject}", "docstring_tokens": ["Returns", "the", "standard", "Off", "Appearance", "for", "a", "CheckBox"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L6052-L6060", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "createDefaultAppearanceStream", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the standard Appearance\n\n@returns {AcroFormXObject}", "docstring_tokens": ["Returns", "the", "standard", "Appearance"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L6237-L6247", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "splitLongWord", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "returns array of lines", "docstring_tokens": ["returns", "array", "of", "lines"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L13629-L13663", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "splitParagraphIntoLines", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Note, all sizing inputs for this function must be in \"font measurement units\" By default, for PDF, it's \"point\".", "docstring_tokens": ["Note", "all", "sizing", "inputs", "for", "this", "function", "must", "be", "in", "font", "measurement", "units", "By", "default", "for", "PDF", "it", "s", "point", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L13667-L13767", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "dist/jspdf.node.debug.js", "func_name": "bi_flush", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Flush the bit buffer, keeping at most 7 bits in it.", "docstring_tokens": ["Flush", "the", "bit", "buffer", "keeping", "at", "most", "7", "bits", "in", "it", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/dist/jspdf.node.debug.js#L18006-L18016", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/omggif.js", "func_name": "GifWriterOutputLZWCodeStream", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Main compression routine, palette indexes -> LZW code stream. |index_stream| must have at least one entry.", "docstring_tokens": ["Main", "compression", "routine", "palette", "indexes", "-", ">", "LZW", "code", "stream", ".", "|index_stream|", "must", "have", "at", "least", "one", "entry", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/omggif.js#L225-L364", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "src/libs/Blob.js", "func_name": "mapArrayBufferViews", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Helper function that maps ArrayBufferViews to ArrayBuffers\nUsed by BlobBuilder constructor and old browsers that didn't\nsupport it in the Blob constructor.", "docstring_tokens": ["Helper", "function", "that", "maps", "ArrayBufferViews", "to", "ArrayBuffers", "Used", "by", "BlobBuilder", "constructor", "and", "old", "browsers", "that", "didn", "t", "support", "it", "in", "the", "Blob", "constructor", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/src/libs/Blob.js#L49-L67", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "cli.js", "func_name": "promptUser", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Ask use a few questions on command prompt\n@returns {Promise} The promise with the result of the prompt", "docstring_tokens": ["Ask", "use", "a", "few", "questions", "on", "command", "prompt"], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/cli.js#L39-L94", "partition": "valid"} +{"repo": "MrRio/jsPDF", "path": "examples/js/basic.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Since images are loaded asyncronously, we must wait to create the pdf until we actually have the image data. If we already had the jpeg image binary data loaded into a string, we create the pdf without delay.", "docstring_tokens": ["Since", "images", "are", "loaded", "asyncronously", "we", "must", "wait", "to", "create", "the", "pdf", "until", "we", "actually", "have", "the", "image", "data", ".", "If", "we", "already", "had", "the", "jpeg", "image", "binary", "data", "loaded", "into", "a", "string", "we", "create", "the", "pdf", "without", "delay", "."], "sha": "1d2f97628cda87041f21357ce0ad5b472906fc53", "url": "https://github.com/MrRio/jsPDF/blob/1d2f97628cda87041f21357ce0ad5b472906fc53/examples/js/basic.js#L254-L262", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "src/js/plugins/youtube.js", "func_name": "parseId", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Parse YouTube ID from URL", "docstring_tokens": ["Parse", "YouTube", "ID", "from", "URL"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/src/js/plugins/youtube.js#L17-L24", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "isSameException", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns true if the two input exception interfaces have the same content", "docstring_tokens": ["Returns", "true", "if", "the", "two", "input", "exception", "interfaces", "have", "the", "same", "content"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L609-L617", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "isSameStacktrace", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns true if the two input stack trace interfaces have the same content", "docstring_tokens": ["Returns", "true", "if", "the", "two", "input", "stack", "trace", "interfaces", "have", "the", "same", "content"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L623-L641", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "fill", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Polyfill a method\n@param obj object e.g. `document`\n@param name method name present on object e.g. `addEventListener`\n@param replacement replacement function\n@param track {optional} record instrumentation to an array", "docstring_tokens": ["Polyfill", "a", "method"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L651-L661", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "safeJoin", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Join values in array\n@param input array of values to be joined together\n@param delimiter string to be placed in-between values\n@returns {string}", "docstring_tokens": ["Join", "values", "in", "array"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L670-L683", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "notifyHandlers", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Dispatch stack information to all handlers.\n@param {Object.} stack", "docstring_tokens": ["Dispatch", "stack", "information", "to", "all", "handlers", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L961-L981", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "traceKitWindowOnError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Ensures all global unhandled exceptions are recorded.\nSupported by Gecko and IE.\n@param {string} msg Error message.\n@param {string} url URL of script that generated the exception.\n@param {(number|string)} lineNo The line number at which the error\noccurred.\n@param {?(number|string)} colNo The column number at which the error\noccurred.\n@param {?Error} ex The actual Error object.", "docstring_tokens": ["Ensures", "all", "global", "unhandled", "exceptions", "are", "recorded", ".", "Supported", "by", "Gecko", "and", "IE", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L997-L1047", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "report", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Reports an unhandled Error to TraceKit.\n@param {Error} ex\n@param {?boolean} rethrow If false, do not re-throw the exception.\nOnly used for window.onerror to not cause an infinite loop of\nrethrowing.", "docstring_tokens": ["Reports", "an", "unhandled", "Error", "to", "TraceKit", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L1086-L1114", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "augmentStackTraceWithInitialElement", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Adds information about the first frame to incomplete stack traces.\nSafari and IE require this to get complete data on the first frame.\n@param {Object.} stackInfo Stack trace information from\none of the compute* methods.\n@param {string} url The URL of the script that caused an error.\n@param {(number|string)} lineNo The line number of the script that\ncaused an error.\n@param {string=} message The error generated by the browser, which\nhopefully contains the name of the object that caused the error.\n@return {boolean} Whether or not the stack information was\naugmented.", "docstring_tokens": ["Adds", "information", "about", "the", "first", "frame", "to", "incomplete", "stack", "traces", ".", "Safari", "and", "IE", "require", "this", "to", "get", "complete", "data", "on", "the", "first", "frame", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L1358-L1390", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "computeStackTrace", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Computes a stack trace for an exception.\n@param {Error} ex\n@param {(string|number)=} depth", "docstring_tokens": ["Computes", "a", "stack", "trace", "for", "an", "exception", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L1466-L1499", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "_promiseRejectionHandler", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Callback used for `unhandledrejection` event\n\n@param {PromiseRejectionEvent} event An object containing\npromise: the Promise that was rejected\nreason: the value with which the Promise was rejected\n@return void", "docstring_tokens": ["Callback", "used", "for", "unhandledrejection", "event"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L2260-L2269", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "captureException", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Manually capture an exception and send it over to Sentry\n\n@param {error} ex An exception to be logged\n@param {object} options A specific set of options for this error [optional]\n@return {Raven}", "docstring_tokens": ["Manually", "capture", "an", "exception", "and", "send", "it", "over", "to", "Sentry"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L2299-L2361", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "_breadcrumbEventHandler", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Wraps addEventListener to capture UI breadcrumbs\n@param evtName the event name (e.g. \"click\")\n@returns {Function}\n@private", "docstring_tokens": ["Wraps", "addEventListener", "to", "capture", "UI", "breadcrumbs"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L2763-L2793", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "_captureUrlChange", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Captures a breadcrumb of type \"navigation\", normalizing input URLs\n@param to the originating URL\n@param from the target URL\n@private", "docstring_tokens": ["Captures", "a", "breadcrumb", "of", "type", "navigation", "normalizing", "input", "URLs"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L2844-L2863", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "_isRepeatData", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns true if the in-process data payload matches the signature\nof the previously-sent data\n\nNOTE: This has to be done at this level because TraceKit can generate\ndata from window.onerror WITHOUT an exception object (IE8, IE9,\nother old browsers). This can take the form of an \"exception\"\ndata object with a single frame (derived from the onerror args).", "docstring_tokens": ["Returns", "true", "if", "the", "in", "-", "process", "data", "payload", "matches", "the", "signature", "of", "the", "previously", "-", "sent", "data"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L3558-L3572", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getDecimalPlaces", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get the number of decimal places", "docstring_tokens": ["Get", "the", "number", "of", "decimal", "places"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4054-L4064", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "round", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Round to the nearest step", "docstring_tokens": ["Round", "to", "the", "nearest", "step"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4066-L4073", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "RangeTouch", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Setup a new instance\n@param {String|Element} target\n@param {Object} options", "docstring_tokens": ["Setup", "a", "new", "instance"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4083-L4100", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setup", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Setup multiple instances\n@param {String|Element|NodeList|Array} target\n@param {Object} options", "docstring_tokens": ["Setup", "multiple", "instances"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4213-L4257", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "toggleListener", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Toggle event listener", "docstring_tokens": ["Toggle", "event", "listener"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4417-L4458", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "on", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Bind event handler", "docstring_tokens": ["Bind", "event", "handler"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4460-L4466", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "once", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Bind once-only event handler", "docstring_tokens": ["Bind", "once", "-", "only", "event", "handler"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4476-L4495", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "unbindListeners", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Unbind all cached event listeners", "docstring_tokens": ["Unbind", "all", "cached", "event", "listeners"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4518-L4529", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getDeep", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get a nested value in an object", "docstring_tokens": ["Get", "a", "nested", "value", "in", "an", "object"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4543-L4547", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "extend", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Deep extend destination object with N more objects", "docstring_tokens": ["Deep", "extend", "destination", "object", "with", "N", "more", "objects"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4549-L4578", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "createElement", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create a DocumentFragment", "docstring_tokens": ["Create", "a", "DocumentFragment"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4625-L4640", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "insertAfter", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Inaert an element after another", "docstring_tokens": ["Inaert", "an", "element", "after", "another"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4642-L4648", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "insertElement", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Insert a DocumentFragment", "docstring_tokens": ["Insert", "a", "DocumentFragment"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4650-L4656", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "emptyElement", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Remove all child elements", "docstring_tokens": ["Remove", "all", "child", "elements"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4671-L4682", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getAttributesFromSelector", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get an attribute object from a string selector", "docstring_tokens": ["Get", "an", "attribute", "object", "from", "a", "string", "selector"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4693-L4745", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "toggleClass", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Mirror Element.classList.toggle, with IE compatibility for \"force\" argument", "docstring_tokens": ["Mirror", "Element", ".", "classList", ".", "toggle", "with", "IE", "compatibility", "for", "force", "argument"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4765-L4784", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "hasClass", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Has class name", "docstring_tokens": ["Has", "class", "name"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4786-L4788", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "matches$1", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Element matches selector", "docstring_tokens": ["Element", "matches", "selector"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4790-L4798", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "trapFocus", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Trap focus inside container", "docstring_tokens": ["Trap", "focus", "inside", "container"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4808-L4841", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setFocus", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set focus and tab focus class", "docstring_tokens": ["Set", "focus", "and", "tab", "focus", "class"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4843-L4859", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "repaint", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Force repaint of element", "docstring_tokens": ["Force", "repaint", "of", "element"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4876-L4886", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "check", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Check for support Basic functionality vs full UI", "docstring_tokens": ["Check", "for", "support", "Basic", "functionality", "vs", "full", "UI"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L4916-L4924", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setAspectRatio", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set aspect ratio for responsive container", "docstring_tokens": ["Set", "aspect", "ratio", "for", "responsive", "container"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5055-L5082", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getQualityOptions", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get quality levels", "docstring_tokens": ["Get", "quality", "levels"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5106-L5111", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "closest", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get the closest value in an array", "docstring_tokens": ["Get", "the", "closest", "value", "in", "an", "array"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5206-L5214", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "replaceAll", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Replace all occurances of a string in a string", "docstring_tokens": ["Replace", "all", "occurances", "of", "a", "string", "in", "a", "string"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5244-L5249", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "toTitleCase", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Convert to title case", "docstring_tokens": ["Convert", "to", "title", "case"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5251-L5256", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "stripHTML", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Remove HTML from a string", "docstring_tokens": ["Remove", "HTML", "from", "a", "string"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5280-L5286", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getHTML", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Like outerHTML, but also works for DocumentFragment", "docstring_tokens": ["Like", "outerHTML", "but", "also", "works", "for", "DocumentFragment"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5288-L5292", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "formatTime", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Format time to UI friendly string", "docstring_tokens": ["Format", "time", "to", "UI", "friendly", "string"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5525-L5553", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getIconUrl", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get icon URL", "docstring_tokens": ["Get", "icon", "URL"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5557-L5564", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "findElements", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Find the UI controls", "docstring_tokens": ["Find", "the", "UI", "controls"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5566-L5609", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "createLabel", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create hidden text label", "docstring_tokens": ["Create", "hidden", "text", "label"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5638-L5645", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "createBadge", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create a badge", "docstring_tokens": ["Create", "a", "badge"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5647-L5659", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "createTime", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create time display", "docstring_tokens": ["Create", "time", "display"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5836-L5845", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "createMenuItem", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create a settings menu item", "docstring_tokens": ["Create", "a", "settings", "menu", "item"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5904-L5981", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "formatTime$1", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Format a time for display", "docstring_tokens": ["Format", "a", "time", "for", "display"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5983-L5995", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "updateTimeDisplay", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update the displayed time", "docstring_tokens": ["Update", "the", "displayed", "time"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L5997-L6009", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "updateVolume", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update volume UI and storage", "docstring_tokens": ["Update", "volume", "UI", "and", "storage"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6011-L6025", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setRange", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update seek value and lower fill", "docstring_tokens": ["Update", "seek", "value", "and", "lower", "fill"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6027-L6038", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "updateRangeFill", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Webkit polyfill for lower fill range", "docstring_tokens": ["Webkit", "polyfill", "for", "lower", "fill", "range"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6090-L6120", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "updateSeekTooltip", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update hover tooltip for seeking", "docstring_tokens": ["Update", "hover", "tooltip", "for", "seeking"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6122-L6170", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "timeUpdate", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Handle time change event", "docstring_tokens": ["Handle", "time", "change", "event"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6172-L6184", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "durationUpdate", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Show the duration on metadataloaded or durationchange events", "docstring_tokens": ["Show", "the", "duration", "on", "metadataloaded", "or", "durationchange", "events"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6186-L6221", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "updateSetting", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update the selected setting", "docstring_tokens": ["Update", "the", "selected", "setting"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6227-L6273", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getLabel", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Translate a value into a nice label", "docstring_tokens": ["Translate", "a", "value", "into", "a", "nice", "label"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6275-L6299", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setQualityMenu", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set the quality menu", "docstring_tokens": ["Set", "the", "quality", "menu"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6301-L6355", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getBadge", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get the badge HTML for HD, 4K etc", "docstring_tokens": ["Get", "the", "badge", "HTML", "for", "HD", "4K", "etc"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6331-L6339", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setSpeedMenu", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set a list of available captions languages", "docstring_tokens": ["Set", "a", "list", "of", "available", "captions", "languages"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6443-L6486", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getMenuSize", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get the natural size of a menu panel", "docstring_tokens": ["Get", "the", "natural", "size", "of", "a", "menu", "panel"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6559-L6575", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "showMenuPanel", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Show a panel in the menu", "docstring_tokens": ["Show", "a", "panel", "in", "the", "menu"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6577-L6627", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setDownloadUrl", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set the download URL", "docstring_tokens": ["Set", "the", "download", "URL"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6629-L6638", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "replace", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Replace props with their value", "docstring_tokens": ["Replace", "props", "with", "their", "value"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L6965-L6975", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "parseUrl$2", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Parse a string to a URL object\n@param {String} input - the URL to be parsed\n@param {Boolean} safe - failsafe parsing", "docstring_tokens": ["Parse", "a", "string", "to", "a", "URL", "object"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7058-L7073", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "buildUrlParams", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Convert object to URLSearchParams", "docstring_tokens": ["Convert", "object", "to", "URLSearchParams"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7075-L7089", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "update", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update available language options in settings based on tracks", "docstring_tokens": ["Update", "available", "language", "options", "in", "settings", "based", "on", "tracks"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7173-L7218", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "toggle", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Toggle captions display Used internally for the toggleCaptions method, with the passive option forced to false", "docstring_tokens": ["Toggle", "captions", "display", "Used", "internally", "for", "the", "toggleCaptions", "method", "with", "the", "passive", "option", "forced", "to", "false"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7221-L7269", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "set", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set captions by track index Used internally for the currentTrack setter with the passive option forced to false", "docstring_tokens": ["Set", "captions", "by", "track", "index", "Used", "internally", "for", "the", "currentTrack", "setter", "with", "the", "passive", "option", "forced", "to", "false"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7272-L7326", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setLanguage", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set captions by language Used internally for the language setter with the passive option forced to false", "docstring_tokens": ["Set", "captions", "by", "language", "Used", "internally", "for", "the", "language", "setter", "with", "the", "passive", "option", "forced", "to", "false"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7329-L7344", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getTracks", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get current valid caption tracks If update is false it will also ignore tracks without metadata This is used to \"freeze\" the language options when captions.update is false", "docstring_tokens": ["Get", "current", "valid", "caption", "tracks", "If", "update", "is", "false", "it", "will", "also", "ignore", "tracks", "without", "metadata", "This", "is", "used", "to", "freeze", "the", "language", "options", "when", "captions", ".", "update", "is", "false"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7348-L7361", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "findTrack", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Match tracks based on languages and get the first", "docstring_tokens": ["Match", "tracks", "based", "on", "languages", "and", "get", "the", "first"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7363-L7385", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getLabel", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get UI label for track", "docstring_tokens": ["Get", "UI", "label", "for", "track"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7391-L7411", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getProviderByUrl", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get provider by URL\n@param {String} url", "docstring_tokens": ["Get", "provider", "by", "URL"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L7824-L7836", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "get", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Determine if fullscreen is enabled", "docstring_tokens": ["Determine", "if", "fullscreen", "is", "enabled"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8078-L8080", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "toggleNativeControls", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Toggle native HTML5 media controls", "docstring_tokens": ["Toggle", "native", "HTML5", "media", "controls"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8170-L8178", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "build", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Setup the UI", "docstring_tokens": ["Setup", "the", "UI"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8180-L8252", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setTitle", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Setup aria attribute for play and iframe title", "docstring_tokens": ["Setup", "aria", "attribute", "for", "play", "and", "iframe", "title"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8254-L8280", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "checkPlaying", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Check playing state", "docstring_tokens": ["Check", "playing", "state"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8327-L8345", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "checkLoading", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Check if media is loading", "docstring_tokens": ["Check", "if", "media", "is", "loading"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8347-L8360", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "toggleControls", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Toggle controls based on state and `force` argument", "docstring_tokens": ["Toggle", "controls", "based", "on", "state", "and", "force", "argument"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8362-L8371", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "removeCurrent", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Remove current classes", "docstring_tokens": ["Remove", "current", "classes"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8577-L8581", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setPlayerSize", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Resize on fullscreen change", "docstring_tokens": ["Resize", "on", "fullscreen", "change"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L8690-L8700", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "subscribe", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Subscribe to bundle load event.\n@param {string[]} bundleIds - Bundle ids\n@param {Function} callbackFn - The callback function", "docstring_tokens": ["Subscribe", "to", "bundle", "load", "event", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L9176-L9208", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "publish", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Publish bundle load event.\n@param {string} bundleId - Bundle id\n@param {string[]} pathsNotFound - List of files not found", "docstring_tokens": ["Publish", "bundle", "load", "event", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L9216-L9229", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "executeCallbacks", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Execute callbacks.\n@param {Object or Function} args - The callback args\n@param {string[]} depsNotFound - List of dependencies not found", "docstring_tokens": ["Execute", "callbacks", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L9237-L9244", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "loadFile", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Load individual file.\n@param {string} path - The file path\n@param {Function} callbackFn - The callback function", "docstring_tokens": ["Load", "individual", "file", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L9252-L9319", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "loadjs", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Initiate script load and register bundle.\n@param {(string|string[])} paths - The file paths\n@param {(string|Function|Object)} [arg1] - The (1) bundleId or (2) success\ncallback or (3) object literal with success/error arguments, numRetries,\netc.\n@param {(Function|Object)} [arg2] - The (1) success callback or (2) object\nliteral with success/error arguments, numRetries, etc.", "docstring_tokens": ["Initiate", "script", "load", "and", "register", "bundle", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L9365-L9398", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "getTitle", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get the media title", "docstring_tokens": ["Get", "the", "media", "title"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L9862-L9883", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "Ads", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Ads constructor.\n@param {Object} player\n@return {Ads}", "docstring_tokens": ["Ads", "constructor", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L10262-L10290", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "load", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Load the IMA SDK", "docstring_tokens": ["Load", "the", "IMA", "SDK"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L10298-L10316", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "setupIMA", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "In order for the SDK to display ads for our video, we need to tell it where to put them,\nso here we define our ad container. This div is set up to render on top of the video player.\nUsing the code below, we tell the SDK to render ads within that div. We also provide a\nhandle to the content video player - the SDK will poll the current time of our player to\nproperly place mid-rolls. After we create the ad display container, we initialize it. On\nmobile devices, this initialization is done as the result of a user action.", "docstring_tokens": ["In", "order", "for", "the", "SDK", "to", "display", "ads", "for", "our", "video", "we", "need", "to", "tell", "it", "where", "to", "put", "them", "so", "here", "we", "define", "our", "ad", "container", ".", "This", "div", "is", "set", "up", "to", "render", "on", "top", "of", "the", "video", "player", ".", "Using", "the", "code", "below", "we", "tell", "the", "SDK", "to", "render", "ads", "within", "that", "div", ".", "We", "also", "provide", "a", "handle", "to", "the", "content", "video", "player", "-", "the", "SDK", "will", "poll", "the", "current", "time", "of", "our", "player", "to", "properly", "place", "mid", "-", "rolls", ".", "After", "we", "create", "the", "ad", "display", "container", "we", "initialize", "it", ".", "On", "mobile", "devices", "this", "initialization", "is", "done", "as", "the", "result", "of", "a", "user", "action", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L10355-L10371", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "PreviewThumbnails", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "PreviewThumbnails constructor.\n@param {Plyr} player\n@return {PreviewThumbnails}", "docstring_tokens": ["PreviewThumbnails", "constructor", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L10945-L10959", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "clamp", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a number whose value is limited to the given range.\n\nExample: limit the output of this computation to between 0 and 255\n(x * 255).clamp(0, 255)\n\n@param {Number} input\n@param {Number} min The lower boundary of the output range\n@param {Number} max The upper boundary of the output range\n@returns A number in the range [min, max]\n@type Number", "docstring_tokens": ["Returns", "a", "number", "whose", "value", "is", "limited", "to", "the", "given", "range", "."], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L11703-L11708", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "togglePlay", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Toggle playback based on current status\n@param {Boolean} input", "docstring_tokens": ["Toggle", "playback", "based", "on", "current", "status"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L12028-L12037", "partition": "valid"} +{"repo": "sampotts/plyr", "path": "demo/dist/demo.js", "func_name": "newSource", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set a new source", "docstring_tokens": ["Set", "a", "new", "source"], "sha": "80aa6ffe435b170466838f977d52438a95e22186", "url": "https://github.com/sampotts/plyr/blob/80aa6ffe435b170466838f977d52438a95e22186/demo/dist/demo.js#L13074-L13169", "partition": "valid"} +{"repo": "wenzhixin/bootstrap-table", "path": "src/extensions/group-by-v2/bootstrap-table-group-by.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "it only does '%s', and return '' when arguments are undefined", "docstring_tokens": ["it", "only", "does", "%s", "and", "return", "when", "arguments", "are", "undefined"], "sha": "19245b8f14cfa4068040c6a65a72daad0a851ad5", "url": "https://github.com/wenzhixin/bootstrap-table/blob/19245b8f14cfa4068040c6a65a72daad0a851ad5/src/extensions/group-by-v2/bootstrap-table-group-by.js#L10-L25", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/cart-values/index.js", "func_name": "preprocessCartForServer", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Preprocesses cart for server.\n\n@param {Object} cart Cart object.\n@returns {Object} A new cart object.", "docstring_tokens": ["Preprocesses", "cart", "for", "server", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/cart-values/index.js#L46-L89", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/cart-values/index.js", "func_name": "getNewMessages", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Compare two different cart objects and get the messages of newest one\n\nIt's possible that we're comparing two carts that have the same server header date.\nThis means the changes only happened locally and the messages returned will be [].\n\n@param {cartValue} [previousCartValue] - the previously loaded cart\n@param {cartValue} [nextCartValue] - the new cart value\n@returns {array} [nextCartMessages] - an array of messages about the state of the cart", "docstring_tokens": ["Compare", "two", "different", "cart", "objects", "and", "get", "the", "messages", "of", "newest", "one"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/cart-values/index.js#L213-L232", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/login/ssr.js", "func_name": "isRedirectToValidForSsr", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Verifies if the given redirect_to value enables SSR or not.\n\n@param {string} redirectToQueryValue The URI-encoded value of the analyzed redirect_to\n@return {boolean} If the value of &redirect_to= on the log-in page is compatible with SSR", "docstring_tokens": ["Verifies", "if", "the", "given", "redirect_to", "value", "enables", "SSR", "or", "not", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/login/ssr.js#L38-L48", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/highlight/index.js", "func_name": "highlight", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Wraps strings in a html to highlight\n@param {string} term Term to search for\n@param {string} html HTML string to search and wrap\n@param {HTMLElement} [wrapperNode] Custom node to wrap the elements with, defaults to \n@returns {string} Wrapped HTML", "docstring_tokens": ["Wraps", "strings", "in", "a", "html", "to", "highlight"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/highlight/index.js#L95-L107", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/wpcom-undocumented/lib/mailing-list.js", "func_name": "MailingList", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "`MailingList` constructor.\n\n@constructor\n@param {WPCOM} wpcom\n@public", "docstring_tokens": ["MailingList", "constructor", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/wpcom-undocumented/lib/mailing-list.js#L18-L25", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/embed/plugin.js", "func_name": "embed", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Manages an EmbedDialog to allow editing the URL of an embed inside the editor.\n\n@param {object} editor An instance of TinyMCE", "docstring_tokens": ["Manages", "an", "EmbedDialog", "to", "allow", "editing", "the", "URL", "of", "an", "embed", "inside", "the", "editor", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/embed/plugin.js#L22-L67", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/bundler/css-hot-reload.js", "func_name": "onexit", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Handle 'make build-css' success or failure\n@param {Number} code The exit code", "docstring_tokens": ["Handle", "make", "build", "-", "css", "success", "or", "failure"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/bundler/css-hot-reload.js#L67-L99", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/bundler/css-hot-reload.js", "func_name": "updateChangedCssFiles", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates the MD5 hash of the public CSS files and returns the changed ones\nin a list.\n@returns {Array} an array of changed files (string)", "docstring_tokens": ["Updates", "the", "MD5", "hash", "of", "the", "public", "CSS", "files", "and", "returns", "the", "changed", "ones", "in", "a", "list", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/bundler/css-hot-reload.js#L106-L118", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/sites/plans/reducer.js", "func_name": "updateSiteState", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a new state with the given attributes updated for the specified site.\n\n@param {Object} state current state\n@param {Number} siteId identifier of the site\n@param {Object} attributes list of attributes and their values\n@returns {Object} the new state", "docstring_tokens": ["Returns", "a", "new", "state", "with", "the", "given", "attributes", "updated", "for", "the", "specified", "site", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/sites/plans/reducer.js#L37-L41", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/data-layer/utils.js", "func_name": "isValidCategoriesArray", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Check that all categories in a given list are valid category objects.\n\n@param {Array} categories List of categories from the remote site API\n@return {Boolean} True if the categories are valid.", "docstring_tokens": ["Check", "that", "all", "categories", "in", "a", "given", "list", "are", "valid", "category", "objects", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/data-layer/utils.js#L29-L37", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/data-layer/utils.js", "func_name": "isValidProductCategory", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Check if the given category has the expected properties\n\n@param {Object} category A single category from the remote site API\n@return {Boolean} True if the category is valid.", "docstring_tokens": ["Check", "if", "the", "given", "category", "has", "the", "expected", "properties"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/data-layer/utils.js#L45-L55", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/user-settings/index.js", "func_name": "hasLanguageChanged", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Checks if an incoming change to settings.language is a change to the existing settings\nCurrently the assumption is that if a settings.locale_variant slug exists, then that is the current language\n\n@param {String} languageSettingValue the newly-set language slug string.\n@param {Object} settings user settings object.\n@return {Boolean} if the language setting has been changed.", "docstring_tokens": ["Checks", "if", "an", "incoming", "change", "to", "settings", ".", "language", "is", "a", "change", "to", "the", "existing", "settings", "Currently", "the", "assumption", "is", "that", "if", "a", "settings", ".", "locale_variant", "slug", "exists", "then", "that", "is", "the", "current", "language"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/user-settings/index.js#L62-L73", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/user-settings/index.js", "func_name": "UserSettings", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Initialize UserSettings with defaults\n\n@return {Undefined} undefined", "docstring_tokens": ["Initialize", "UserSettings", "with", "defaults"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/user-settings/index.js#L80-L90", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/domains/utils.js", "func_name": "getDomainNameFromReceiptOrCart", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Depending on the current step in checkout, the user's domain can be found in\neither the cart or the receipt.\n\n@param {?Object} receipt - The receipt for the transaction\n@param {?Object} cart - The cart for the transaction\n\n@return {?String} the name of the first domain for the transaction.", "docstring_tokens": ["Depending", "on", "the", "current", "step", "in", "checkout", "the", "user", "s", "domain", "can", "be", "found", "in", "either", "the", "cart", "or", "the", "receipt", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/domains/utils.js#L93-L109", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/css-hot-reload/index.js", "func_name": "bustHashForHrefs", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Replaces the old hash parameter with the current timestamp if `name` is `href`.\n@return {Object}", "docstring_tokens": ["Replaces", "the", "old", "hash", "parameter", "with", "the", "current", "timestamp", "if", "name", "is", "href", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/css-hot-reload/index.js#L28-L34", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/products/reducer.js", "func_name": "updateCachedProduct", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Merge a product into the products list\n\n@param {Array} products A list of products\n@param {Object} product A single product to update or add to the products list\n@return {Array} Updated product list", "docstring_tokens": ["Merge", "a", "product", "into", "the", "products", "list"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/products/reducer.js#L41-L57", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/products/reducer.js", "func_name": "setLoading", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set the loading status for a param set in state\n\n@param {Object} state The current state\n@param {Object} params Params of the query to update\n@param {Boolean} newStatus The new value to save\n@return {Object} Updated isLoading state", "docstring_tokens": ["Set", "the", "loading", "status", "for", "a", "param", "set", "in", "state"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/products/reducer.js#L67-L72", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/pages/index.js", "func_name": "generateStaticUrls", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Generate an object that maps asset names name to a server-relative urls.\nAssets in request and static files are included.\n\n@param {String} target The build target name.\n\n@returns {Object} Map of asset names to urls", "docstring_tokens": ["Generate", "an", "object", "that", "maps", "asset", "names", "name", "to", "a", "server", "-", "relative", "urls", ".", "Assets", "in", "request", "and", "static", "files", "are", "included", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/pages/index.js#L188-L197", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/pages/index.js", "func_name": "getAcceptedLanguagesFromHeader", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Given the content of an 'Accept-Language' request header, returns an array of the languages.\n\nThis differs slightly from other language functions, as it doesn't try to validate the language codes,\nor merge similar language codes.\n\n@param {string} header - The content of the AcceptedLanguages header.\n@return {Array} An array of language codes in the header, all in lowercase.", "docstring_tokens": ["Given", "the", "content", "of", "an", "Accept", "-", "Language", "request", "header", "returns", "an", "array", "of", "the", "languages", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/pages/index.js#L228-L244", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/pages/index.js", "func_name": "setUpCSP", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Sets up a Content Security Policy header\n@see https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP\n@param {Object} req Express request object\n@param {Object} res Express response object\n@param {Function} next a callback to call when done", "docstring_tokens": ["Sets", "up", "a", "Content", "Security", "Policy", "header"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/pages/index.js#L499-L568", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/post-metadata/index.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Given a post object, returns an array of float coordinates representing\nthe geographic location saved for that post, or `undefined` if the value\ncannot be determined.\n\n@param {Object} post Post object\n@return {string} Array of geographic float coordinates", "docstring_tokens": ["Given", "a", "post", "object", "returns", "an", "array", "of", "float", "coordinates", "representing", "the", "geographic", "location", "saved", "for", "that", "post", "or", "undefined", "if", "the", "value", "cannot", "be", "determined", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/post-metadata/index.js#L125-L138", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/post-metadata/index.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Given a post object, return a boolean, indicating whether the geo-location data\nassociated with the post is allowed to be displayed publicly.\n\n@param {Object} post Post object\n@returns {boolean|null} Whether the geo-location data is shared publicly.", "docstring_tokens": ["Given", "a", "post", "object", "return", "a", "boolean", "indicating", "whether", "the", "geo", "-", "location", "data", "associated", "with", "the", "post", "is", "allowed", "to", "be", "displayed", "publicly", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/post-metadata/index.js#L147-L172", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/domains/management/reducer.js", "func_name": "sanitizeExtra", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Drop data.extra if it's an array\n\nAssigning extra as an array (due to a bug in the server) leads to a\na really weird state that effectively disables the extra form for the user\npermanently.\n\nThese values will be persisted locally, so we need to handle them here\neven if we catch them all on the backend.\n\nIn case you're curios, Here's the weirdness:\n\nweird = Object.assign( [1,2,3], { foo:'bar' } )\n// [1, 2, 3, foo: \"bar\"] (wat?)\nweird.map( v => v );\n// [1, 2, 3] (no foo for you!)\n\n@param {Object} data Potential contact details\n@return {Object} Sanitized contact details", "docstring_tokens": ["Drop", "data", ".", "extra", "if", "it", "s", "an", "array"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/domains/management/reducer.js#L135-L138", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "transmitDraftId", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Monitors Gutenberg store for draft ID assignment and transmits it to parent frame when needed.\n\n@param {MessagePort} calypsoPort Port used for communication with parent frame.", "docstring_tokens": ["Monitors", "Gutenberg", "store", "for", "draft", "ID", "assignment", "and", "transmits", "it", "to", "parent", "frame", "when", "needed", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L25-L43", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "handlePostLocked", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Listens for post lock status changing to locked, and overrides the modal dialog\nactions, addind an event handler for the All Posts button, and changing the\nTake Over Url to work inside the iframe.\n\n@param {MessagePort} calypsoPort Port used for communication with parent frame.", "docstring_tokens": ["Listens", "for", "post", "lock", "status", "changing", "to", "locked", "and", "overrides", "the", "modal", "dialog", "actions", "addind", "an", "event", "handler", "for", "the", "All", "Posts", "button", "and", "changing", "the", "Take", "Over", "Url", "to", "work", "inside", "the", "iframe", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L158-L197", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "handlePostLockTakeover", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Listens for post lock status changing to locked, and for the post to have been taken over\nby another user, adding an event handler for the All Posts button.\n\n@param {MessagePort} calypsoPort Port used for communication with parent frame.", "docstring_tokens": ["Listens", "for", "post", "lock", "status", "changing", "to", "locked", "and", "for", "the", "post", "to", "have", "been", "taken", "over", "by", "another", "user", "adding", "an", "event", "handler", "for", "the", "All", "Posts", "button", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L205-L233", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "updateImageBlocks", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates all the blocks containing a given edited image.\n\n@param {Array} blocks Array of block objects for the current post.\n@param {Object} image The edited image.\n@param {number} image.id The image ID.\n@param {string} image.url The new image URL.\n@param {string} image.status The new image status. \"deleted\" or \"updated\" (default).\n@param {number} [image.transientId] The temporary ID assigned to uploading image.", "docstring_tokens": ["Updates", "all", "the", "blocks", "containing", "a", "given", "edited", "image", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L267-L276", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "updateFeaturedImagePreview", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "To update the featured image preview we need to manually modify the image in the `core` state. Though, there is no direct mechanism to also invalidate its cache and re-render the preview. As a workaround, we call `receiveEntityRecords`, normally used to update the state after a fetch, which has a handy `invalidateCache` parameter that does exactly what we need.", "docstring_tokens": ["To", "update", "the", "featured", "image", "preview", "we", "need", "to", "manually", "modify", "the", "image", "in", "the", "core", "state", ".", "Though", "there", "is", "no", "direct", "mechanism", "to", "also", "invalidate", "its", "cache", "and", "re", "-", "render", "the", "preview", ".", "As", "a", "workaround", "we", "call", "receiveEntityRecords", "normally", "used", "to", "update", "the", "state", "after", "a", "fetch", "which", "has", "a", "handy", "invalidateCache", "parameter", "that", "does", "exactly", "what", "we", "need", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L346-L363", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "handlePreview", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Prevents the default preview flow and sends a message to the parent frame\nso we preview a post from there.\n\n@param {MessagePort} calypsoPort Port used for communication with parent frame.", "docstring_tokens": ["Prevents", "the", "default", "preview", "flow", "and", "sends", "a", "message", "to", "the", "parent", "frame", "so", "we", "preview", "a", "post", "from", "there", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L382-L451", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "handleInsertClassicBlockMedia", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Listens for insert media events happening in a Media Modal opened in a Classic Block,\nand inserts the media into the appropriate block.\n\n@param {MessagePort} calypsoPort Port used for communication with parent frame.", "docstring_tokens": ["Listens", "for", "insert", "media", "events", "happening", "in", "a", "Media", "Modal", "opened", "in", "a", "Classic", "Block", "and", "inserts", "the", "media", "into", "the", "appropriate", "block", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L459-L472", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "handleGoToAllPosts", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Prevents the default closing flow and sends a message to the parent frame to\nperform the navigation on the client side.\n\n@param {MessagePort} calypsoPort Port used for communication with parent frame.", "docstring_tokens": ["Prevents", "the", "default", "closing", "flow", "and", "sends", "a", "message", "to", "the", "parent", "frame", "to", "perform", "the", "navigation", "on", "the", "client", "side", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L480-L490", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js", "func_name": "openLinksInParentFrame", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Modify links in order to open them in parent window and not in a child iframe.", "docstring_tokens": ["Modify", "links", "in", "order", "to", "open", "them", "in", "parent", "window", "and", "not", "in", "a", "child", "iframe", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/wpcom-block-editor/src/calypso/iframe-bridge-server.js#L495-L516", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/toolbar-pin/plugin.js", "func_name": "toolbarPin", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "TinyMCE plugin for toggling an `is-pinned` class on the editor container\nwhen the viewport scroll position exceeds the top edge of the container.\n\n@param {Object} editor TinyMCE editor instance", "docstring_tokens": ["TinyMCE", "plugin", "for", "toggling", "an", "is", "-", "pinned", "class", "on", "the", "editor", "container", "when", "the", "viewport", "scroll", "position", "exceeds", "the", "top", "edge", "of", "the", "container", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/toolbar-pin/plugin.js#L21-L93", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/localforage/localforage-bypass.js", "func_name": "_initStorage", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Config the localStorage backend, using options set in the config.", "docstring_tokens": ["Config", "the", "localStorage", "backend", "using", "options", "set", "in", "the", "config", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/localforage/localforage-bypass.js#L21-L34", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/after-the-deadline/plugin.js", "func_name": "finish", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Called when the user clicks \"Finish\" or when no more suggestions left. Removes all remaining spans and fires custom event.", "docstring_tokens": ["Called", "when", "the", "user", "clicks", "Finish", "or", "when", "no", "more", "suggestions", "left", ".", "Removes", "all", "remaining", "spans", "and", "fires", "custom", "event", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/after-the-deadline/plugin.js#L197-L218", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/notifications/src/panel/indices-to-html/index.js", "func_name": "build_chunks", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Recurse into the data and produce DOM node output\n\n@param {string} sub_text Plain-text upon which ranges act\n@param {Array} sub_ranges Position/applicable ranges array\n@param {Array} range_data All range data\n@param {DocumentFragment} container Destination DOM fragment for output\n@param {object} options", "docstring_tokens": ["Recurse", "into", "the", "data", "and", "produce", "DOM", "node", "output"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/notifications/src/panel/indices-to-html/index.js#L146-L227", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/notifications/src/panel/indices-to-html/index.js", "func_name": "find_largest_range", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Takes an array of range objects and returns the array index\nfor the first range with the longest span, meaning that if\nthere are multiple longest ranges with the same indices, the\nindex for the first one in the array will be returned.\n\n@param {Array} rs Range objects, having at least { indices: [ start, end ] }\n@returns {Number|null} Index in the range array with the longest span between indices or null if no valid ranges", "docstring_tokens": ["Takes", "an", "array", "of", "range", "objects", "and", "returns", "the", "array", "index", "for", "the", "first", "range", "with", "the", "longest", "span", "meaning", "that", "if", "there", "are", "multiple", "longest", "ranges", "with", "the", "same", "indices", "the", "index", "for", "the", "first", "one", "in", "the", "array", "will", "be", "returned", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/notifications/src/panel/indices-to-html/index.js#L238-L260", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/signup/index.node.js", "func_name": "setUpLocale", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set up the locale if there is one", "docstring_tokens": ["Set", "up", "the", "locale", "if", "there", "is", "one"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/signup/index.node.js#L21-L31", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/data-layer/wpcom/sites/simple-payments/index.js", "func_name": "customPostMetadataToProductAttributes", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Convert custom post metadata array to product attributes\n@param { Array } metadata Array of post metadata\n@returns { Object } properties extracted from the metadata, to be merged into the product object", "docstring_tokens": ["Convert", "custom", "post", "metadata", "array", "to", "product", "attributes"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/data-layer/wpcom/sites/simple-payments/index.js#L43-L63", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/media-serialization/strategies/string.js", "func_name": "parseAsShortcode", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Given a media string, attempts to parse as a shortcode and returns an\nobject containing all detected values.\n\n@param {string} node Media object to parse\n@param {Object} _parsed In recursion, the known values\n@return {Object} Object of all detected values", "docstring_tokens": ["Given", "a", "media", "string", "attempts", "to", "parse", "as", "a", "shortcode", "and", "returns", "an", "object", "containing", "all", "detected", "values", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/media-serialization/strategies/string.js#L17-L26", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/media-serialization/strategies/string.js", "func_name": "parseAsElement", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Given a media string, attempts to parse as an HTMLElement and returns an\nobject containing all detected values.\n\n@param {string} node Media object to parse\n@param {Object} _parsed In recursion, the known values\n@return {Object} Object of all detected values", "docstring_tokens": ["Given", "a", "media", "string", "attempts", "to", "parse", "as", "an", "HTMLElement", "and", "returns", "an", "object", "containing", "all", "detected", "values", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/media-serialization/strategies/string.js#L36-L46", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/query-manager/theme/key.js", "func_name": "isDefaultOrNullQueryValue", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns true if the specified key value query pair is identical to that of\nthe default theme query, is null, or is undefined.\n\n@param {*} value Value to check\n@param {String} key Key to check\n@return {Boolean} Whether key value matches default query or is null", "docstring_tokens": ["Returns", "true", "if", "the", "specified", "key", "value", "query", "pair", "is", "identical", "to", "that", "of", "the", "default", "theme", "query", "is", "null", "or", "is", "undefined", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/query-manager/theme/key.js#L21-L23", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "settings", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with latest MailChimp connected plugin settings\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "latest", "MailChimp", "connected", "plugin", "settings"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L45-L67", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "settingsRequest", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with settings request status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "settings", "request", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L76-L85", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "settingsRequestError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with settings request error\nHolds information only for latest request\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "settings", "request", "error", "Holds", "information", "only", "for", "latest", "request"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L95-L105", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "syncStatus", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with latest MailChimp connected plugin sync status.\nThis is sync between plugin and mailchimp server\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "latest", "MailChimp", "connected", "plugin", "sync", "status", ".", "This", "is", "sync", "between", "plugin", "and", "mailchimp", "server"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L115-L123", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "syncStatusRequest", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with sync status request status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "sync", "status", "request", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L132-L141", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "resyncRequest", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with resync request status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "resync", "request", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L170-L179", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "apiKeySubmit", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with api key submit status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "api", "key", "submit", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L208-L217", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "apiKeySubmitError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with api key submit error\nHolds information only for latest request\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "api", "key", "submit", "error", "Holds", "information", "only", "for", "latest", "request"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L227-L237", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "storeInfoSubmit", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with store info submit status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "store", "info", "submit", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L246-L255", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "storeInfoSubmitError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with store info submit error\nHolds information only for latest request\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "store", "info", "submit", "error", "Holds", "information", "only", "for", "latest", "request"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L265-L275", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "listsRequest", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with lists request status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "lists", "request", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L284-L293", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "listsRequestError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with list request error\nHolds information only for latest request\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "list", "request", "error", "Holds", "information", "only", "for", "latest", "request"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L303-L313", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "newsletterSettingsSubmit", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with newsletter submit status\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "newsletter", "submit", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L322-L331", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js", "func_name": "newsletterSettingsSubmitError", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with newsletter settings submit error\nHolds information only for latest request\n\n@param {Object} state Current state\n@param {Object} action Action\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "newsletter", "settings", "submit", "error", "Holds", "information", "only", "for", "latest", "request"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/mailchimp/reducer.js#L341-L353", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/invites/reducer.js", "func_name": "deleteInvites", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns an array of site invites, without the deleted invite objects.\n\n@param {Array} siteInvites Array of invite objects.\n@param {Array} invitesToDelete Array of invite keys to remove.\n@return {Array} Updated array of invite objects.", "docstring_tokens": ["Returns", "an", "array", "of", "site", "invites", "without", "the", "deleted", "invite", "objects", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/invites/reducer.js#L109-L111", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/local-list/index.js", "func_name": "StatsDataLocalList", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Internal dependencies\n \nStatsDataLocalList component\n\n@api public", "docstring_tokens": ["Internal", "dependencies", "StatsDataLocalList", "component"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/local-list/index.js#L22-L35", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/data-layer/products/index.js", "func_name": "updatedAction", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Wraps an action with a product update action.\n\n@param {Number} siteId The id of the site upon which the request should be made.\n@param {Object} originatingAction The action which precipitated this request.\n@param {Object} successAction Will be dispatched with extra props: { sentData, receivedData }\n@param {Object} [sentData] The sentData to be embedded in the successAction along with receivedData.\n@return {Function} Curried function to be dispatched.", "docstring_tokens": ["Wraps", "an", "action", "with", "a", "product", "update", "action", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/data-layer/products/index.js#L60-L67", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/purchases/index.js", "func_name": "getPurchasesBySite", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns an array of sites objects, each of which contains an array of purchases.\n\n@param {array} purchases An array of purchase objects.\n@param {array} sites An array of site objects\n@return {array} An array of sites with purchases attached.", "docstring_tokens": ["Returns", "an", "array", "of", "sites", "objects", "each", "of", "which", "contains", "an", "array", "of", "purchases", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/purchases/index.js#L38-L64", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/purchases/index.js", "func_name": "handleRenewNowClick", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Adds a purchase renewal to the cart and redirects to checkout.\n\n@param {Object} purchase - the purchase to be renewed\n@param {string} siteSlug - the site slug to renew the purchase for", "docstring_tokens": ["Adds", "a", "purchase", "renewal", "to", "the", "cart", "and", "redirects", "to", "checkout", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/purchases/index.js#L84-L98", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/purchases/index.js", "func_name": "isCancelable", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Checks if a purchase can be cancelled.\nReturns true for purchases that aren't expired\nAlso returns true for purchases whether or not they are after the refund period.\nPurchases included with a plan can't be cancelled.\n\n@param {Object} purchase - the purchase with which we are concerned\n@return {boolean} whether the purchase is cancelable", "docstring_tokens": ["Checks", "if", "a", "purchase", "can", "be", "cancelled", ".", "Returns", "true", "for", "purchases", "that", "aren", "t", "expired", "Also", "returns", "true", "for", "purchases", "whether", "or", "not", "they", "are", "after", "the", "refund", "period", ".", "Purchases", "included", "with", "a", "plan", "can", "t", "be", "cancelled", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/purchases/index.js#L113-L131", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/purchases/index.js", "func_name": "maybeWithinRefundPeriod", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Checks if a purchase might be in the refund period, whether refundable or not.\n\nIf you need to determine whether a purchase can be programmatically refunded\nvia the WordPress.com API, use isRefundable() instead.\n\nThis function attempts to catch some additional edge cases in which a\npurchase is refundable by policy but where isRefundable() returns false and\nwhich would therefore require the assistance of a Happiness Engineer to\nactually refund it.\n\nThe results aren't guaranteed to be reliable, so don't use them to promise\nor deny a refund to a user. Instead, for example, use it to decide whether\nto display or highlight general help text about the refund policy to users\nwho are likely to be eligible for one.\n\n@param {Object} purchase - the purchase with which we are concerned\n\n@returns {Boolean} Whether in refund period.", "docstring_tokens": ["Checks", "if", "a", "purchase", "might", "be", "in", "the", "refund", "period", "whether", "refundable", "or", "not", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/purchases/index.js#L199-L217", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/purchases/index.js", "func_name": "isRemovable", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Checks whether the specified purchase can be removed from a user account.\nPurchases included with a plan can't be removed.\n\n@param {Object} purchase - the purchase with which we are concerned\n@return {boolean} true if the purchase can be removed, false otherwise", "docstring_tokens": ["Checks", "whether", "the", "specified", "purchase", "can", "be", "removed", "from", "a", "user", "account", ".", "Purchases", "included", "with", "a", "plan", "can", "t", "be", "removed", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/purchases/index.js#L243-L260", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/purchases/index.js", "func_name": "paymentLogoType", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the payment logo to display based on the payment method\n\n@param {Object} purchase - the purchase with which we are concerned\n@return {string|null} the payment logo type, or null if no payment type is set.", "docstring_tokens": ["Returns", "the", "payment", "logo", "to", "display", "based", "on", "the", "payment", "method"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/purchases/index.js#L349-L359", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "packages/calypso-build/webpack/util.js", "func_name": "cssNameFromFilename", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Transform webpack output.filename and output.chunkFilename to CSS variants\n\n@param {(string|undefined)} name filename, chunkFilename or undefined\n@return {(string|undefined)} Transformed name or undefined", "docstring_tokens": ["Transform", "webpack", "output", ".", "filename", "and", "output", ".", "chunkFilename", "to", "CSS", "variants"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/packages/calypso-build/webpack/util.js#L7-L15", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/wpeditimage/plugin.js", "func_name": "verifyHTML", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Verify HTML in captions", "docstring_tokens": ["Verify", "HTML", "in", "captions"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/wpeditimage/plugin.js#L285-L295", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/i18n-utils/switch-locale.js", "func_name": "loadCSS", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Loads a CSS stylesheet into the page.\n\n@param {string} cssUrl URL of a CSS stylesheet to be loaded into the page\n@param {Element} currentLink an existing DOM element before which we want to insert the new one\n@returns {Promise} the new DOM element after the CSS has been loaded", "docstring_tokens": ["Loads", "a", "CSS", "stylesheet", "into", "the", "page", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/i18n-utils/switch-locale.js#L177-L198", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/purchases/reducer.js", "func_name": "overwriteExistingPurchases", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Overwrites the purchases in the store with the purchases from the new purchases array\nthat share the same `id` value.\n\n@param {array} existingPurchases - an array of purchases in the store\n@param {array} newPurchases - an array of purchases fetched from the API\n@return {array} An array of purchases", "docstring_tokens": ["Overwrites", "the", "purchases", "in", "the", "store", "with", "the", "purchases", "from", "the", "new", "purchases", "array", "that", "share", "the", "same", "id", "value", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/purchases/reducer.js#L43-L53", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/purchases/reducer.js", "func_name": "removeMissingPurchasesByPredicate", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Removes purchases that are missing from the new purchases array and match the given predicate.\n\n@param {array} existingPurchases - an array of purchases in the store\n@param {array} newPurchases - an array of purchases fetched from the API\n@param {object} predicate - the predicate to check before removing the item from the array.\n@return {array} An array of purchases", "docstring_tokens": ["Removes", "purchases", "that", "are", "missing", "from", "the", "new", "purchases", "array", "and", "match", "the", "given", "predicate", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/purchases/reducer.js#L63-L78", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/wpcom-undocumented/lib/site.js", "func_name": "UndocumentedSite", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Create an UndocumentedSite instance\n\n@param {[int]} id Site ID\n@param {[WPCOM]} wpcom WPCOM instance\n\n@return {{UndocumentedSite}} UndocumentedSite instance\n\n@api public", "docstring_tokens": ["Create", "an", "UndocumentedSite", "instance"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/wpcom-undocumented/lib/site.js#L80-L87", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/simple-payments/product-list/reducer.js", "func_name": "addOrEditProduct", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Edits existing product if one with matching ID found.\nOtherwise inserts the new one at the beginning of the list.\n@param {Array} list of previous products\n@param {Object} newProduct to update list with\n@returns {Array} updated array of products", "docstring_tokens": ["Edits", "existing", "product", "if", "one", "with", "matching", "ID", "found", ".", "Otherwise", "inserts", "the", "new", "one", "at", "the", "beginning", "of", "the", "list", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/simple-payments/product-list/reducer.js#L23-L36", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/my-sites/controller.js", "func_name": "createSitesComponent", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the site-picker react element.\n\n@param {object} context -- Middleware context\n@returns {object} A site-picker React element", "docstring_tokens": ["Returns", "the", "site", "-", "picker", "react", "element", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/my-sites/controller.js#L255-L269", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/receipts/reducer.js", "func_name": "updateReceiptState", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a new state with the given attributes for the given receipt ID.\n\n@param {Object} state current state\n@param {Number} receiptId identifier of the site\n@param {Object} attributes list of attributes and their values\n@returns {Object} the new state", "docstring_tokens": ["Returns", "a", "new", "state", "with", "the", "given", "attributes", "for", "the", "given", "receipt", "ID", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/receipts/reducer.js#L25-L29", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/post-normalizer/rule-content-detect-media.js", "func_name": "isTrackingPixel", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Checks whether or not an image is a tracking pixel\n@param {Node} image - DOM node for an img\n@returns {boolean} isTrackingPixel - returns true if image is probably a tracking pixel", "docstring_tokens": ["Checks", "whether", "or", "not", "an", "image", "is", "a", "tracking", "pixel"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/post-normalizer/rule-content-detect-media.js#L20-L27", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/post-normalizer/rule-content-detect-media.js", "func_name": "isCandidateForContentImage", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns true if image should be considered\n@param {Node} image - DOM node for an image\n@returns {boolean} true/false depending on if it should be included as a potential featured image", "docstring_tokens": ["Returns", "true", "if", "image", "should", "be", "considered"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/post-normalizer/rule-content-detect-media.js#L33-L47", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/notifications/src/panel/rest-client/index.js", "func_name": "ready", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Reports new notification data if available\n\nNew notification data is available _if_ we\nhave a note with a timestamp newer than we\ndid the last time we called this function.", "docstring_tokens": ["Reports", "new", "notification", "data", "if", "available"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/notifications/src/panel/rest-client/index.js#L313-L331", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/notifications/src/panel/rest-client/index.js", "func_name": "updateLastSeenTime", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Update lastSeenTime in object instance, localStorage, and remote database.\nAdvance this.lastSeenTime to proposedTime or the latest visible note time.\nIf the timestamp comes from a note, update the remote database.\n\n@param {Number} proposedTime A proposed update to our lastSeenTime timestamp\n@param {Boolean} fromStorage Whether this call is from handleStorageEvent\n@returns {Boolean} whether or not we will update our lastSeenTime value", "docstring_tokens": ["Update", "lastSeenTime", "in", "object", "instance", "localStorage", "and", "remote", "database", ".", "Advance", "this", ".", "lastSeenTime", "to", "proposedTime", "or", "the", "latest", "visible", "note", "time", ".", "If", "the", "timestamp", "comes", "from", "a", "note", "update", "the", "remote", "database", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/notifications/src/panel/rest-client/index.js#L369-L437", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/accessible-focus/index.js", "func_name": "accessibleFocus", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "keyCodes for tab, space, left, up, right, down respectively", "docstring_tokens": ["keyCodes", "for", "tab", "space", "left", "up", "right", "down", "respectively"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/accessible-focus/index.js#L5-L22", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/plugins/utils.js", "func_name": "filterNoticesBy", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Filter function that return notices that fit a certain criteria.\n\n@param {Object} site Site Object\n@param {String} pluginSlug Plugin Slug\n@param {Object} log Notice log Object\n@return {Bool} True if notice matches criteria", "docstring_tokens": ["Filter", "function", "that", "return", "notices", "that", "fit", "a", "certain", "criteria", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/plugins/utils.js#L41-L53", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/scroll-into-viewport/index.js", "func_name": "isInViewportRange", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Checks whether the given bounds are within the viewport\n@param {number} elementStart\n@param {number} elementEnd\n@returns {boolean}", "docstring_tokens": ["Checks", "whether", "the", "given", "bounds", "are", "within", "the", "viewport"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/scroll-into-viewport/index.js#L24-L28", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/scroll-into-viewport/index.js", "func_name": "scrollIntoViewport", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Scroll an element into the viewport if it's not already inside the viewport\n@param {HTMLElement} element", "docstring_tokens": ["Scroll", "an", "element", "into", "the", "viewport", "if", "it", "s", "not", "already", "inside", "the", "viewport"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/scroll-into-viewport/index.js#L34-L50", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/build/index.js", "func_name": "setup", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a \"build middleware\", which runs `npm run build-css` upon each HTTP\nrequest. Meant for use in \"development\" env.\n\n@return {Function} build middleware function\n@public", "docstring_tokens": ["Returns", "a", "build", "middleware", "which", "runs", "npm", "run", "build", "-", "css", "upon", "each", "HTTP", "request", ".", "Meant", "for", "use", "in", "development", "env", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/build/index.js#L17-L66", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/media-serialization/strategies/shortcode.js", "func_name": "parseCaption", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Given a caption shortcode object, returns an object of parsed attributes.\n\n@param {Object} node Caption shortcode object\n@param {Object} _parsed In recursion, the known values\n@return {Object} Object of all detected values", "docstring_tokens": ["Given", "a", "caption", "shortcode", "object", "returns", "an", "object", "of", "parsed", "attributes", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/media-serialization/strategies/shortcode.js#L23-L61", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/keyboard-shortcuts/index.js", "func_name": "KeyboardShortcuts", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "KeyboardShortcuts accepts an array of objects representing key-bindings and creates an EventEmitter\nwhich emits an event when a keyboard shortcut is triggered.\n\nFormat: [ { eventName: 'eventName', keys: [ 'command', 'enter'] }, ...]\n\n(Optional): Setting the 'type' property of a key-binding to 'sequence' will cause the keyboard shortcut\nevent to trigger only after the keys have been pressed in sequence.", "docstring_tokens": ["KeyboardShortcuts", "accepts", "an", "array", "of", "objects", "representing", "key", "-", "bindings", "and", "creates", "an", "EventEmitter", "which", "emits", "an", "event", "when", "a", "keyboard", "shortcut", "is", "triggered", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/keyboard-shortcuts/index.js#L38-L62", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/signup/flow-controller.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a list of the dependencies provided in the flow configuration.\n\n@return {array} a list of dependency names", "docstring_tokens": ["Returns", "a", "list", "of", "the", "dependencies", "provided", "in", "the", "flow", "configuration", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/signup/flow-controller.js#L174-L182", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/jetpack-sync/selectors.js", "func_name": "isPendingSyncStart", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a boolean for whether a full sync is pending start.\n@param {Object} state Global state tree\n@param {Number} siteId Site ID\n@return {Boolean} Whether a sync is pending start for site", "docstring_tokens": ["Returns", "a", "boolean", "for", "whether", "a", "full", "sync", "is", "pending", "start", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/jetpack-sync/selectors.js#L35-L61", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/jetpack-sync/selectors.js", "func_name": "isFullSyncing", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a boolean for whether a site is in the process of a full sync.\n@param {Object} state Global state tree\n@param {Number} siteId Site ID\n@return {Boolean} Whether a sync is in the process of syncing", "docstring_tokens": ["Returns", "a", "boolean", "for", "whether", "a", "site", "is", "in", "the", "process", "of", "a", "full", "sync", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/jetpack-sync/selectors.js#L69-L79", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/jetpack-sync/selectors.js", "func_name": "getSyncProgressPercentage", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a rounded up percentage the amount of sync completed.\n@param {Object} state Global state tree\n@param {Number} siteId Site ID\n@return {Number} The percentage of sync completed, expressed as an integer", "docstring_tokens": ["Returns", "a", "rounded", "up", "percentage", "the", "amount", "of", "sync", "completed", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/jetpack-sync/selectors.js#L87-L127", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "setupQuoraGlobal", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Initializes Quora tracking.\nThis is a rework of the obfuscated tracking code provided by Quora.", "docstring_tokens": ["Initializes", "Quora", "tracking", ".", "This", "is", "a", "rework", "of", "the", "obfuscated", "tracking", "code", "provided", "by", "Quora", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L245-L256", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordProduct", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Recorders an individual product purchase conversion\n\n@param {Object} product - the product\n@param {Number} orderId - the order id\n@returns {void}", "docstring_tokens": ["Recorders", "an", "individual", "product", "purchase", "conversion"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1224-L1289", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordOrderInQuantcast", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records an order in Quantcast\n\n@param {Object} cart - cart as `CartValue` object\n@param {Number} orderId - the order id\n@param {Object} wpcomJetpackCartInfo - info about WPCOM and Jetpack in the cart\n@returns {void}", "docstring_tokens": ["Records", "an", "order", "in", "Quantcast"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1299-L1345", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordOrderInFloodlight", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records an order in DCM Floodlight\n\n@param {Object} cart - cart as `CartValue` object\n@param {Number} orderId - the order id\n@param {Object} wpcomJetpackCartInfo - info about WPCOM and Jetpack in the cart\n@returns {void}", "docstring_tokens": ["Records", "an", "order", "in", "DCM", "Floodlight"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1355-L1397", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordOrderInBing", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records a signup|purchase in Bing.\n\n@param {Object} cart - cart as `CartValue` object.\n@param {Number} orderId - the order ID.\n@param {Object} wpcomJetpackCartInfo - info about WPCOM and Jetpack in the cart\n@returns {void}", "docstring_tokens": ["Records", "a", "signup|purchase", "in", "Bing", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1539-L1575", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "floodlightSessionId", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the DCM Floodlight session id, generating a new one if there's not already one\n\n@returns {String} The session id", "docstring_tokens": ["Returns", "the", "DCM", "Floodlight", "session", "id", "generating", "a", "new", "one", "if", "there", "s", "not", "already", "one"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1648-L1661", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "floodlightUserParams", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns an object with DCM Floodlight user params\n\n@returns {Object} With the WordPress.com user id and/or the logged out Tracks id", "docstring_tokens": ["Returns", "an", "object", "with", "DCM", "Floodlight", "user", "params"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1668-L1682", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordOrderInCriteo", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records an order in Criteo\n\n@param {Object} cart - cart as `CartValue` object\n@param {Number} orderId - the order id\n@returns {void}", "docstring_tokens": ["Records", "an", "order", "in", "Criteo"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1724-L1739", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordViewCheckoutInCriteo", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records that a user viewed the checkout page\n\n@param {Object} cart - cart as `CartValue` object\n@returns {void}", "docstring_tokens": ["Records", "that", "a", "user", "viewed", "the", "checkout", "page"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1747-L1766", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "cartToCriteoItems", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Converts the products in a cart to the format Criteo expects for its `items` property\n\n@param {Object} cart - cart as `CartValue` object\n@returns {Array} - An array of items to include in the Criteo tracking call", "docstring_tokens": ["Converts", "the", "products", "in", "a", "cart", "to", "the", "format", "Criteo", "expects", "for", "its", "items", "property"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1774-L1782", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordInCriteo", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records an event in Criteo\n\n@param {String} eventName - The name of the 'event' property such as 'viewItem' or 'viewBasket'\n@param {Object} eventProps - Additional details about the event such as `{ item: '1' }`\n\n@returns {void}", "docstring_tokens": ["Records", "an", "event", "in", "Criteo"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1810-L1838", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "recordOrderInGoogleAnalytics", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Records an order in Google Analytics\n\n@see https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce\n\n@param {Object} cart - cart as `CartValue` object\n@param {Number} orderId - the order id\n@returns {void}", "docstring_tokens": ["Records", "an", "order", "in", "Google", "Analytics"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1868-L1882", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/ad-tracking.js", "func_name": "initFacebook", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Initializes the Facebook pixel.\n\nWhen the user is logged in, additional hashed data is being forwarded.", "docstring_tokens": ["Initializes", "the", "Facebook", "pixel", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/ad-tracking.js#L1978-L1992", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/render/index.js", "func_name": "isServerSideRenderCompatible", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Applies all the app-related checks for server side rendering.\n\nNote: This is designed to include only the global/app checks. Section specific criteria must be handled by\nsection-specific middlewares, which have the responsibility to write a boolean value to context.serverSideRender\n(@see setShouldServerSideRender and @see setShouldServerSideRenderLogin).\n\nWarning: If this returns true, it is not sufficient for the page to be SSRed. Returning true from here is a\npre-condition for SSR and the result needs to be corroborated with context.serverSideRender\n(context.serverSideRender is set to boolean by the middlewares, depending, in general, on the query params).\n\nWarning: if you think about calling this method or adding these conditions to the middlewares themselves (the ones\nthat set context.serverSideRender), think twice: the context may not be populated with all the necessary values\nwhen the sections-specific middlewares are run (examples: context.layout, context.user).\n\n@param {object} context The currently built context\n\n@return {boolean} True if all the app-level criteria are fulfilled.", "docstring_tokens": ["Applies", "all", "the", "app", "-", "related", "checks", "for", "server", "side", "rendering", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/render/index.js#L250-L257", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/wpcom-tabindex/plugin.js", "func_name": "setTabIndexOnEditorIframe", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns a function that sets the tabindex on an editor instance. The returned function assumes that `this` is set to the editor instance", "docstring_tokens": ["Returns", "a", "function", "that", "sets", "the", "tabindex", "on", "an", "editor", "instance", ".", "The", "returned", "function", "assumes", "that", "this", "is", "set", "to", "the", "editor", "instance"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/wpcom-tabindex/plugin.js#L11-L23", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "apps/notifications/src/panel/comment-replies-cache/index.js", "func_name": "cleanupRepliesCache", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Clears out state persisted reply cache\n\n@alias cleanup\n\nWhen filling out a reply to a comment,\nthe text is saved in `localStorage` to\nprevent it from disappearing on accidental\npage refreshes, browser closes, or navigation.\nHowever, we don't want to pre-fill a comment\nreply if the saved version is older than a\ncertain period of time: in this case, one day.\n\n@returns {undefined}", "docstring_tokens": ["Clears", "out", "state", "persisted", "reply", "cache"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/apps/notifications/src/panel/comment-replies-cache/index.js#L58-L81", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "bin/pre-commit-hook.js", "func_name": "parseGitDiffToPathArray", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Parses the output of a git diff command into javascript file paths.\n\n@param {String} command Command to run. Expects output like `git diff --name-only [\u2026]`\n@returns {Array} Paths output from git command", "docstring_tokens": ["Parses", "the", "output", "of", "a", "git", "diff", "command", "into", "javascript", "file", "paths", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/bin/pre-commit-hook.js#L26-L31", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/posts/actions.js", "func_name": "requestPosts", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Triggers a network request to fetch posts for the specified site and query.\n\n@param {?Number} siteId Site ID\n@param {String} query Post query\n@return {Function} Action thunk", "docstring_tokens": ["Triggers", "a", "network", "request", "to", "fetch", "posts", "for", "the", "specified", "site", "and", "query", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/posts/actions.js#L138-L169", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/posts/actions.js", "func_name": "normalizeApiAttributes", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Normalizes attributes to API expectations\n@param {object} attributes - changed attributes\n@return {object} - normalized attributes", "docstring_tokens": ["Normalizes", "attributes", "to", "API", "expectations"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/posts/actions.js#L533-L542", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/post-normalizer/rule-pick-canonical-media.js", "func_name": "isImageLargeEnoughForFeature", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns true if an image is large enough to be a featured asset\n@param {object} image - image must have a width and height property\n@returns {boolean} true if large enough, false if image undefined or too small", "docstring_tokens": ["Returns", "true", "if", "an", "image", "is", "large", "enough", "to", "be", "a", "featured", "asset"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/post-normalizer/rule-pick-canonical-media.js#L18-L26", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/wpcom-view/plugin.js", "func_name": "replaceMarkers", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Replaces all marker nodes tied to this view instance.\n\n@return {boolean} True if the replacement succeeded; false if it failed.", "docstring_tokens": ["Replaces", "all", "marker", "nodes", "tied", "to", "this", "view", "instance", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/wpcom-view/plugin.js#L55-L82", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/wpcom-view/plugin.js", "func_name": "getParent", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Returns the node or a parent of the node that has the passed className.\nDoing this directly is about 40% faster.\n\n@param {object} node The node to search.\n@param {string} className The class name to search for.\n\n@return {object|boolean} A node on success; false on failure.", "docstring_tokens": ["Returns", "the", "node", "or", "a", "parent", "of", "the", "node", "that", "has", "the", "passed", "className", ".", "Doing", "this", "directly", "is", "about", "40%", "faster", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/wpcom-view/plugin.js#L136-L149", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/wpcom-view/plugin.js", "func_name": "deselect", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Deselect a selected view and remove clipboard", "docstring_tokens": ["Deselect", "a", "selected", "view", "and", "remove", "clipboard"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/wpcom-view/plugin.js#L250-L264", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "bin/build-metadata.js", "func_name": "deepRemoveUndefinedKeysFromObject", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Deeply iterates over the keys of an object to remove any keys that are \"undefined\". This method modifies the object.\n@param {Object} obj\n@returns {Object} obj, with keys with value \"undefined\" removed.", "docstring_tokens": ["Deeply", "iterates", "over", "the", "keys", "of", "an", "object", "to", "remove", "any", "keys", "that", "are", "undefined", ".", "This", "method", "modifies", "the", "object", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/bin/build-metadata.js#L178-L189", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "bin/build-metadata.js", "func_name": "processLibPhoneNumberMetadata", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Processes Google's libphonenumber data and generates a proper JS object\n@param {{}} libPhoneNumberData\n@returns {{}}", "docstring_tokens": ["Processes", "Google", "s", "libphonenumber", "data", "and", "generates", "a", "proper", "JS", "object"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/bin/build-metadata.js#L233-L273", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "bin/build-metadata.js", "func_name": "insertCountryAliases", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Creates aliases. E.g. allows `uk` to be found by both `gb` and `uk`.\n@param data", "docstring_tokens": ["Creates", "aliases", ".", "E", ".", "g", ".", "allows", "uk", "to", "be", "found", "by", "both", "gb", "and", "uk", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/bin/build-metadata.js#L332-L337", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/wpcom-undocumented/index.js", "func_name": "WPCOMUndocumented", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Class inherited from `WPCOMUnpublished` class and adds\nspecific methods useful for wp-calypso.\n\n@param {String} [token] - oauth token\n@param {Function} [reqHandler] - request handler\n@return {NUll} null", "docstring_tokens": ["Class", "inherited", "from", "WPCOMUnpublished", "class", "and", "adds", "specific", "methods", "useful", "for", "wp", "-", "calypso", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/wpcom-undocumented/index.js#L27-L50", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/account-password-data/index.js", "func_name": "AccountPasswordData", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Initialize AccountPasswordData with defaults", "docstring_tokens": ["Initialize", "AccountPasswordData", "with", "defaults"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/account-password-data/index.js#L22-L32", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/themes/actions.js", "func_name": "transferStatus", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "receive a transfer status", "docstring_tokens": ["receive", "a", "transfer", "status"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/themes/actions.js#L703-L712", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/themes/actions.js", "func_name": "transferInitiateFailure", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "receive a transfer initiation failure", "docstring_tokens": ["receive", "a", "transfer", "initiation", "failure"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/themes/actions.js#L725-L740", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/state/themes/actions.js", "func_name": "suffixThemeIdForInstall", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Install of any theme hosted as a zip on wpcom must\nbe suffixed with -wpcom. Themes on AT sites are not\ninstalled via downloaded zip.\n\n@param {Object} state Global state tree\n@param {number} siteId Site ID\n@param {string} themeId Theme ID\n@return {string} the theme id to use when installing the theme", "docstring_tokens": ["Install", "of", "any", "theme", "hosted", "as", "a", "zip", "on", "wpcom", "must", "be", "suffixed", "with", "-", "wpcom", ".", "Themes", "on", "AT", "sites", "are", "not", "installed", "via", "downloaded", "zip", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/state/themes/actions.js#L903-L912", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/devdocs/index.js", "func_name": "queryDocs", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Query the index using lunr.\nWe store the documents and index in memory for speed,\nand also because lunr.js is designed to be memory resident\n@param {object} query The search query for lunr\n@returns {array} The results from the query", "docstring_tokens": ["Query", "the", "index", "using", "lunr", ".", "We", "store", "the", "documents", "and", "index", "in", "memory", "for", "speed", "and", "also", "because", "lunr", ".", "js", "is", "designed", "to", "be", "memory", "resident"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/devdocs/index.js#L53-L64", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/devdocs/index.js", "func_name": "listDocs", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Return an array of results based on the provided filenames\n@param {array} filePaths An array of file paths\n@returns {array} The results from the docs", "docstring_tokens": ["Return", "an", "array", "of", "results", "based", "on", "the", "provided", "filenames"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/devdocs/index.js#L71-L89", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "server/devdocs/index.js", "func_name": "escapeRegexString", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Escapes a string\n@param {lunr.Token} token The string to escape\n@returns {lunr.Token} An escaped string", "docstring_tokens": ["Escapes", "a", "string"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/server/devdocs/index.js#L133-L137", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/users/store.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "This data can help manage infinite scroll", "docstring_tokens": ["This", "data", "can", "help", "manage", "infinite", "scroll"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/users/store.js#L28-L39", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/users/store.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get Users for a set of fetchOptions", "docstring_tokens": ["Get", "Users", "for", "a", "set", "of", "fetchOptions"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/users/store.js#L41-L60", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/plugins/store.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Get Plugins for a single site", "docstring_tokens": ["Get", "Plugins", "for", "a", "single", "site"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/plugins/store.js#L188-L200", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/plugins/store.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Array of sites with a particular plugin.", "docstring_tokens": ["Array", "of", "sites", "with", "a", "particular", "plugin", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/plugins/store.js#L212-L237", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/plugins/store.js", "func_name": "", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Array of sites without a particular plugin.", "docstring_tokens": ["Array", "of", "sites", "without", "a", "particular", "plugin", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/plugins/store.js#L244-L258", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/analytics/utils.js", "func_name": "urlSafeBase64DecodeString", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Decodes a url-safe base64 encoded string.\n\n@param {String} str The url-safe base64 encoded string\n@return {String} The decoded string", "docstring_tokens": ["Decodes", "a", "url", "-", "safe", "base64", "encoded", "string", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/analytics/utils.js#L449-L457", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/touch-scroll-toolbar/plugin.js", "func_name": "disableToolbarTouchEvents", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Capture and stop propagation on toolbar touch events. TinyMCE registers\nthe `touchstart` event on buttons, redirecting them as `click` events to\nthe button and preventing the default.\n\n@see https://github.com/tinymce/tinymce/blob/abffb85/js/tinymce/classes/ui/Button.js#L57-L60", "docstring_tokens": ["Capture", "and", "stop", "propagation", "on", "toolbar", "touch", "events", ".", "TinyMCE", "registers", "the", "touchstart", "event", "on", "buttons", "redirecting", "them", "as", "click", "events", "to", "the", "button", "and", "preventing", "the", "default", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/touch-scroll-toolbar/plugin.js#L18-L24", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/touch-scroll-toolbar/plugin.js", "func_name": "hideToolbarFadeOnFullScroll", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Monitors the toolbar's `scroll` event, applying a `.is-scrolled-full`\nclass if and only if the left scroll position has reached the element's\nmaximum scroll offset.", "docstring_tokens": ["Monitors", "the", "toolbar", "s", "scroll", "event", "applying", "a", ".", "is", "-", "scrolled", "-", "full", "class", "if", "and", "only", "if", "the", "left", "scroll", "position", "has", "reached", "the", "element", "s", "maximum", "scroll", "offset", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/touch-scroll-toolbar/plugin.js#L31-L59", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/components/tinymce/plugins/touch-scroll-toolbar/plugin.js", "func_name": "toggleToolbarsScrollableOnResize", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Monitors the window resize event, assigning an `.is-scrollable` class to\nany toolbars for which horizontal scroll exists.", "docstring_tokens": ["Monitors", "the", "window", "resize", "event", "assigning", "an", ".", "is", "-", "scrollable", "class", "to", "any", "toolbars", "for", "which", "horizontal", "scroll", "exists", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/components/tinymce/plugins/touch-scroll-toolbar/plugin.js#L65-L94", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "packages/i18n-calypso/src/i18n.js", "func_name": "warn", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "raise a console warning", "docstring_tokens": ["raise", "a", "console", "warning"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/packages/i18n-calypso/src/i18n.js#L39-L46", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "packages/i18n-calypso/src/i18n.js", "func_name": "getJedArgs", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Pull the right set of arguments for the Jed method\n@param {string} jedMethod Name of jed gettext-style method. [See docs](http://slexaxton.github.io/Jed/)\n@param {[object]} props properties passed into `translate()` method\n@return {[array]} array of properties to pass into gettext-style method", "docstring_tokens": ["Pull", "the", "right", "set", "of", "arguments", "for", "the", "Jed", "method"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/packages/i18n-calypso/src/i18n.js#L115-L128", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "packages/i18n-calypso/src/i18n.js", "func_name": "getTranslationFromJed", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Takes translate options object and coerces to a Jed request to retrieve translation\n@param {object} jed - jed data object\n@param {object} options - object describing translation\n@return {string} - the returned translation from Jed", "docstring_tokens": ["Takes", "translate", "options", "object", "and", "coerces", "to", "a", "Jed", "request", "to", "retrieve", "translation"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/packages/i18n-calypso/src/i18n.js#L136-L150", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/stripe-connect-account/reducer.js", "func_name": "connectAccountFetchComplete", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state with fetched account details\n\n@param {Object} state Current state\n@param {Object} action Action payload\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "with", "fetched", "account", "details"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/stripe-connect-account/reducer.js#L115-L128", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/stripe-connect-account/reducer.js", "func_name": "connectAccountDeauthorizeComplete", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state after deauthorization completes\n\n@param {Object} state Current state\n@param {Object} action Action payload\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "after", "deauthorization", "completes"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/stripe-connect-account/reducer.js#L149-L162", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/extensions/woocommerce/state/sites/settings/stripe-connect-account/reducer.js", "func_name": "connectAccountOAuthInitComplete", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Updates state after oauth initialization completes\n\n@param {Object} state Current state\n@param {Object} action Action payload\n@return {Object} Updated state", "docstring_tokens": ["Updates", "state", "after", "oauth", "initialization", "completes"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/extensions/woocommerce/state/sites/settings/stripe-connect-account/reducer.js#L184-L190", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/gsuite/index.js", "func_name": "applyPrecision", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Applies a precision to the cost\n\n@param {Number} cost - cost\n@param {Number} precision - precision to apply to cost\n@returns {String} - Returns price with applied precision", "docstring_tokens": ["Applies", "a", "precision", "to", "the", "cost"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/gsuite/index.js#L25-L28", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/gsuite/index.js", "func_name": "canDomainAddGSuite", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Can a domain add G Suite\n\n@param {String} domainName - domainname\n@returns {Boolean} -Can a domain add G Suite", "docstring_tokens": ["Can", "a", "domain", "add", "G", "Suite"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/gsuite/index.js#L36-L47", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/gsuite/index.js", "func_name": "formatPrice", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Formats price given cost and currency\n\n@param {Number} cost - cost\n@param {String} currencyCode - currency code to format with\n@param {Object} options - options containing precision\n@returns {String} - Returns a formatted price", "docstring_tokens": ["Formats", "price", "given", "cost", "and", "currency"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/gsuite/index.js#L57-L63", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/gsuite/index.js", "func_name": "getEligibleGSuiteDomain", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Retrieves the first domain that is eligible to G Suite either from the current selected site or the list of domains.\n\n@param {String} selectedDomainName - domain name for the site currently selected by the user\n@param {Array} domains - list of domain objects\n@returns {String} - Eligible domain name", "docstring_tokens": ["Retrieves", "the", "first", "domain", "that", "is", "eligible", "to", "G", "Suite", "either", "from", "the", "current", "selected", "site", "or", "the", "list", "of", "domains", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/gsuite/index.js#L83-L89", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/gsuite/index.js", "func_name": "getGSuiteSupportedDomains", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Filters a list of domains by the domains that eligible for G Suite\n\n@param {Array} domains - list of domain objects\n@returns {Array} - Array of G Suite supported domans", "docstring_tokens": ["Filters", "a", "list", "of", "domains", "by", "the", "domains", "that", "eligible", "for", "G", "Suite"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/gsuite/index.js#L97-L107", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/perfmon/index.js", "func_name": "stopMutationObserver", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Stop observing the DOM changes and clean up all data structures", "docstring_tokens": ["Stop", "observing", "the", "DOM", "changes", "and", "clean", "up", "all", "data", "structures"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/perfmon/index.js#L82-L89", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/perfmon/index.js", "func_name": "checkActivePlaceholders", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Check if there are any placeholders on the screen and trigger a timing event when all the placeholders are gone", "docstring_tokens": ["Check", "if", "there", "are", "any", "placeholders", "on", "the", "screen", "and", "trigger", "a", "timing", "event", "when", "all", "the", "placeholders", "are", "gone"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/perfmon/index.js#L114-L131", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/directly/index.js", "func_name": "getDefaultOptions", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Gets the default set of options to configure the Directly RTM widget.\nIt's important to keep this config in a getter function, rather than a constant\non the module scope, to prevent import-time errors errors that could crash Calypso.\n\n@see https://cloudup.com/cySVQ9R_O6S for all configuration options\n\n@returns {Object} The default configuration options", "docstring_tokens": ["Gets", "the", "default", "set", "of", "options", "to", "configure", "the", "Directly", "RTM", "widget", ".", "It", "s", "important", "to", "keep", "this", "config", "in", "a", "getter", "function", "rather", "than", "a", "constant", "on", "the", "module", "scope", "to", "prevent", "import", "-", "time", "errors", "errors", "that", "could", "crash", "Calypso", "."], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/directly/index.js#L34-L42", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/directly/index.js", "func_name": "configureGlobals", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Set up global variables and configuration for the RTM widget\n\n@see https://cloudup.com/cySVQ9R_O6S for the standard setup instructions", "docstring_tokens": ["Set", "up", "global", "variables", "and", "configuration", "for", "the", "RTM", "widget"], "sha": "0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817", "url": "https://github.com/Automattic/wp-calypso/blob/0b3ba9a386f9d7bc1ba0a2693c76799a51b0d817/client/lib/directly/index.js#L49-L60", "partition": "valid"} +{"repo": "Automattic/wp-calypso", "path": "client/lib/directly/index.js", "func_name": "insertDOM", "original_string": "", "language": "javascript", "code": "", "code_tokens": [], "docstring": "Inserts a dummy DOM element that the widget uses to calculate the base URL for its assets.\n\nUnder standard setup, the RTM widget gathers its base URL by inspecting the src attribute of\nthe