Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flourite

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flourite - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/languages/kotlin.d.ts

2

dist/index.iife.js

@@ -1,1 +0,1 @@

var flourite=function(){"use strict";function t(t,e){return e.map((e=>e.pattern.test(t)?function(t){switch(t){case"keyword.print":case"meta.import":case"meta.module":return 5;case"keyword.function":case"constant.null":return 4;case"constant.type":case"constant.string":case"constant.numeric":case"constant.boolean":case"constant.dictionary":case"constant.array":case"keyword.variable":return 3;case"section.scope":case"keyword.other":case"keyword.operator":case"keyword.control":case"keyword.visibility":case"keyword":return 2;case"comment.block":case"comment.line":case"comment.documentation":case"macro":return 1;case"not":default:return-20}}(e.type):0)).reduce(((t,e)=>t+e),0)}function e(t,e){return e.length<=10||t<e.length/10}function n(t){return"C++"===t?"cpp":"C#"===t?"csharp":t.toLowerCase()}const r={C:[{pattern:/(char|long|int|float|double)\s+\w+\s*=?/,type:"constant.type"},{pattern:/malloc\(.+\)/,type:"keyword.function"},{pattern:/#include (<|")\w+\.h(>|")/,type:"meta.import",nearTop:!0},{pattern:/(\w+)\s*\*\s*\w+/,type:"keyword"},{pattern:/(\w+)\s+\w+(;|\s*=)/,type:"macro"},{pattern:/(\w+)\s+\w+\[.+\]/,type:"keyword.other"},{pattern:/#define\s+.+/,type:"macro"},{pattern:/NULL/,type:"constant.null"},{pattern:/void/g,type:"keyword.other"},{pattern:/(printf|puts)\s*\(.+\)/,type:"keyword.print"},{pattern:/new \w+/,type:"not"},{pattern:/new [A-Z]\w*\s*\(.+\)/,type:"not"},{pattern:/'.{2,}'/,type:"not"},{pattern:/var\s+\w+\s*=?/,type:"not"},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/puts\s+("|').+("|')/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(using\s)?System(\..*)?(;)?/,type:"not"},{pattern:/(public\s)?((partial|static|delegate)\s)?(class\s)/,type:"not"},{pattern:/(public|private|protected|internal)/,type:"not"},{pattern:/(new|this\s)?(List|IEnumerable)<(sbyte|byte|short|ushort|int|uint|long|ulong|float|double|decimal|bool|char|string)>/,type:"not"},{pattern:/local\s(function|\w+)?/,type:"not"}],"C++":[{pattern:/(char|long|int|float|double)\s+\w+\s*=?/,type:"constant.type"},{pattern:/#include\s*(<|")\w+(\.h)?(>|")/,type:"meta.import"},{pattern:/using\s+namespace\s+.+\s*;/,type:"keyword"},{pattern:/template\s*<.*>/,type:"keyword"},{pattern:/std::\w+/g,type:"keyword.other"},{pattern:/(cout|cin|endl)/g,type:"keyword.print"},{pattern:/(public|protected|private):/,type:"keyword.visibility"},{pattern:/nullptr/,type:"keyword"},{pattern:/new \w+(\(.*\))?/,type:"keyword"},{pattern:/#define\s+.+/,type:"macro"},{pattern:/\w+<\w+>/,type:"keyword.other"},{pattern:/class\s+\w+/,type:"keyword"},{pattern:/void/g,type:"keyword"},{pattern:/(else )?if\s*\(.+\)/,type:"keyword.control"},{pattern:/while\s+\(.+\)/,type:"keyword.control"},{pattern:/\w*::\w+/,type:"macro"},{pattern:/'.{2,}'/,type:"not"},{pattern:/(List<\w+>|ArrayList<\w*>\s*\(.*\))(\s+[\w]+|;)/,type:"not"},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/puts\s+("|').+("|')/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(using\s)?System(\..*)?(;)?/,type:"not"},{pattern:/(public|private|protected|internal)\s/,type:"not"}],"C#":[{pattern:/using\sSystem(\..*)?(;)?/,type:"meta.import"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"keyword.print"},{pattern:/(public\s)?((partial|static|delegate)\s)?class\s/,type:"keyword"},{pattern:/(extern|override|sealed|readonly|virtual|volatile)/,type:"keyword.other"},{pattern:/namespace\s(.*)(\.(.*))?(\s{)?/,type:"keyword"},{pattern:/(#region(\s.*)?|#endregion\n)/,type:"section.scope"},{pattern:/(public|private|protected|internal)\s/,type:"keyword.visibility"},{pattern:/(const\s)?(sbyte|byte|short|ushort|int|uint|long|ulong|float|double|decimal|bool|char|string)(\[\])?\s(.*)\s=\s(.*);/,type:"constant.type"},{pattern:/(new|this\s)?(List|IEnumerable)<(sbyte|byte|short|ushort|int|uint|long|ulong|float|double|decimal|bool|char|string)>/,type:"constant.dictionary"},{pattern:/#define\s(.*)/,type:"macro"},{pattern:/\s([A-Z]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*)\s=/,type:"macro"},{pattern:/(extends|throws|@Attribute)/,type:"not"},{pattern:/System\.(in|out)\.\w+/,type:"not"}],CSS:[{pattern:/[a-z-]+:(?!:).+;/,type:"keyword"},{pattern:/<(\/)?style>/,type:"not"}],Go:[{pattern:/package\s+[a-z]+\n/,type:"meta.module",nearTop:!0},{pattern:/(import\s*\(\s*\n)|(import\s+"[a-z0-9/.]+")/,type:"meta.import",nearTop:!0},{pattern:/if.+err\s*!=\s*nil.+{/,type:"keyword.function"},{pattern:/fmt\.Print(f|ln)?\(.*\)/,type:"keyword.print"},{pattern:/func(\s+\w+\s*)?\(.*\).*{/,type:"keyword.function"},{pattern:/\w+\s*:=\s*.+[^;\n]/,type:"keyword.variable"},{pattern:/(}\s*else\s*)?if[^()]+{/,type:"keyword.control"},{pattern:/(var|const)\s+\w+\s+[\w*]+(\n|\s*=|$)/,type:"keyword.variable"},{pattern:/[a-z]+\.[A-Z]\w*/,type:"macro"},{pattern:/nil/,type:"keyword"},{pattern:/'.{2,}'/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/using\sSystem(\..*)?(;)?/,type:"not"},{pattern:/(public|private|protected|internal)\s/,type:"not"}],HTML:[{pattern:/<!DOCTYPE (html|HTML PUBLIC .+)>/,type:"meta.module",nearTop:!0},{pattern:/<[a-z0-9]+(\s*[\w]+=('|").+('|")\s*)?>.*<\/[a-z0-9]+>/g,type:"keyword"},{pattern:/<!--(.*)(-->)?/,type:"comment.block"},{pattern:/[a-z-]+=("|').+("|')/g,type:"keyword.other"},{pattern:/<\?php/,type:"not"}],Java:[{pattern:/System\.(in|out)\.\w+/,type:"keyword.print"},{pattern:/(private|protected|public)\s*\w+\s*\w+(\s*=\s*[\w])?/,type:"keyword"},{pattern:/(private|protected|public)\s*\w+\s*[\w]+\(.+\)/,type:"keyword"},{pattern:/(^|\s)(String)\s+[\w]+\s*=?/,type:"keyword.other"},{pattern:/(List<\w+>|ArrayList<\w*>\s*\(.*\))(\s+[\w]+|;)/,type:"keyword.variable"},{pattern:/(public\s*)?class\s*(.*)+(\s)?\{/,type:"keyword"},{pattern:/(\w+)(\[\s*\])+\s+\w+/,type:"constant.array"},{pattern:/final\s*\w+/,type:"keyword.other"},{pattern:/\w+\.(get|set)\(.+\)/,type:"keyword.other"},{pattern:/new [A-Z]\w*\s*\(.+\)/,type:"keyword.other"},{pattern:/(^|\s)(char|long|int|float|double)\s+[\w]+\s*=?/,type:"constant.type"},{pattern:/(extends|implements)/,type:"meta.module",nearTop:!0},{pattern:/null/g,type:"keyword.other"},{pattern:/(else )?if\s*\(.+\)/,type:"keyword.control"},{pattern:/while\s+\(.+\)/,type:"keyword.control"},{pattern:/void/g,type:"keyword.other"},{pattern:/const\s*\w+/,type:"not"},{pattern:/(\w+)\s*\*\s*\w+/,type:"not"},{pattern:/'.{2,}'/,type:"not"},{pattern:/#include\s*(<|")\w+(\.h)?(>|")/,type:"not",nearTop:!0},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/\[Attribute\]/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(#region(\s.*)?|#endregion\n)/,type:"not"},{pattern:/using\sSystem(\..*)?(;)?/,type:"not"}],Javascript:[{pattern:/undefined/g,type:"keyword"},{pattern:/console\.log\s*\(/,type:"keyword.print"},{pattern:/(var|const|let)\s+\w+\s*=?/,type:"keyword.variable"},{pattern:/(('|").+('|")\s*|\w+):\s*[{[]/,type:"constant.array"},{pattern:/===/g,type:"keyword.operator"},{pattern:/!==/g,type:"keyword.operator"},{pattern:/function\*?(\s+[$\w]+\s*\(.*\)|\s*\(.*\))/g,type:"keyword.function"},{pattern:/null/g,type:"constant.null"},{pattern:/\(.*\)\s*=>\s*.+/,type:"keyword.control"},{pattern:/(else )?if\s+\(.+\)/,type:"keyword.control"},{pattern:/while\s+\(.+\)/,type:"keyword.control"},{pattern:/(^|\s)(char|long|int|float|double)\s+\w+\s*=?/,type:"not"},{pattern:/\*\w+/,type:"not"},{pattern:/<(\/)?script( type=('|")text\/javascript('|"))?>/,type:"not"},{pattern:/fn\s[A-Za-z0-9<>,]+\(.*\)\s->\s\w+(\s\{|)/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(using\s)?System(\..*)?(;)?/,type:"not"},{pattern:/(func|fn)\s/,type:"not"},{pattern:/(begin|end)\n/,type:"not"},{pattern:/local\s(function|(\w+)\s=)/,type:"not"}],Julia:[{pattern:/(using)\s\w+/,type:"meta.import"},{pattern:/(bare\s)?module/,type:"meta.module"},{pattern:/from\s.+import\s.+/,type:"not"},{pattern:/println\(.*\)/,type:"keyword.print"},{pattern:/(.*)!\(.*\)/,type:"macro"},{pattern:/for\s(\w+)\s(in|=)\s/,type:"keyword.control"},{pattern:/function\s\w+\(.*\)\s\{/,type:"not"},{pattern:/while\s+\(.+\)\n/,type:"not"},{pattern:/end\n?/,type:"keyword"},{pattern:/struct\s(.*)\s<:\s/,type:"keyword.other"},{pattern:/(::)?(Int|Uint)(8|16|32|64|128)/,type:"keyword.variable"},{pattern:/[0-9]+im/,type:"keyword"},{pattern:/\{:\?\}/,type:"not"},{pattern:/fn\smain()/,type:"not"},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/puts\s+("|').+("|')/,type:"not"},{pattern:/class\s/,type:"not"},{pattern:/local\s(function|\w+)/,type:"not"}],Lua:[{pattern:/(\[\[.*\]\])/,type:"constant.string"},{pattern:/local\s([a-zA-Z0-9_]+)(\s*=)?/,type:"keyword.variable"},{pattern:/(local\s)?function\s*([a-zA-Z0-9_]*)?\(\)/,type:"keyword.function"},{pattern:/for\s+([a-zA-Z]+)\s*=\s*([a-zA-Z0-9_]+),\s*([a-zA-Z0-9_]+)\s+do/,type:"keyword.control"},{pattern:/while\s(.*)\sdo/,type:"keyword.control"},{pattern:/\s+(and|break|do|else|elseif|end|false|function|if|in|not|or|local|repeat|return|then|true|until|pairs|ipairs|in|yield)/,type:"keyword.other"},{pattern:/nil/,type:"constant.null"},{pattern:/#([a-zA-Z_{}]+)/,type:"keyword.operator"},{pattern:/((get|set)metatable|raw(get|set|equal))\(.*\)/,type:"keyword.other"},{pattern:/__(index|newindex|call|sub|mul|div|mod|pow|unm|eq|le|lt)/,type:"keyword.other"},{pattern:/(\(.+\)|([a-zA-Z_]+)):([a-zA-Z_])\(.*\)/,type:"keyword.other"},{pattern:/{\s*(\S+)((,|;)\s*\S+)*\s*}/,type:"constant.array"},{pattern:/{\s*(\S+\s*=\s*\S+)((,|;)\s*\S+\s*=\s*\S+)*\s*}/,type:"constant.dictionary"},{pattern:/math\.(.*)\([0-9]*\)/,type:"macro"},{pattern:/table\.(.*)\(.*\)/,type:"macro"},{pattern:/io\.(.*)\(.*\)/,type:"macro"},{pattern:/(require|dofile)\((.*)\)/,type:"meta.import"},{pattern:/(pcall|xpcall|unpack|pack|coroutine)/,type:"keyword.other"},{pattern:/--(\[\[)?.*/,type:"comment.line"},{pattern:/\.\.\./,type:"keyword.other"},{pattern:/(\/\/|\/\*)/,type:"not"},{pattern:/(#(include|define)|printf|\s+int\s+)/,type:"not"},{pattern:/\s+(let|const|var)\s+/,type:"not"},{pattern:/\s+(echo|die|\$(.*))\s+/,type:"not"},{pattern:/(def|len|from|import)/,type:"not"},{pattern:/(SELECT|FROM|INSERT|ALTER)/,type:"not"},{pattern:/(puts)/,type:"not"},{pattern:/(([a-zA-Z0-9]+)::([a-zA-Z0-9]+)|using|(.*)!\(.*\)|(\|\|))/,type:"not"}],PHP:[{pattern:/<\?php/,type:"meta.module"},{pattern:/\$\w+/,type:"keyword.variable"},{pattern:/use\s+\w+(\\\w+)+\s*;/,type:"meta.import",nearTop:!0},{pattern:/\$\w+->\w+/,type:"keyword"},{pattern:/(require|include)(_once)?\s*\(?\s*('|").+\.php('|")\s*\)?\s*;/,type:"meta.import"},{pattern:/echo\s+('|").+('|")\s*;/,type:"keyword.print"},{pattern:/NULL/,type:"constant.null"},{pattern:/new\s+((\\\w+)+|\w+)(\(.*\))?/,type:"keyword"},{pattern:/function(\s+[$\w]+\(.*\)|\s*\(.*\))/g,type:"keyword.control"},{pattern:/(else)?if\s+\(.+\)/,type:"keyword.control"},{pattern:/\w+::\w+/,type:"keyword"},{pattern:/===/g,type:"keyword.operator"},{pattern:/!==/g,type:"keyword.operator"},{pattern:/(^|\s)(var|char|long|int|float|double)\s+\w+\s*=?/,type:"not"},{pattern:/(var|const|let)\s+\w+\s*=?/,type:"not"},{pattern:/local\s(function|\w+)/,type:"not"}],Python:[{pattern:/def\s+\w+\(.*\)\s*:/,type:"keyword.function"},{pattern:/while (.+):/,type:"keyword.control"},{pattern:/from [\w.]+ import (\w+|\*)/,type:"meta.import"},{pattern:/class\s*\w+(\(\s*\w+\s*\))?\s*:/,type:"keyword"},{pattern:/if\s+(.+)\s*:/,type:"keyword.control"},{pattern:/elif\s+(.+)\s*:/,type:"keyword.control"},{pattern:/else:/,type:"keyword.control"},{pattern:/for (\w+|\(?\w+,\s*\w+\)?) in (.+):/,type:"keyword.control"},{pattern:/\w+\s*=\s*\w+(?!;)(\n|$)/,type:"keyword"},{pattern:/import ([[^.]\w])+/,type:"meta.import",nearTop:!0},{pattern:/print((\s*\(.+\))|\s+.+)/,type:"keyword.print"},{pattern:/(&{2}|\|{2})/,type:"not"},{pattern:/elseif/,type:"not"},{pattern:/local\s(function|\w+)?\s=\s/,type:"not"}],Ruby:[{pattern:/(require|include)\s+'\w+(\.rb)?'/,type:"meta.import",nearTop:!0},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"keyword.function"},{pattern:/@\w+/,type:"keyword.other"},{pattern:/\.\w+\?/,type:"constant.boolean"},{pattern:/puts\s+("|').+("|')/,type:"keyword.print"},{pattern:/class [A-Z]\w*\s*<\s*([A-Z]\w*(::)?)+/,type:"keyword"},{pattern:/attr_accessor\s+(:\w+(,\s*)?)+/,type:"keyword.function"},{pattern:/\w+\.new\s+/,type:"keyword"},{pattern:/elsif/,type:"keyword.control"},{pattern:/(do\s*\|(\w+(,\s*\w+)?)+\|)/,type:"keyword.control"},{pattern:/for (\w+|\(?\w+,\s*\w+\)?) in (.+)/,type:"keyword.control"},{pattern:/nil/,type:"constant.null"},{pattern:/[A-Z]\w*::[A-Z]\w*/,type:"macro"}],Rust:[{pattern:/fn\smain()/,type:"keyword.function"},{pattern:/(pub\s)?fn\s[A-Za-z0-9<>,]+\(.*\)\s->\s\w+(\s\{|)/,type:"keyword.visibility"},{pattern:/let\smut\s\w+(\s=|)/,type:"keyword.variable"},{pattern:/(.*)!\(.*\)/,type:"macro"},{pattern:/use\s\w+::.*/,type:"meta.import"},{pattern:/\{:\?\}/,type:"keyword.other"},{pattern:/loop \{/,type:"keyword.control"},{pattern:/(impl|crate|extern|macro|box)/,type:"keyword.other"},{pattern:/match\s\w+\s\{/,type:"keyword.control"},{pattern:/\w+\.len\(\)/,type:"keyword.other"},{pattern:/(&str|(i|u)(8|16|32|64|128|size))/,type:"constant.type"},{pattern:/(Vec|Vec::new)|vec!/,type:"constant.type"},{pattern:/(Ok|Err|Box|ToOwned|Clone)/,type:"keyword.other"},{pattern:/panic!\(.*\)/,type:"keyword.function"},{pattern:/using\sSystem/,type:"not"},{pattern:/Console\.WriteLine\s*\(/,type:"not"},{pattern:/(public\s)?((partial|static)\s)?class\s/,type:"not"},{pattern:/(function|func)\s/,type:"not"}],SQL:[{pattern:/CREATE (TABLE|DATABASE)/,type:"keyword",nearTop:!0},{pattern:/DROP (TABLE|DATABASE)/,type:"keyword",nearTop:!0},{pattern:/SHOW DATABASES/,type:"keyword",nearTop:!0},{pattern:/INSERT INTO/,type:"keyword"},{pattern:/(SELECT|SELECT DISTINCT)\s/,type:"keyword"},{pattern:/INNER JOIN/,type:"keyword"},{pattern:/GROUP BY/,type:"keyword"},{pattern:/(END;|COMMIT;)/,type:"keyword"},{pattern:/UPDATE\s+\w+\sSET/,type:"keyword"},{pattern:/VALUES+(\s+\(\w|\(\w)/,type:"keyword"},{pattern:/--\s\w/,type:"comment.line"},{pattern:/(VARCHAR|CHAR|BINARY|VARBINARY|BLOB|TEXT)\([0-9]+\)/,type:"constant.type"},{pattern:/(BIT|TINYINT|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|DOUBLE)\([0-9]+\)/,type:"constant.type"},{pattern:/(TINYBLOB|TINYTEXT|MEDIUMTEXT|MEDIUMBLOB|LONGTEXT|LONGBLOB)/,type:"constant.type"},{pattern:/(BOOLEAN|BOOL|DATE|YEAR)/,type:"constant.type"},{pattern:/local\s(function|\w+)?\s=\s/,type:"not"},{pattern:/(require|dofile)\((.*)\)/,type:"not"}]};return function(p,o={heuristic:!0,statistics:!1,shiki:!1,noUnknown:!1}){let a=p.replace(/\r\n?/g,"\n").replace(/\n{2,}/g,"\n").split("\n");o.heuristic&&a.length>500&&(a=a.filter(((t,n)=>!!e(n,a)||n%Math.ceil(a.length/500)==0)));const s=Object.keys(r).map((t=>({language:t,checkers:r[t]}))),y=[];for(let n=0;n<s.length;n++){const{language:r,checkers:p}=s[n],o=[];for(let n=0;n<a.length;n++)e(n,a)?o.push(t(a[n],p)):o.push(t(a[n],p.filter((t=>!t.nearTop))));let i=0;for(let t=0;t<o.length;t++)i+=o[t];y.push({language:r,points:i})}o.noUnknown||y.push({language:"Unknown",points:1});const i=y.reduce(((t,e)=>t.points>=e.points?t:e),{points:0,language:""}),w={};if(o.statistics){for(let t=0;t<y.length;t++)w[y[t].language]=y[t].points;return{detected:o.shiki?n(i.language):i.language,statistics:w}}return o.shiki?n(i.language):i.language}}();
var flourite=function(){"use strict";function t(t,e){return e.map((e=>e.pattern.test(t)?function(t){switch(t){case"keyword.print":case"meta.import":case"meta.module":return 5;case"keyword.function":case"constant.null":return 4;case"constant.type":case"constant.string":case"constant.numeric":case"constant.boolean":case"constant.dictionary":case"constant.array":case"keyword.variable":return 3;case"section.scope":case"keyword.other":case"keyword.operator":case"keyword.control":case"keyword.visibility":case"keyword":return 2;case"comment.block":case"comment.line":case"comment.documentation":case"macro":return 1;case"not":default:return-20}}(e.type):0)).reduce(((t,e)=>t+e),0)}function e(t,e){return e.length<=10||t<e.length/10}function n(t){return"C++"===t?"cpp":"C#"===t?"csharp":t.toLowerCase()}const r={C:[{pattern:/(char|long|int|float|double)\s+\w+\s*=?/,type:"constant.type"},{pattern:/malloc\(.+\)/,type:"keyword.function"},{pattern:/#include (<|")\w+\.h(>|")/,type:"meta.import",nearTop:!0},{pattern:/(\w+)\s*\*\s*\w+/,type:"keyword"},{pattern:/(\w+)\s+\w+(;|\s*=)/,type:"macro"},{pattern:/(\w+)\s+\w+\[.+\]/,type:"keyword.other"},{pattern:/#define\s+.+/,type:"macro"},{pattern:/NULL/,type:"constant.null"},{pattern:/void/g,type:"keyword.other"},{pattern:/(printf|puts)\s*\(.+\)/,type:"keyword.print"},{pattern:/new \w+/,type:"not"},{pattern:/new [A-Z]\w*\s*\(.+\)/,type:"not"},{pattern:/'.{2,}'/,type:"not"},{pattern:/var\s+\w+\s*=?/,type:"not"},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/puts\s+("|').+("|')/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(using\s)?System(\..*)?(;)?/,type:"not"},{pattern:/(public\s)?((partial|static|delegate)\s)?(class\s)/,type:"not"},{pattern:/(public|private|protected|internal)/,type:"not"},{pattern:/(new|this\s)?(List|IEnumerable)<(sbyte|byte|short|ushort|int|uint|long|ulong|float|double|decimal|bool|char|string)>/,type:"not"},{pattern:/local\s(function|\w+)?/,type:"not"}],"C++":[{pattern:/(char|long|int|float|double)\s+\w+\s*=?/,type:"constant.type"},{pattern:/#include\s*(<|")\w+(\.h)?(>|")/,type:"meta.import"},{pattern:/using\s+namespace\s+.+\s*;/,type:"keyword"},{pattern:/template\s*<.*>/,type:"keyword"},{pattern:/std::\w+/g,type:"keyword.other"},{pattern:/(cout|cin|endl)/g,type:"keyword.print"},{pattern:/(public|protected|private):/,type:"keyword.visibility"},{pattern:/nullptr/,type:"keyword"},{pattern:/new \w+(\(.*\))?/,type:"keyword"},{pattern:/#define\s+.+/,type:"macro"},{pattern:/\w+<\w+>/,type:"keyword.other"},{pattern:/class\s+\w+/,type:"keyword"},{pattern:/void/g,type:"keyword"},{pattern:/(else )?if\s*\(.+\)/,type:"keyword.control"},{pattern:/while\s+\(.+\)/,type:"keyword.control"},{pattern:/\w*::\w+/,type:"macro"},{pattern:/'.{2,}'/,type:"not"},{pattern:/(List<\w+>|ArrayList<\w*>\s*\(.*\))(\s+[\w]+|;)/,type:"not"},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/puts\s+("|').+("|')/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(using\s)?System(\..*)?(;)?/,type:"not"},{pattern:/(public|private|protected|internal)\s/,type:"not"},{pattern:/fun main\((.*)?\) {/,type:"not"},{pattern:/(inline|private|public|protected|override|operator(\s+))?fun(\s+)([A-Za-z0-9_])(\s+)?\((.*)\)(\s+)({|=)/,type:"not"},{pattern:/(const)?(\s+)?val(\s+)(.*)(:(\s)(.*)(\?)?)?(\s+)=(\s+)/,type:"not"}],"C#":[{pattern:/using\sSystem(\..*)?(;)?/,type:"meta.import"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"keyword.print"},{pattern:/(public\s)?((partial|static|delegate)\s)?class\s/,type:"keyword"},{pattern:/(extern|override|sealed|readonly|virtual|volatile)/,type:"keyword.other"},{pattern:/namespace\s(.*)(\.(.*))?(\s{)?/,type:"keyword"},{pattern:/(#region(\s.*)?|#endregion\n)/,type:"section.scope"},{pattern:/(public|private|protected|internal)\s/,type:"keyword.visibility"},{pattern:/(const\s)?(sbyte|byte|short|ushort|int|uint|long|ulong|float|double|decimal|bool|char|string)(\[\])?\s(.*)\s=\s(.*);/,type:"constant.type"},{pattern:/(new|this\s)?(List|IEnumerable)<(sbyte|byte|short|ushort|int|uint|long|ulong|float|double|decimal|bool|char|string)>/,type:"constant.dictionary"},{pattern:/#define\s(.*)/,type:"macro"},{pattern:/\s([A-Z]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*)\s=/,type:"macro"},{pattern:/(extends|throws|@Attribute)/,type:"not"},{pattern:/System\.(in|out)\.\w+/,type:"not"}],CSS:[{pattern:/[a-z-]+:(?!:).+;/,type:"keyword"},{pattern:/<(\/)?style>/,type:"not"}],Go:[{pattern:/package\s+[a-z]+\n/,type:"meta.module",nearTop:!0},{pattern:/(import\s*\(\s*\n)|(import\s+"[a-z0-9/.]+")/,type:"meta.import",nearTop:!0},{pattern:/if.+err\s*!=\s*nil.+{/,type:"keyword.function"},{pattern:/fmt\.Print(f|ln)?\(.*\)/,type:"keyword.print"},{pattern:/func(\s+\w+\s*)?\(.*\).*{/,type:"keyword.function"},{pattern:/\w+\s*:=\s*.+[^;\n]/,type:"keyword.variable"},{pattern:/(}\s*else\s*)?if[^()]+{/,type:"keyword.control"},{pattern:/(var|const)\s+\w+\s+[\w*]+(\n|\s*=|$)/,type:"keyword.variable"},{pattern:/[a-z]+\.[A-Z]\w*/,type:"macro"},{pattern:/nil/,type:"keyword"},{pattern:/'.{2,}'/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/using\sSystem(\..*)?(;)?/,type:"not"},{pattern:/(public|private|protected|internal)\s/,type:"not"}],HTML:[{pattern:/<!DOCTYPE (html|HTML PUBLIC .+)>/,type:"meta.module",nearTop:!0},{pattern:/<[a-z0-9]+(\s*[\w]+=('|").+('|")\s*)?>.*<\/[a-z0-9]+>/g,type:"keyword"},{pattern:/<!--(.*)(-->)?/,type:"comment.block"},{pattern:/[a-z-]+=("|').+("|')/g,type:"keyword.other"},{pattern:/<\?php/,type:"not"}],Java:[{pattern:/System\.(in|out)\.\w+/,type:"keyword.print"},{pattern:/(private|protected|public)\s*\w+\s*\w+(\s*=\s*[\w])?/,type:"keyword"},{pattern:/(private|protected|public)\s*\w+\s*[\w]+\(.+\)/,type:"keyword"},{pattern:/(^|\s)(String)\s+[\w]+\s*=?/,type:"keyword.other"},{pattern:/(List<\w+>|ArrayList<\w*>\s*\(.*\))(\s+[\w]+|;)/,type:"keyword.variable"},{pattern:/(public\s*)?class\s*(.*)+(\s)?\{/,type:"keyword"},{pattern:/(\w+)(\[\s*\])+\s+\w+/,type:"constant.array"},{pattern:/final\s*\w+/,type:"keyword.other"},{pattern:/\w+\.(get|set)\(.+\)/,type:"keyword.other"},{pattern:/new [A-Z]\w*\s*\(.+\)/,type:"keyword.other"},{pattern:/(^|\s)(char|long|int|float|double)\s+[\w]+\s*=?/,type:"constant.type"},{pattern:/(extends|implements)/,type:"meta.module",nearTop:!0},{pattern:/null/g,type:"keyword.other"},{pattern:/(else )?if\s*\(.+\)/,type:"keyword.control"},{pattern:/while\s+\(.+\)/,type:"keyword.control"},{pattern:/void/g,type:"keyword.other"},{pattern:/const\s*\w+/,type:"not"},{pattern:/(\w+)\s*\*\s*\w+/,type:"not"},{pattern:/'.{2,}'/,type:"not"},{pattern:/#include\s*(<|")\w+(\.h)?(>|")/,type:"not",nearTop:!0},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/\[Attribute\]/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(#region(\s.*)?|#endregion\n)/,type:"not"},{pattern:/using\sSystem(\..*)?(;)?/,type:"not"},{pattern:/fun main\((.*)?\) {/,type:"not"},{pattern:/(inline(\s+))?fun(\s+)([A-Za-z0-9_])(\s+)?\((.*)\)(\s+)({|=)/,type:"not"},{pattern:/(const)?(\s+)?val(\s+)(.*)(:(\s)(.*)(\?)?)?(\s+)=(\s+)/,type:"not"}],Javascript:[{pattern:/undefined/g,type:"keyword"},{pattern:/console\.log\s*\(/,type:"keyword.print"},{pattern:/(var|const|let)\s+\w+\s*=?/,type:"keyword.variable"},{pattern:/(('|").+('|")\s*|\w+):\s*[{[]/,type:"constant.array"},{pattern:/===/g,type:"keyword.operator"},{pattern:/!==/g,type:"keyword.operator"},{pattern:/function\*?(\s+[$\w]+\s*\(.*\)|\s*\(.*\))/g,type:"keyword.function"},{pattern:/null/g,type:"constant.null"},{pattern:/\(.*\)\s*=>\s*.+/,type:"keyword.control"},{pattern:/(else )?if\s+\(.+\)/,type:"keyword.control"},{pattern:/while\s+\(.+\)/,type:"keyword.control"},{pattern:/(^|\s)(char|long|int|float|double)\s+\w+\s*=?/,type:"not"},{pattern:/\*\w+/,type:"not"},{pattern:/<(\/)?script( type=('|")text\/javascript('|"))?>/,type:"not"},{pattern:/fn\s[A-Za-z0-9<>,]+\(.*\)\s->\s\w+(\s\{|)/,type:"not"},{pattern:/Console\.(WriteLine|Write)(\s*)?\(/,type:"not"},{pattern:/(using\s)?System(\..*)?(;)?/,type:"not"},{pattern:/(func|fn)\s/,type:"not"},{pattern:/(begin|end)\n/,type:"not"},{pattern:/local\s(function|(\w+)\s=)/,type:"not"},{pattern:/fun main\((.*)?\) {/,type:"not"},{pattern:/(inline(\s+))?fun(\s+)([A-Za-z0-9_])(\s+)?\((.*)\)(\s+)({|=)/,type:"not"},{pattern:/(const)?(\s+)?val(\s+)(.*)(:(\s)(.*)(\?)?)?(\s+)=(\s+)/,type:"not"}],Julia:[{pattern:/(using)\s\w+/,type:"meta.import"},{pattern:/(bare\s)?module/,type:"meta.module"},{pattern:/from\s.+import\s.+/,type:"not"},{pattern:/println\(.*\)/,type:"keyword.print"},{pattern:/(.*)!\(.*\)/,type:"macro"},{pattern:/for\s(\w+)\s(in|=)\s/,type:"keyword.control"},{pattern:/function\s\w+\(.*\)\s\{/,type:"not"},{pattern:/while\s+\(.+\)\n/,type:"not"},{pattern:/end\n?/,type:"keyword"},{pattern:/struct\s(.*)\s<:\s/,type:"keyword.other"},{pattern:/(::)?(Int|Uint)(8|16|32|64|128)/,type:"keyword.variable"},{pattern:/[0-9]+im/,type:"keyword"},{pattern:/\{:\?\}/,type:"not"},{pattern:/fn\smain()/,type:"not"},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"not"},{pattern:/puts\s+("|').+("|')/,type:"not"},{pattern:/class\s/,type:"not"},{pattern:/local\s(function|\w+)/,type:"not"},{pattern:/fun main\((.*)?\) {/,type:"not"},{pattern:/fun(\s+)([A-Za-z0-9_])(\s+)?\((.*)\)(\s+){/,type:"not"}],Kotlin:[{pattern:/fun main\((.*)?\) {/,type:"keyword.function"},{pattern:/(inline|private|public|protected|override|operator(\s+))?fun(\s+)([A-Za-z0-9_])(\s+)?\((.*)\)(\s+)({|=)/,type:"keyword.function"},{pattern:/println\((.*)\)(\n|;)/,type:"keyword.print"},{pattern:/(const)?(\s+)?val(\s+)(.*)(:(\s)(.*)(\?)?)?(\s+)=(\s+)/,type:"keyword.variable"},{pattern:/^(\s+)?(inner|open|data)(\s+)class/,type:"keyword"},{pattern:/^import(\s+)(.*)$/,type:"meta.import",nearTop:!0},{pattern:/typealias(\s+)(.*)(\s+)=/,type:"keyword.control"},{pattern:/companion(\s+)object/,type:"keyword"},{pattern:/when(\s+)(\((.*)\)\s+)?{$/,type:"keyword.control"}],Lua:[{pattern:/(\[\[.*\]\])/,type:"constant.string"},{pattern:/local\s([a-zA-Z0-9_]+)(\s*=)?/,type:"keyword.variable"},{pattern:/(local\s)?function\s*([a-zA-Z0-9_]*)?\(\)/,type:"keyword.function"},{pattern:/for\s+([a-zA-Z]+)\s*=\s*([a-zA-Z0-9_]+),\s*([a-zA-Z0-9_]+)\s+do/,type:"keyword.control"},{pattern:/while\s(.*)\sdo/,type:"keyword.control"},{pattern:/\s+(and|break|do|else|elseif|end|false|function|if|in|not|or|local|repeat|return|then|true|until|pairs|ipairs|in|yield)/,type:"keyword.other"},{pattern:/nil/,type:"constant.null"},{pattern:/#([a-zA-Z_{}]+)/,type:"keyword.operator"},{pattern:/((get|set)metatable|raw(get|set|equal))\(.*\)/,type:"keyword.other"},{pattern:/__(index|newindex|call|sub|mul|div|mod|pow|unm|eq|le|lt)/,type:"keyword.other"},{pattern:/(\(.+\)|([a-zA-Z_]+)):([a-zA-Z_])\(.*\)/,type:"keyword.other"},{pattern:/{\s*(\S+)((,|;)\s*\S+)*\s*}/,type:"constant.array"},{pattern:/{\s*(\S+\s*=\s*\S+)((,|;)\s*\S+\s*=\s*\S+)*\s*}/,type:"constant.dictionary"},{pattern:/math\.(.*)\([0-9]*\)/,type:"macro"},{pattern:/table\.(.*)\(.*\)/,type:"macro"},{pattern:/io\.(.*)\(.*\)/,type:"macro"},{pattern:/(require|dofile)\((.*)\)/,type:"meta.import"},{pattern:/(pcall|xpcall|unpack|pack|coroutine)/,type:"keyword.other"},{pattern:/--(\[\[)?.*/,type:"comment.line"},{pattern:/\.\.\./,type:"keyword.other"},{pattern:/(\/\/|\/\*)/,type:"not"},{pattern:/(#(include|define)|printf|\s+int\s+)/,type:"not"},{pattern:/\s+(let|const|var)\s+/,type:"not"},{pattern:/\s+(echo|die|\$(.*))\s+/,type:"not"},{pattern:/(def|len|from|import)/,type:"not"},{pattern:/(SELECT|FROM|INSERT|ALTER)/,type:"not"},{pattern:/(puts)/,type:"not"},{pattern:/(([a-zA-Z0-9]+)::([a-zA-Z0-9]+)|using|(.*)!\(.*\)|(\|\|))/,type:"not"}],Pascal:[{pattern:/^program (.*);$/,type:"meta.module",nearTop:!0},{pattern:/var$/i,type:"constant.type",nearTop:!0},{pattern:/const$/i,type:"constant.type",nearTop:!0},{pattern:/type$/i,type:"constant.type",nearTop:!0},{pattern:/(write|writeln)(\s+)?(\((.*)\))?;/i,type:"keyword.print"},{pattern:/^(\s*)?(function|procedure)(\s*)(.*)\((.*)\)(\s)?:(\s)?(.*);$/i,type:"keyword.function"},{pattern:/end(\.|;)/i,type:"keyword.control"},{pattern:/:(\s*)?(cardinal|shortint|smallint|word|extended|comp)(\s*);$/i,type:"constant.type"},{pattern:/if(\s+)(.*)(\s+)then/i,type:"keyword.control"},{pattern:/for(\s+)(.*):=(.*)(\s+)(downto|to)(\s+)(.*)(\s+)do/i,type:"keyword.control"},{pattern:/with(\s+)(.*)(\s+)do/i,type:"keyword.control"},{pattern:/repeat$/,type:"keyword"},{pattern:/begin$/,type:"keyword"},{pattern:/until(\s+)(.*);/i,type:"keyword.control"},{pattern:/\w+(\s*)?:=(\s*)?.+;$/i,type:"keyword.variable"}],PHP:[{pattern:/<\?php/,type:"meta.module"},{pattern:/\$\w+/,type:"keyword.variable"},{pattern:/use\s+\w+(\\\w+)+\s*;/,type:"meta.import",nearTop:!0},{pattern:/\$\w+->\w+/,type:"keyword"},{pattern:/(require|include)(_once)?\s*\(?\s*('|").+\.php('|")\s*\)?\s*;/,type:"meta.import"},{pattern:/echo\s+('|").+('|")\s*;/,type:"keyword.print"},{pattern:/NULL/,type:"constant.null"},{pattern:/new\s+((\\\w+)+|\w+)(\(.*\))?/,type:"keyword"},{pattern:/function(\s+[$\w]+\(.*\)|\s*\(.*\))/g,type:"keyword.control"},{pattern:/(else)?if\s+\(.+\)/,type:"keyword.control"},{pattern:/\w+::\w+/,type:"keyword"},{pattern:/===/g,type:"keyword.operator"},{pattern:/!==/g,type:"keyword.operator"},{pattern:/(^|\s)(var|char|long|int|float|double)\s+\w+\s*=?/,type:"not"},{pattern:/(var|const|let)\s+\w+\s*=?/,type:"not"},{pattern:/local\s(function|\w+)/,type:"not"}],Python:[{pattern:/def\s+\w+\(.*\)\s*:/,type:"keyword.function"},{pattern:/while (.+):/,type:"keyword.control"},{pattern:/from [\w.]+ import (\w+|\*)/,type:"meta.import"},{pattern:/class\s*\w+(\(\s*\w+\s*\))?\s*:/,type:"keyword"},{pattern:/if\s+(.+)\s*:/,type:"keyword.control"},{pattern:/elif\s+(.+)\s*:/,type:"keyword.control"},{pattern:/else:/,type:"keyword.control"},{pattern:/for (\w+|\(?\w+,\s*\w+\)?) in (.+):/,type:"keyword.control"},{pattern:/\w+\s*=\s*\w+(?!;)(\n|$)/,type:"keyword"},{pattern:/import ([[^.]\w])+/,type:"meta.import",nearTop:!0},{pattern:/print((\s*\(.+\))|\s+.+)/,type:"keyword.print"},{pattern:/(&{2}|\|{2})/,type:"not"},{pattern:/elseif/,type:"not"},{pattern:/local\s(function|\w+)?\s=\s/,type:"not"},{pattern:/fun main\((.*)?\) {/,type:"not"},{pattern:/(inline(\s+))?fun(\s+)([A-Za-z0-9_])(\s+)?\((.*)\)(\s+)({|=)/,type:"not"},{pattern:/(const)?(\s+)?val(\s+)(.*)(:(\s)(.*)(\?)?)?(\s+)=(\s+)/,type:"not"}],Ruby:[{pattern:/(require|include)\s+'\w+(\.rb)?'/,type:"meta.import",nearTop:!0},{pattern:/def\s+\w+\s*(\(.+\))?\s*\n/,type:"keyword.function"},{pattern:/@\w+/,type:"keyword.other"},{pattern:/\.\w+\?/,type:"constant.boolean"},{pattern:/puts\s+("|').+("|')/,type:"keyword.print"},{pattern:/class [A-Z]\w*\s*<\s*([A-Z]\w*(::)?)+/,type:"keyword"},{pattern:/attr_accessor\s+(:\w+(,\s*)?)+/,type:"keyword.function"},{pattern:/\w+\.new\s+/,type:"keyword"},{pattern:/elsif/,type:"keyword.control"},{pattern:/(do\s*\|(\w+(,\s*\w+)?)+\|)/,type:"keyword.control"},{pattern:/for (\w+|\(?\w+,\s*\w+\)?) in (.+)/,type:"keyword.control"},{pattern:/nil/,type:"constant.null"},{pattern:/[A-Z]\w*::[A-Z]\w*/,type:"macro"}],Rust:[{pattern:/fn\smain()/,type:"keyword.function"},{pattern:/(pub\s)?fn\s[A-Za-z0-9<>,]+\(.*\)\s->\s\w+(\s\{|)/,type:"keyword.visibility"},{pattern:/let\smut\s\w+(\s=|)/,type:"keyword.variable"},{pattern:/(.*)!\(.*\)/,type:"macro"},{pattern:/use\s\w+::.*/,type:"meta.import"},{pattern:/\{:\?\}/,type:"keyword.other"},{pattern:/loop \{/,type:"keyword.control"},{pattern:/(impl|crate|extern|macro|box)/,type:"keyword.other"},{pattern:/match\s\w+\s\{/,type:"keyword.control"},{pattern:/\w+\.len\(\)/,type:"keyword.other"},{pattern:/(&str|(i|u)(8|16|32|64|128|size))/,type:"constant.type"},{pattern:/(Vec|Vec::new)|vec!/,type:"constant.type"},{pattern:/(Ok|Err|Box|ToOwned|Clone)/,type:"keyword.other"},{pattern:/panic!\(.*\)/,type:"keyword.function"},{pattern:/using\sSystem/,type:"not"},{pattern:/Console\.WriteLine\s*\(/,type:"not"},{pattern:/(public\s)?((partial|static)\s)?class\s/,type:"not"},{pattern:/(function|func)\s/,type:"not"}],SQL:[{pattern:/CREATE (TABLE|DATABASE)/,type:"keyword",nearTop:!0},{pattern:/DROP (TABLE|DATABASE)/,type:"keyword",nearTop:!0},{pattern:/SHOW DATABASES/,type:"keyword",nearTop:!0},{pattern:/INSERT INTO/,type:"keyword"},{pattern:/(SELECT|SELECT DISTINCT)\s/,type:"keyword"},{pattern:/INNER JOIN/,type:"keyword"},{pattern:/GROUP BY/,type:"keyword"},{pattern:/(END;|COMMIT;)/,type:"keyword"},{pattern:/UPDATE\s+\w+\sSET/,type:"keyword"},{pattern:/VALUES+(\s+\(\w|\(\w)/,type:"keyword"},{pattern:/--\s\w/,type:"comment.line"},{pattern:/(VARCHAR|CHAR|BINARY|VARBINARY|BLOB|TEXT)\([0-9]+\)/,type:"constant.type"},{pattern:/(BIT|TINYINT|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|DOUBLE)\([0-9]+\)/,type:"constant.type"},{pattern:/(TINYBLOB|TINYTEXT|MEDIUMTEXT|MEDIUMBLOB|LONGTEXT|LONGBLOB)/,type:"constant.type"},{pattern:/(BOOLEAN|BOOL|DATE|YEAR)/,type:"constant.type"},{pattern:/local\s(function|\w+)?\s=\s/,type:"not"},{pattern:/(require|dofile)\((.*)\)/,type:"not"}],YAML:[{pattern:/^( )*([A-Za-z0-9_. ]+):( )?(.*)?$/,type:"keyword"},{pattern:/^( )*-( )([A-Za-z0-9_. ]+):( )?(.*)?$/,type:"keyword"},{pattern:/^( )*-( )(.*)$/,type:"keyword"},{pattern:/^( )*([A-Za-z0-9_. ]+):( )!!binary( )?(|)?$/,type:"constant.type"},{pattern:/^( )*([A-Za-z0-9_. ]+):( )\|$/,type:"keyword"},{pattern:/^( )*([A-Za-z0-9_. ]+):( )>$/,type:"keyword"},{pattern:/^( )*\?( )(.*)$/,type:"keyword"},{pattern:/^( )*\?( )\|$/,type:"constant.type"},{pattern:/^( )*<<:( )(\*)(.*)?$/,type:"constant.type"},{pattern:/^( )*([A-Za-z0-9_. ]+):(.*)?( )?{$/,type:"not"},{pattern:/^( )*([A-Za-z0-9_. ]+):(.*)?( )?,$/,type:"not"}]};return function(p,o={heuristic:!0,statistics:!1,shiki:!1,noUnknown:!1}){let a=p.replace(/\r\n?/g,"\n").replace(/\n{2,}/g,"\n").split("\n");o.heuristic&&a.length>500&&(a=a.filter(((t,n)=>!!e(n,a)||n%Math.ceil(a.length/500)==0)));const s=Object.keys(r).map((t=>({language:t,checkers:r[t]}))),y=[];for(let n=0;n<s.length;n++){const{language:r,checkers:p}=s[n],o=[];for(let n=0;n<a.length;n++)e(n,a)?o.push(t(a[n],p)):o.push(t(a[n],p.filter((t=>!t.nearTop))));let i=0;for(let t=0;t<o.length;t++)i+=o[t];y.push({language:r,points:i})}o.noUnknown||y.push({language:"Unknown",points:1});const i=y.reduce(((t,e)=>t.points>=e.points?t:e),{points:0,language:""}),w={};if(o.statistics){for(let t=0;t<y.length;t++)w[y[t].language]=y[t].points;return{detected:o.shiki?n(i.language):i.language,statistics:w}}return o.shiki?n(i.language):i.language}}();
{
"name": "flourite",
"version": "1.1.0",
"version": "1.1.1",
"description": "A library for detecting the programming language of a code snippet.",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

# Flourite - Language detector
[![npm](https://img.shields.io/npm/v/flourite?style=for-the-badge)](https://www.npmjs.com/package/flourite) [![npm bundle size](https://img.shields.io/bundlephobia/min/flourite?style=for-the-badge)](https://www.npmjs.com/package/flourite) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/teknologi-umum/flourite/CI?style=for-the-badge)](https://github.com/teknologi-umum/flourite/actions/workflows/ci.yml) [![Codecov](https://img.shields.io/codecov/c/gh/teknologi-umum/flourite?style=for-the-badge)](https://app.codecov.io/gh/teknologi-umum/flourite) [![LGTM Alerts](https://img.shields.io/lgtm/alerts/github/teknologi-umum/flourite?style=for-the-badge)](https://lgtm.com/projects/g/teknologi-umum/flourite/)
A fork of [ts95/lang-detector](https://github.com/ts95/lang-detector), rewritten in Typescript with more language support.

@@ -10,13 +12,13 @@

- No external dependencies
- 100 test cases and growing!
- 150 test cases and growing!
## Detectable languages
| Languages | | |
| --------- | ---------- | ------ |
| C | HTML | PHP |
| C++ | Java | Python |
| C# | Javascript | Ruby |
| CSS | Julia | Rust |
| Go | Lua | SQL |
| Languages | | | |
| --------- | ---------- | ------ | ---- |
| C | HTML | Lua | Rust |
| C++ | Java | Pascal | SQL |
| C# | Javascript | PHP | YAML |
| CSS | Julia | Python | |
| Go | Kotlin | Ruby | |

@@ -32,4 +34,4 @@ ## Install

```html
<script src="https://unpkg.com/flourite@1.0.2"></script>
<script src="https://cdn.jsdelivr.net/npm/flourite@1.0.2/dist/index.iife.js"></script>
<script src="https://unpkg.com/flourite@1.1.1"></script>
<script src="https://cdn.jsdelivr.net/npm/flourite@1.1.1/dist/index.iife.js"></script>
```

@@ -63,3 +65,5 @@

// Julia: 0,
// Kotlin: 0,
// Lua: -20,
// Pascal: 0,
// PHP: 0,

@@ -70,3 +74,4 @@ // Python: 0,

// SQL: 0,
// Unknown: 1
// Unknown: 1,
// YAML: 0
// }

@@ -73,0 +78,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc