__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
import { parser } from '@lezer/json';
import { LRLanguage, indentNodeProp, foldNodeProp, continuedIndent, foldInside, LanguageSupport } from '@codemirror/language';

/**
Calls
[`JSON.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)
on the document and, if that throws an error, reports it as a
single diagnostic.
*/
const jsonParseLinter = () => (view) => {
    try {
        JSON.parse(view.state.doc.toString());
    }
    catch (e) {
        if (!(e instanceof SyntaxError))
            throw e;
        const pos = getErrorPosition(e, view.state.doc);
        return [{
                from: pos,
                message: e.message,
                severity: 'error',
                to: pos
            }];
    }
    return [];
};
function getErrorPosition(error, doc) {
    let m;
    if (m = error.message.match(/at position (\d+)/))
        return Math.min(+m[1], doc.length);
    if (m = error.message.match(/at line (\d+) column (\d+)/))
        return Math.min(doc.line(+m[1]).from + (+m[2]) - 1, doc.length);
    return 0;
}

/**
A language provider that provides JSON parsing.
*/
const jsonLanguage = /*@__PURE__*/LRLanguage.define({
    name: "json",
    parser: /*@__PURE__*/parser.configure({
        props: [
            /*@__PURE__*/indentNodeProp.add({
                Object: /*@__PURE__*/continuedIndent({ except: /^\s*\}/ }),
                Array: /*@__PURE__*/continuedIndent({ except: /^\s*\]/ })
            }),
            /*@__PURE__*/foldNodeProp.add({
                "Object Array": foldInside
            })
        ]
    }),
    languageData: {
        closeBrackets: { brackets: ["[", "{", '"'] },
        indentOnInput: /^\s*[\}\]]$/
    }
});
/**
JSON language support.
*/
function json() {
    return new LanguageSupport(jsonLanguage);
}

export { json, jsonLanguage, jsonParseLinter };

Filemanager

Name Type Size Permission Actions
codemirror-autocomplete.js File 86.09 KB 0664
codemirror-autocomplete.min.js File 36.66 KB 0664
codemirror-autocomplete.min.js.gz File 12.98 KB 0664
codemirror-commands.js File 79.05 KB 0664
codemirror-commands.min.js File 27.41 KB 0664
codemirror-commands.min.js.gz File 9.1 KB 0664
codemirror-lang-css.js File 15.59 KB 0664
codemirror-lang-css.min.js File 10.97 KB 0664
codemirror-lang-css.min.js.gz File 4.46 KB 0664
codemirror-lang-html.js File 25.25 KB 0664
codemirror-lang-html.min.js File 14.09 KB 0664
codemirror-lang-html.min.js.gz File 5.38 KB 0664
codemirror-lang-javascript.js File 19.52 KB 0664
codemirror-lang-javascript.min.js File 8.95 KB 0664
codemirror-lang-javascript.min.js.gz File 3.75 KB 0664
codemirror-lang-json.js File 1.83 KB 0664
codemirror-lang-json.min.js File 892 B 0664
codemirror-lang-json.min.js.gz File 536 B 0664
codemirror-lang-markdown.js File 18.99 KB 0664
codemirror-lang-markdown.min.js File 8 KB 0664
codemirror-lang-markdown.min.js.gz File 3.4 KB 0664
codemirror-lang-php.js File 2.81 KB 0664
codemirror-lang-php.min.js File 1.5 KB 0664
codemirror-lang-php.min.js.gz File 831 B 0664
codemirror-lang-xml.js File 13.08 KB 0664
codemirror-lang-xml.min.js File 6.14 KB 0664
codemirror-lang-xml.min.js.gz File 2.42 KB 0664
codemirror-language.js File 105.89 KB 0664
codemirror-language.min.js File 39.38 KB 0664
codemirror-language.min.js.gz File 14.25 KB 0664
codemirror-lint.js File 34.31 KB 0664
codemirror-lint.min.js File 15.77 KB 0664
codemirror-lint.min.js.gz File 6.14 KB 0664
codemirror-search.js File 48.82 KB 0664
codemirror-search.min.js File 21.51 KB 0664
codemirror-search.min.js.gz File 7.22 KB 0664
codemirror-state.js File 145.05 KB 0664
codemirror-state.min.js File 47.62 KB 0664
codemirror-state.min.js.gz File 15.9 KB 0664
codemirror-theme-one-dark.js File 4.67 KB 0664
codemirror-theme-one-dark.min.js File 2.71 KB 0664
codemirror-theme-one-dark.min.js.gz File 1.16 KB 0664
codemirror-view.js File 469 KB 0664
codemirror-view.min.js File 192.01 KB 0664
codemirror-view.min.js.gz File 61.67 KB 0664
lezer-common.js File 79.5 KB 0664
lezer-common.min.js File 26.62 KB 0664
lezer-common.min.js.gz File 9.18 KB 0664
lezer-css.js File 16.86 KB 0664
lezer-css.min.js File 14.44 KB 0664
lezer-css.min.js.gz File 6.8 KB 0664
lezer-highlight.js File 28.6 KB 0664
lezer-highlight.min.js File 6.99 KB 0664
lezer-highlight.min.js.gz File 2.82 KB 0664
lezer-html.js File 20.28 KB 0664
lezer-html.min.js File 14.04 KB 0664
lezer-html.min.js.gz File 6.1 KB 0664
lezer-javascript.js File 78.86 KB 0664
lezer-javascript.min.js File 76 KB 0664
lezer-javascript.min.js.gz File 29.96 KB 0664
lezer-json.js File 1.93 KB 0664
lezer-json.min.js File 1.67 KB 0664
lezer-json.min.js.gz File 1.05 KB 0664
lezer-lr.js File 69.51 KB 0664
lezer-lr.min.js File 25.81 KB 0664
lezer-lr.min.js.gz File 8.6 KB 0664
lezer-markdown.js File 83.48 KB 0664
lezer-markdown.min.js File 34.65 KB 0664
lezer-markdown.min.js.gz File 11.65 KB 0664
lezer-php.js File 98.54 KB 0664
lezer-php.min.js File 94.23 KB 0664
lezer-php.min.js.gz File 27.08 KB 0664
lezer-xml.js File 10.44 KB 0664
lezer-xml.min.js File 8.43 KB 0664
lezer-xml.min.js.gz File 3.54 KB 0664
Filemanager