Full Code of einars/js-beautify for AI

main 45898e1a326b cached
182 files
2.5 MB
660.2k tokens
794 symbols
1 requests
Download .txt
Showing preview only (2,641K chars total). Download the full file or copy to clipboard to get everything.
Repository: einars/js-beautify
Branch: main
Commit: 45898e1a326b
Files: 182
Total size: 2.5 MB

Directory structure:
gitextract_sjeuf_wc/

├── .codeclimate.yml
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── beautification-problem.md
│   │   ├── feature_request.md
│   │   └── question-about-usage.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── codeql-analysis.yml
│       ├── main.yml
│       ├── milestone-publish.yml
│       ├── pr-staging.yml
│       └── ssh_config.txt
├── .gitignore
├── .jshintignore
├── .jshintrc
├── .npmignore
├── .pylintrc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── bower.json
├── index.html
├── js/
│   ├── bin/
│   │   ├── css-beautify.js
│   │   ├── html-beautify.js
│   │   └── js-beautify.js
│   ├── config/
│   │   └── defaults.json
│   ├── index.js
│   ├── src/
│   │   ├── cli.js
│   │   ├── core/
│   │   │   ├── directives.js
│   │   │   ├── inputscanner.js
│   │   │   ├── options.js
│   │   │   ├── output.js
│   │   │   ├── pattern.js
│   │   │   ├── templatablepattern.js
│   │   │   ├── token.js
│   │   │   ├── tokenizer.js
│   │   │   ├── tokenstream.js
│   │   │   └── whitespacepattern.js
│   │   ├── css/
│   │   │   ├── beautifier.js
│   │   │   ├── index.js
│   │   │   ├── options.js
│   │   │   └── tokenizer.js
│   │   ├── html/
│   │   │   ├── beautifier.js
│   │   │   ├── index.js
│   │   │   ├── options.js
│   │   │   └── tokenizer.js
│   │   ├── index.js
│   │   ├── javascript/
│   │   │   ├── acorn.js
│   │   │   ├── beautifier.js
│   │   │   ├── index.js
│   │   │   ├── options.js
│   │   │   └── tokenizer.js
│   │   └── unpackers/
│   │       ├── javascriptobfuscator_unpacker.js
│   │       ├── myobfuscate_unpacker.js
│   │       ├── p_a_c_k_e_r_unpacker.js
│   │       └── urlencode_unpacker.js
│   └── test/
│       ├── amd-beautify-tests.js
│       ├── core/
│       │   ├── test_inputscanner.js
│       │   └── test_options.js
│       ├── node-beautify-css-perf-tests.js
│       ├── node-beautify-html-perf-tests.js
│       ├── node-beautify-perf-tests.js
│       ├── node-beautify-tests.js
│       ├── node-src-index-tests.js
│       ├── resources/
│       │   ├── configerror/
│       │   │   ├── .jsbeautifyrc
│       │   │   └── subDir1/
│       │   │       └── subDir2/
│       │   │           └── empty.txt
│       │   ├── editorconfig/
│       │   │   ├── .editorconfig
│       │   │   ├── cr/
│       │   │   │   └── .editorconfig
│       │   │   ├── crlf/
│       │   │   │   └── .editorconfig
│       │   │   ├── error/
│       │   │   │   └── .editorconfig
│       │   │   └── example-base.js
│       │   ├── example1.js
│       │   └── indent11chars/
│       │       ├── .jsbeautifyrc
│       │       └── subDir1/
│       │           └── subDir2/
│       │               └── empty.txt
│       ├── run-tests
│       ├── sanitytest.js
│       └── shell-test.sh
├── jsbeautifyrc
├── package.json
├── python/
│   ├── MANIFEST.in
│   ├── __init__.py
│   ├── css-beautify
│   ├── cssbeautifier/
│   │   ├── __init__.py
│   │   ├── __version__.py
│   │   ├── _main.py
│   │   ├── css/
│   │   │   ├── __init__.py
│   │   │   ├── beautifier.py
│   │   │   └── options.py
│   │   └── tests/
│   │       └── __init__.py
│   ├── debian/
│   │   ├── .gitignore
│   │   ├── changelog
│   │   ├── compat
│   │   ├── control
│   │   ├── rules
│   │   └── source/
│   │       └── format
│   ├── js-beautify-profile
│   ├── js-beautify-test
│   ├── js-beautify-test.py
│   ├── jsbeautifier/
│   │   ├── __init__.py
│   │   ├── __version__.py
│   │   ├── cli/
│   │   │   └── __init__.py
│   │   ├── core/
│   │   │   ├── __init__.py
│   │   │   ├── directives.py
│   │   │   ├── inputscanner.py
│   │   │   ├── options.py
│   │   │   ├── output.py
│   │   │   ├── pattern.py
│   │   │   ├── templatablepattern.py
│   │   │   ├── token.py
│   │   │   ├── tokenizer.py
│   │   │   ├── tokenstream.py
│   │   │   └── whitespacepattern.py
│   │   ├── javascript/
│   │   │   ├── __init__.py
│   │   │   ├── acorn.py
│   │   │   ├── beautifier.py
│   │   │   ├── options.py
│   │   │   └── tokenizer.py
│   │   ├── tests/
│   │   │   ├── __init__.py
│   │   │   ├── core/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_inputscanner.py
│   │   │   │   └── test_options.py
│   │   │   ├── shell-test.sh
│   │   │   └── testindentation.py
│   │   └── unpackers/
│   │       ├── README.specs.mkd
│   │       ├── __init__.py
│   │       ├── evalbased.py
│   │       ├── javascriptobfuscator.py
│   │       ├── myobfuscate.py
│   │       ├── packer.py
│   │       ├── tests/
│   │       │   ├── __init__.py
│   │       │   ├── test-myobfuscate-input.js
│   │       │   ├── test-myobfuscate-output.js
│   │       │   ├── test-packer-62-input.js
│   │       │   ├── test-packer-non62-input.js
│   │       │   ├── testjavascriptobfuscator.py
│   │       │   ├── testmyobfuscate.py
│   │       │   ├── testpacker.py
│   │       │   └── testurlencode.py
│   │       └── urlencode.py
│   ├── pyproject.toml
│   ├── setup-css.py
│   ├── setup-js.py
│   ├── test-perf-cssbeautifier.py
│   └── test-perf-jsbeautifier.py
├── test/
│   ├── data/
│   │   ├── css/
│   │   │   ├── node.mustache
│   │   │   ├── python.mustache
│   │   │   └── tests.js
│   │   ├── html/
│   │   │   ├── node.mustache
│   │   │   └── tests.js
│   │   └── javascript/
│   │       ├── inputlib.js
│   │       ├── node.mustache
│   │       ├── python.mustache
│   │       └── tests.js
│   ├── generate-tests.js
│   └── resources/
│       ├── github-min.js
│       ├── github.css
│       ├── github.html
│       ├── html-with-base64image.html
│       ├── underscore-min.js
│       ├── underscore.js
│       └── unicode-error.js
├── tools/
│   ├── build.sh
│   ├── generate-changelog.sh
│   ├── git-status-clear.sh
│   ├── node
│   ├── npm
│   ├── python
│   ├── python-dev
│   ├── python-dev3
│   ├── python-rel
│   ├── release-all.sh
│   └── template/
│       ├── beautify-css.wrapper.js
│       ├── beautify-html.wrapper.js
│       └── beautify.wrapper.js
├── web/
│   ├── common-function.js
│   ├── common-style.css
│   ├── google-analytics.js
│   └── onload.js
└── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .codeclimate.yml
================================================
engines:
 eslint:
   enabled: true
 pep8:
   enabled: true
ratings:
 paths:
 - "**.js"
 - "**.py"
exclude_paths:
- webpack.config.js
- "**/resources/**"
- js/test/**
- test/data/**
- web/lib/**
- tools/template/*
- "**/generated/*"


================================================
FILE: .gitattributes
================================================
*.java text eol=lf
*.py text eol=lf
*.js text eol=lf
*.json text eol=lf
*.svg text eol=lf
*.css text eol=lf
*.mustache text eol=lf

================================================
FILE: .github/ISSUE_TEMPLATE/beautification-problem.md
================================================
---
name: Beautification problem
about: You tried using the beautifier and the resulting format was not what you expected

---

# Description
<!--
This is the default template for bug reports
NOTE: 
* Do not include screenshots! This library is a text processor, we need text inputs and outputs for debugging and fixing issues. 
* Check the list of open issues before filing a new issue. 
<!--

# Input
The code looked like this before beautification:
```
<INSERT CODE HERE>
```

# Expected Output
The code should have looked like this after beautification:
```
<INSERT CODE HERE>
```

# Actual Output
The  code actually looked like this after beautification:
```
<INSERT CODE HERE>
```

# Steps to Reproduce


## Environment
OS:


## Settings
<!--
Example:
```json
{
    "indent_size": 4,
    "indent_char": " ",
    "indent_level": 0,
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "brace_style": "collapse,preserve-inline",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "space_before_conditional": true,
    "break_chained_methods": false,
    "eval_code": false,
    "unescape_strings": false,
    "wrap_line_length": 0
}
```
-->


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: You want new functionality added to the beautifier

---

# Description
<!--
This is the default template for feature requests. 
NOTE: 
* Do not include screenshots! This library is a text processor, we need text inputs and outputs for debugging and fixing issues. 
* Check the list of open issues before filing a new issue.
-->

# Input
With this new feature, when I give like this input: 
```
<INSERT CODE HERE>
```

# Expected Output
I'd like to see this output:
```
<INSERT CODE HERE>
```

## Environment
OS:


================================================
FILE: .github/ISSUE_TEMPLATE/question-about-usage.md
================================================
---
name: Question about usage
about: You have a question about how to use the beautifier

---

# **DO NOT FILE USAGE QUESTIONS AS ISSUES**
Review the [README.md](https://github.com/beautifier/js-beautify/blob/main/README.md).
If that does not help, join us on gitter: https://gitter.im/beautifier/js-beautify .


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
# Description
- [ ] Source branch in your fork has meaningful name (not `main`)


Fixes Issue: 



# Before Merge Checklist 
These items can be completed after PR is created.

(Check any items that are not applicable (NA) for this PR)

- [ ] JavaScript implementation
- [ ] Python implementation (NA if HTML beautifier)
- [ ] Added Tests to data file(s)
- [ ] Added command-line option(s) (NA if
- [ ] README.md documents new feature/option(s)



================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "npm" # See documentation for possible values
    directory: "/" # Location of package manifests
    rebase-strategy: "disabled"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 15
  - package-ecosystem: "pip" # See documentation for possible values
    directory: "/python" # Location of package manifests
    rebase-strategy: "disabled"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 15
  - package-ecosystem: "github-actions"
    directory: "/"
    rebase-strategy: "disabled"
    schedule:
      # Check for updates to GitHub Actions every week
      interval: "weekly"
    open-pull-requests-limit: 15


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ main, release, staging/* ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ main ]
  schedule:
    - cron: '24 6 * * 1'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        language: [ 'javascript', 'python' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
        # Learn more:
        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

    steps:
    - name: Checkout repository
      uses: actions/checkout@v6

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v4
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@v4

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 https://git.io/JvXDl

    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v4


================================================
FILE: .github/workflows/main.yml
================================================
name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main


jobs:
  build:
    name: Build ${{ matrix.os }} (Node ${{ matrix.node-version }}, Python ${{ matrix.python-version }} )
    runs-on: ${{ matrix.os }}-latest
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu, windows, macos ]
        python-version: ['3.10', 3.11]
        include:
          - python-version: '3.10' 
            node-version: 16
          - python-version: 3.11
            node-version: 18
          - python-version: 3.11
            node-version: 20
    steps:
      - uses: actions/checkout@v6
      - name: Set up Node ${{ matrix.node-version }}
        uses: actions/setup-node@v6
        with:
          node-version: ${{ matrix.node-version }}
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
      - name: Cached node_modules
        uses: actions/cache@v5
        with:
          path: node_modules
          key: ${{ runner.os }}-node-${{ hashFiles('**/package*.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - name: Make all (Windows)
        if: matrix.os == 'windows'
        run: make all
      - name: Make CI (Non-windows)
        if: matrix.os != 'windows'
        run: make ci


================================================
FILE: .github/workflows/milestone-publish.yml
================================================
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Release new version

on:
  milestone:
    types: [closed]


jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - name: Set up Node
        uses: actions/setup-node@v6
        with:
          node-version: 18
          registry-url: https://registry.npmjs.org/
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: 3.11
      - name: Set git user
        run: |
          git config --global user.email "github-action@users.noreply.github.com"
          git config --global user.name "GitHub Action"
      - name: Fetch beautifier/beautifier.io
        env:
          BEAUTIFIER_IO_DEPLOY_KEY: ${{ secrets.BEAUTIFIER_IO_DEPLOY_KEY }}
          JS_BEAUTIFY_DEPLOY_KEY: ${{ secrets.JS_BEAUTIFY_DEPLOY_KEY }}
          SSH_AUTH_SOCK: /tmp/ssh_agent.sock
        run: |
          mkdir -p ~/.ssh
          cat .github/workflows/ssh_config.txt > ~/.ssh/config
          ssh-agent -a $SSH_AUTH_SOCK > /dev/null
          ssh-keyscan github.com >> ~/.ssh/known_hosts
          
          cat > ~/.ssh/deploy_beautifier_io <<< "${BEAUTIFIER_IO_DEPLOY_KEY}"
          cat > ~/.ssh/deploy_js_beautify <<< "${JS_BEAUTIFY_DEPLOY_KEY}"

          chmod 400 ~/.ssh/deploy_beautifier_io
          chmod 400 ~/.ssh/deploy_js_beautify

          ssh-add ~/.ssh/deploy_beautifier_io
          ssh-add ~/.ssh/deploy_js_beautify
                    
          git remote add site git@beautifier-github.com:beautifier/beautifier.io.git
          git remote add trigger git@js-beautify-github.com:beautifier/js-beautify.git
          git fetch --all
      - name: Install python twinE
        run: pip install twine wheel
      - name: Run release script for ${{ github.event.milestone.title }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SSH_AUTH_SOCK: /tmp/ssh_agent.sock
          MILESTONE_VERSION: ${{ github.event.milestone.title }}
          NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
          TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
          TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
        run: |
          ./tools/release-all.sh ${MILESTONE_VERSION}


================================================
FILE: .github/workflows/pr-staging.yml
================================================
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Release PR

on:
  push:
    branches:
      - 'staging/gh-pages'
      - 'staging/main'
      - 'staging/release'


jobs:
  PR-from-staging:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - name: pull-request gh-pages
        if: github.ref == 'refs/heads/staging/gh-pages'
        uses: repo-sync/pull-request@v2
        with:
          pr_title: "Pulling staging/gh-pages into gh-pages"
          source_branch: "staging/gh-pages"
          destination_branch: "gh-pages"
          github_token: ${{ secrets.GITHUB_TOKEN }}
      - name: pull-request main
        if: github.ref == 'refs/heads/staging/main'
        uses: repo-sync/pull-request@v2
        with:
          pr_title: "Pulling staging/main into main"
          source_branch: "staging/main"
          destination_branch: "main"
          github_token: ${{ secrets.GITHUB_TOKEN }}
      - name: pull-request release
        if: github.ref == 'refs/heads/staging/release'
        uses: repo-sync/pull-request@v2
        with:
          pr_title: "Pulling staging/release into release"
          source_branch: "staging/release"
          destination_branch: "release"
          github_token: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/ssh_config.txt
================================================
Host beautifier-github.com
   HostName github.com
   IdentityFile ~/.ssh/deploy_beautifier_io
   IdentitiesOnly yes
   
# Other github account: superman
Host js-beautify-github.com
   HostName github.com
   IdentityFile ~/.ssh/deploy_js_beautify
   IdentitiesOnly yes
   


================================================
FILE: .gitignore
================================================
*.orig
node_modules
gh-pages
gh

*.pyc
python/setup.py
python/*/__pycache__
python/MANIFEST
python/build
python/dist
python/.eggs/
python/jsbeautifier.egg-info
python/cssbeautifier.egg-info
.nvmrc
.nvm/

target
dist/
build/
js/lib/
generated/
.idea/
.vscode/


================================================
FILE: .jshintignore
================================================
dist/**
js/bin/**
js/lib/**
js/test/resources/**
node_modules/**
python/**
target/**
tools/**
test/resources/*
web/lib/**
build/**

web/google-analytics.js

================================================
FILE: .jshintrc
================================================
{
  "bitwise": true,
  "curly": true,
  "eqeqeq": true,
  "noarg": true,
  "nocomma": true,
  "node": true,
  "nonbsp": true,
  "nonew": true,
  "strict": true,
  "unused": true,
  "esversion": 3
}


================================================
FILE: .npmignore
================================================
# ANY FUTURE CHANGES TO THIS FILE NEED TO BE MANUALLY TESTED LOCALLY
# USE npm pack AND VERIFY THAT PACKAGE CONTENTS ARE STILL VALID
# Ignore all files
*

# Add exceptions
!js/
!js/**/*
!CONTRIBUTING.MD
# README, LICENSE, CHANGELOG and package.json are always added



================================================
FILE: .pylintrc
================================================
max-line-length=88

================================================
FILE: CHANGELOG.md
================================================
# Changelog

## v1.15.4
* Downgrade nopt to v7.x to maintain Node.js v14 compatibility ([#2358](https://github.com/beautifier/js-beautify/issues/2358))

## v1.15.3
* fix node 18 support by downgrading glob to v10 ([#2350](https://github.com/beautifier/js-beautify/pull/2350))

## v1.15.2
* Patch SNYK-JS-CROSSSPAWN-8303230 issue brought it through old glob package ([#2328](https://github.com/beautifier/js-beautify/issues/2328))
* release wheels on pypi ([#2313](https://github.com/beautifier/js-beautify/issues/2313))
* ModuleNotFoundError: No module named 'setuptools.command.test' as of latest setuptools package release ([#2301](https://github.com/beautifier/js-beautify/issues/2301))
* [Python]Compatible with setuptools>=72 ([#2300](https://github.com/beautifier/js-beautify/issues/2300))

## v1.15.1
* Turn new angular templating off by default in html ([#2247](https://github.com/beautifier/js-beautify/pull/2247))
* Perf regression in latest release (1.15.0) ([#2246](https://github.com/beautifier/js-beautify/issues/2246))

## v1.15.0
* Fixed #2219 - formatting of new Angular control flow syntax ([#2221](https://github.com/beautifier/js-beautify/pull/2221))

## v1.14.11
* Editor not working https://beautifier.io/ ([#2201](https://github.com/beautifier/js-beautify/issues/2201))
* Set nodejs minimum to v14 ([#2169](https://github.com/beautifier/js-beautify/pull/2169))
* Invalid prettification of object with unicode escape character as object key ([#2159](https://github.com/beautifier/js-beautify/issues/2159))
* invalid json being generated with wrap\_line\_length ([#1932](https://github.com/beautifier/js-beautify/issues/1932))

## v1.14.9
* Bump semver and editorconfig ([#2161](https://github.com/beautifier/js-beautify/pull/2161))
* Update editorconfig package ([#2160](https://github.com/beautifier/js-beautify/issues/2160))
* Allow to configure the "custom elements as inline elements" behavior ([#2113](https://github.com/beautifier/js-beautify/issues/2113))

## v1.14.8
* Require nodejs v12 or greater ([#2151](https://github.com/beautifier/js-beautify/pull/2151))
* CSS insideNonNestedAtRule generic variable  ([#2147](https://github.com/beautifier/js-beautify/pull/2147))
* Update dependencies ([#2145](https://github.com/beautifier/js-beautify/pull/2145))
* Fix CI build ([#2144](https://github.com/beautifier/js-beautify/pull/2144))
* Fixed #2133 Theme Toggle on without\_codemirror Mode ([#2138](https://github.com/beautifier/js-beautify/pull/2138))
* use correct variable name ([#2135](https://github.com/beautifier/js-beautify/pull/2135))
* docs: Fix a few typos ([#2127](https://github.com/beautifier/js-beautify/pull/2127))
* Add support for new record types (cont.) ([#2118](https://github.com/beautifier/js-beautify/pull/2118))
* fix - semicolon followed by block statement doesnt have new line ([#2117](https://github.com/beautifier/js-beautify/pull/2117))
* Fix formatting related to the <menu> element ([#2114](https://github.com/beautifier/js-beautify/pull/2114))
* issue prettifying (function(){code();{code}})() ([#1852](https://github.com/beautifier/js-beautify/issues/1852))

## v1.14.7
* Doc: Updates web browser implementation examples ([#2107](https://github.com/beautifier/js-beautify/pull/2107))
* HTML formatter breaks layout by introducing newlines ([#1989](https://github.com/beautifier/js-beautify/issues/1989))

## v1.14.6
* Globs no longer work on Windows in 1.14.5 ([#2093](https://github.com/beautifier/js-beautify/issues/2093))

## v1.14.5
* Dependency updates and UI tweaks ([#2088](https://github.com/beautifier/js-beautify/pull/2088))
* Bump terser from 5.12.1 to 5.14.2 ([#2084](https://github.com/beautifier/js-beautify/pull/2084))
* new layout breaks everything on long lines ([#2071](https://github.com/beautifier/js-beautify/issues/2071))
* Dark mode ([#2057](https://github.com/beautifier/js-beautify/issues/2057))

## v1.14.4
* Extra space before `!important` added ([#2056](https://github.com/beautifier/js-beautify/issues/2056))
* css format removes space after quoted value  ([#2051](https://github.com/beautifier/js-beautify/issues/2051))
* Add grid-template-areas to NON\_SEMICOLON\_NEWLINE\_PROPERTY list ([#2035](https://github.com/beautifier/js-beautify/pull/2035))
* CSS formatter removes useful space ([#2024](https://github.com/beautifier/js-beautify/issues/2024))
* CHANGELOG.md file was wiped out in v1.14.2 ([#2022](https://github.com/beautifier/js-beautify/issues/2022))
* Fails to recognize Handlebars block with whitespace control, e.g. {{~#if true ~}} ([#1988](https://github.com/beautifier/js-beautify/issues/1988))
* Support new sass `@use` syntax ([#1976](https://github.com/beautifier/js-beautify/issues/1976))
* Do not remove whitespace after number ([#1950](https://github.com/beautifier/js-beautify/issues/1950))
* html formatter doesn't support handlebars partial blocks (`#>`) ([#1869](https://github.com/beautifier/js-beautify/issues/1869))
* in keyword in class method causes indentation problem ([#1846](https://github.com/beautifier/js-beautify/issues/1846))
* space\_after\_named\_function not working inside an ES6 class ([#1622](https://github.com/beautifier/js-beautify/issues/1622))
* Restyle website ([#1444](https://github.com/beautifier/js-beautify/issues/1444))
* improper line concatenation between 'return' and a prefix expression ([#1095](https://github.com/beautifier/js-beautify/issues/1095))

## v1.14.3
* [LESS] Fixing issues with spacing when an object literal lives inside a mixin ([#2017](https://github.com/beautifier/js-beautify/pull/2017))
* Overindentation when using "class" as a key in an object ([#1838](https://github.com/beautifier/js-beautify/issues/1838))
* CSS Grid template formatting is broken when adding track size after line names ([#1817](https://github.com/beautifier/js-beautify/issues/1817))
* SCSS module system @use problem ([#1798](https://github.com/beautifier/js-beautify/issues/1798))
* JS "space\_in\_empty\_paren" failing for class methods ([#1151](https://github.com/beautifier/js-beautify/issues/1151))
* LESS mixins gets formatted strangely ([#722](https://github.com/beautifier/js-beautify/issues/722))

## v1.14.2
* Why put npm in dependencies? ([#2005](https://github.com/beautifier/js-beautify/issues/2005))
* [Bug] Logical assignments in JS are incorrectly beautified  ([#1991](https://github.com/beautifier/js-beautify/issues/1991))

## v1.14.1
* feature request: cmd+enter hotkey for mac users ([#1985](https://github.com/beautifier/js-beautify/issues/1985))
* Wrong indentation when the last line in a case is a right brace ([#1683](https://github.com/beautifier/js-beautify/issues/1683))

## v1.14.0
* import.meta appears on newline ([#1978](https://github.com/beautifier/js-beautify/issues/1978))
* Added buttons to website ([#1930](https://github.com/beautifier/js-beautify/pull/1930))
* Logical assignment operators; Fix parsing of optional chaining ([#1888](https://github.com/beautifier/js-beautify/issues/1888))
* Numbers should be allowed to contain underscores ([#1836](https://github.com/beautifier/js-beautify/issues/1836))
* Use native mkdirSync instead of 'mkdirp' package ([#1833](https://github.com/beautifier/js-beautify/pull/1833))
*  selector\_separator\_newline adds erroneous newline on @extend SCSS statements ([#1799](https://github.com/beautifier/js-beautify/issues/1799))

## v1.13.13
* IE11 compatibility failure v>1.13.5 ([#1918](https://github.com/beautifier/js-beautify/issues/1918))

## v1.13.11
* Support short PHP tags ([#1840](https://github.com/beautifier/js-beautify/issues/1840))

## v1.13.6
* Fix space-before-conditional: false to work on switch-case statement ([#1881](https://github.com/beautifier/js-beautify/pull/1881))
* Optional chaining obj?.[expr] ([#1801](https://github.com/beautifier/js-beautify/issues/1801))

## v1.13.5

## v1.13.1
* Option 'max\_preserve\_newlines' not working on beautify\_css.js CSS Beautifier ([#1863](https://github.com/beautifier/js-beautify/issues/1863))
* React Fragment Short Syntax <></> issue ([#1854](https://github.com/beautifier/js-beautify/issues/1854))
* add  viewport meta tag to index.html ([#1843](https://github.com/beautifier/js-beautify/pull/1843))
* Add basic smarty templating support ([#1820](https://github.com/beautifier/js-beautify/issues/1820))
* Tagged Template literals ([#1244](https://github.com/beautifier/js-beautify/issues/1244))

## v1.13.0
* (internal) Refactor python cssbeautifier to reuse jsbeautifier CLI methods ([#1832](https://github.com/beautifier/js-beautify/pull/1832))
* (internal) Switch from node-static to serve ([#1831](https://github.com/beautifier/js-beautify/pull/1831))
* Fixed pip install cssbeautifier ([#1830](https://github.com/beautifier/js-beautify/pull/1830))

## v1.12.0
* Python jsbeautifier fails for special chars ([#1809](https://github.com/beautifier/js-beautify/issues/1809))
* pip install cssbeautifier fails ([#1808](https://github.com/beautifier/js-beautify/issues/1808))
* Add expand brace-style option to css beautifier ([#1796](https://github.com/beautifier/js-beautify/pull/1796))
* Support nullish-coalescing ([#1794](https://github.com/beautifier/js-beautify/issues/1794))
* Upgrade ga.js to analytics.js ([#1777](https://github.com/beautifier/js-beautify/issues/1777))
* Newline rule not working with css-like files ([#1776](https://github.com/beautifier/js-beautify/issues/1776))
* no new line after self closing tag ([#1718](https://github.com/beautifier/js-beautify/issues/1718))
* HTML format, no break after <label>? ([#1365](https://github.com/beautifier/js-beautify/issues/1365))
* Does this extension still supports applying Allman style to CSS? ([#1353](https://github.com/beautifier/js-beautify/issues/1353))
* Add brace\_style option for CSS ([#1259](https://github.com/beautifier/js-beautify/issues/1259))

## v1.11.0
* Please bump mkdirp to fix mkdirp@0.5.1 vulnerability ([#1768](https://github.com/beautifier/js-beautify/issues/1768))
* Incorrect indentation of Handlebars inline partials ([#1756](https://github.com/beautifier/js-beautify/issues/1756))
* Support optional-chaining ([#1727](https://github.com/beautifier/js-beautify/issues/1727))
* Please support es module ([#1706](https://github.com/beautifier/js-beautify/issues/1706))
* Support new js proposals: optional-chaining & pipeline-operator ([#1530](https://github.com/beautifier/js-beautify/issues/1530))
* Optional <p> closing not implemented ([#1503](https://github.com/beautifier/js-beautify/issues/1503))

## v1.10.3
* Unquoted href causes wrong indentation ([#1736](https://github.com/beautifier/js-beautify/issues/1736))
* Broken private fields in classes (JS) ([#1734](https://github.com/beautifier/js-beautify/issues/1734))
* Fix for python 2.7 and cli parameters ([#1712](https://github.com/beautifier/js-beautify/pull/1712))
* Search (ctrl+f) works only in view field in CodeMirror ([#1696](https://github.com/beautifier/js-beautify/issues/1696))

## v1.10.2
* Please update CodeMirror Addon ([#1695](https://github.com/beautifier/js-beautify/issues/1695))
* Nested braces indentation ([#223](https://github.com/beautifier/js-beautify/issues/223))

## v1.10.1
* javascript fails to format when <?php > is first text inside <script> tag ([#1687](https://github.com/beautifier/js-beautify/issues/1687))
* 414 Request-URI Too Large ([#1640](https://github.com/beautifier/js-beautify/issues/1640))

## v1.10.0
* beautifying scss selector with colon in it adds space ([#1667](https://github.com/beautifier/js-beautify/issues/1667))
* Javascript multiline comments duplicates ([#1663](https://github.com/beautifier/js-beautify/issues/1663))
* Tokenizer crashes if the input terminates with a dot character. ([#1658](https://github.com/beautifier/js-beautify/issues/1658))
* stop reformatting valid css \\! into invalid \\ ! ([#1656](https://github.com/beautifier/js-beautify/pull/1656))
* wrong indent for unclosed <? - need to support disabling templating ([#1647](https://github.com/beautifier/js-beautify/issues/1647))
* Beautify inserts space before exclamation mark in comment <!-- in css <style> ([#1641](https://github.com/beautifier/js-beautify/issues/1641))
* 'less' mixins parameter formatting problem ([#1582](https://github.com/beautifier/js-beautify/issues/1582))
* Change css tests to use 4 space indenting instead of tabs ([#1527](https://github.com/beautifier/js-beautify/issues/1527))
* Braces after case get pushed onto new line ([#1357](https://github.com/beautifier/js-beautify/issues/1357))
* Extra space in pseudo-elements and pseudo-classes selectors ([#1233](https://github.com/beautifier/js-beautify/issues/1233))
* LESS formatting - mixins with multiple variables ([#1018](https://github.com/beautifier/js-beautify/issues/1018))
* Bug in less format ([#842](https://github.com/beautifier/js-beautify/issues/842))

## v1.9.1
* nested table not beautified correctly ([#1649](https://github.com/beautifier/js-beautify/issues/1649))
* Add an option to preserve indentation on empty lines ([#1322](https://github.com/beautifier/js-beautify/issues/1322))

## v1.9.0
* Incorrect indentation of `^` inverted section tags in Handlebars/Mustache code ([#1623](https://github.com/beautifier/js-beautify/issues/1623))
* PHP In HTML Attributes ([#1620](https://github.com/beautifier/js-beautify/issues/1620))
* DeanEdward python unpacker offset problem ([#1616](https://github.com/beautifier/js-beautify/issues/1616))
* CLI on Windows doesn't accept -f - for stdin? ([#1609](https://github.com/beautifier/js-beautify/issues/1609))
* HTML type attribute breaks JavaScript beautification? ([#1606](https://github.com/beautifier/js-beautify/issues/1606))
* Use of global MODE before declaration caused uglify problem ([#1604](https://github.com/beautifier/js-beautify/issues/1604))
* When building html tags using Mustache variables, extra whitespace is added after opening arrow ([#1602](https://github.com/beautifier/js-beautify/issues/1602))
* <script type="text/html">isnot abled to be beautified ([#1591](https://github.com/beautifier/js-beautify/issues/1591))
* \_get\_full\_indent undefined ([#1590](https://github.com/beautifier/js-beautify/issues/1590))
* Website "autodetect" setting doesn't distinguish css vs javascript ([#1565](https://github.com/beautifier/js-beautify/issues/1565))
* Add setting to keep HTML tag text content unformatted or ignore custom delimiters ([#1560](https://github.com/beautifier/js-beautify/issues/1560))
* HTML auto formatting using spaces instead of tabs ([#1551](https://github.com/beautifier/js-beautify/issues/1551))
* Unclosed single quote in php tag causes formatting changes which break php code ([#1377](https://github.com/beautifier/js-beautify/issues/1377))
* Using tabs when wrapping attributes and wrapping if needed ([#1294](https://github.com/beautifier/js-beautify/issues/1294))
* HTML --wrap-attributes doesn't respect --wrap-line-length ([#1238](https://github.com/beautifier/js-beautify/issues/1238))
* Bad indent level(HTML) ([#1213](https://github.com/beautifier/js-beautify/issues/1213))
* js-beautify produces invalid code for variables with Unicode escape sequences ([#1211](https://github.com/beautifier/js-beautify/issues/1211))
* support vuejs ([#1154](https://github.com/beautifier/js-beautify/issues/1154))
* Go templates in HTML ([#881](https://github.com/beautifier/js-beautify/issues/881))
* Better behavior for javascript --wrap-line-length ([#284](https://github.com/beautifier/js-beautify/issues/284))

## v1.8.9
* Won't run from CLI - bad option name `files` ([#1583](https://github.com/beautifier/js-beautify/issues/1583))
* in the .vue file `space\_after\_anon\_function` is invalid ([#1425](https://github.com/beautifier/js-beautify/issues/1425))
* Add function default\_options() to beautifier.js ([#1364](https://github.com/beautifier/js-beautify/issues/1364))
* fix: Missing space before function parentheses ? ([#1077](https://github.com/beautifier/js-beautify/issues/1077))
* Support globs in CLI ([#787](https://github.com/beautifier/js-beautify/issues/787))

## v1.8.8
*  async function in object wrong indentation ([#1573](https://github.com/beautifier/js-beautify/issues/1573))

## v1.8.7
* Add tests for html  `indent\_scripts` option ([#1518](https://github.com/beautifier/js-beautify/issues/1518))
* Support dynamic import ([#1197](https://github.com/beautifier/js-beautify/issues/1197))
* HTML: add an option to preserve manual wrapping of attributes ([#1125](https://github.com/beautifier/js-beautify/issues/1125))
* js-beautify adds a space between # and include ([#1114](https://github.com/beautifier/js-beautify/issues/1114))
* space\_after\_anon\_function doesn't work with anon async functions ([#1034](https://github.com/beautifier/js-beautify/issues/1034))
* Space before function arguments (space-after-function) (space-after-named-function) ([#608](https://github.com/beautifier/js-beautify/issues/608))

## v1.8.6
* JS beautify break the angular compile ([#1544](https://github.com/beautifier/js-beautify/issues/1544))
* base64 string is broken with v1.8.4 ([#1535](https://github.com/beautifier/js-beautify/issues/1535))
* Bookmarklet becomes totally useless ([#1408](https://github.com/beautifier/js-beautify/issues/1408))
* HTTPS ([#1399](https://github.com/beautifier/js-beautify/issues/1399))
* Beautify breaks when js starts with space followed by multi-line comment ([#789](https://github.com/beautifier/js-beautify/issues/789))

## v1.8.4
* Multiple newlines added between empty textarea and "unformatted" inline elements  ([#1534](https://github.com/beautifier/js-beautify/issues/1534))
* unindent\_chained\_methods broken ([#1533](https://github.com/beautifier/js-beautify/issues/1533))

## v1.8.3
* Missing Bower Assets ([#1521](https://github.com/beautifier/js-beautify/issues/1521))
* Javascript ternary breaked with `await` ([#1519](https://github.com/beautifier/js-beautify/issues/1519))
* Object property indented after `await` ([#1517](https://github.com/beautifier/js-beautify/issues/1517))
* Handlebars formatting problems ([#870](https://github.com/beautifier/js-beautify/issues/870))
* beautify.js doesn't have indent\_level option ([#724](https://github.com/beautifier/js-beautify/issues/724))

## v1.8.1
* Why npm is a dependency? ([#1516](https://github.com/beautifier/js-beautify/issues/1516))
* indent\_inner\_html not working in v1.8.0 ([#1514](https://github.com/beautifier/js-beautify/issues/1514))

## v1.8.0
* list items of nested lists get indented backwards ([#1501](https://github.com/beautifier/js-beautify/issues/1501))
* Make beautifier auto-convert options with dashes into underscores ([#1497](https://github.com/beautifier/js-beautify/issues/1497))
* ReferenceError: token is not defined ([#1496](https://github.com/beautifier/js-beautify/issues/1496))
* Publish v1.8.0 ([#1495](https://github.com/beautifier/js-beautify/issues/1495))
* still probem #1439 / #1337 ([#1491](https://github.com/beautifier/js-beautify/issues/1491))
* Duplicating HTML Code Nested In PHP ([#1483](https://github.com/beautifier/js-beautify/issues/1483))
* Handlebars - `if` tags are broken when using helper with `textarea` ([#1482](https://github.com/beautifier/js-beautify/issues/1482))
* TypeError: Cannot read property '1' of null ([#1481](https://github.com/beautifier/js-beautify/issues/1481))
* Space in Self Closing Tag Issue ([#1478](https://github.com/beautifier/js-beautify/issues/1478))
* Weird Formatting in VSCode ([#1475](https://github.com/beautifier/js-beautify/issues/1475))
* Indent with tab issue on website ([#1470](https://github.com/beautifier/js-beautify/issues/1470))
* Contents of hbs tags are converted to lowercase ([#1464](https://github.com/beautifier/js-beautify/issues/1464))
* HTML tags are indented wrongly when attributes are present ([#1462](https://github.com/beautifier/js-beautify/issues/1462))
* hbs tags are stripped when there is a comment below or inline ([#1461](https://github.com/beautifier/js-beautify/issues/1461))
* Spaces added to handlebars with '=' ([#1460](https://github.com/beautifier/js-beautify/issues/1460))
* jsbeautifier.org don't works ([#1445](https://github.com/beautifier/js-beautify/issues/1445))
* Commenting code and then beautifying removes line breaks ([#1440](https://github.com/beautifier/js-beautify/issues/1440))
* Less: Where is my space? ([#1411](https://github.com/beautifier/js-beautify/issues/1411))
* No newline after @import ([#1406](https://github.com/beautifier/js-beautify/issues/1406))
* "html.format.wrapAttributes": "force-aligned" adds empty line on long attributes ([#1403](https://github.com/beautifier/js-beautify/issues/1403))
* HTML: wrap\_line\_length is handled incorrectly ([#1401](https://github.com/beautifier/js-beautify/issues/1401))
* js-beautify is breaking code by adding space after import ([#1393](https://github.com/beautifier/js-beautify/issues/1393))
* JS-Beautify should format XML tags inside HTML files ([#1383](https://github.com/beautifier/js-beautify/issues/1383))
* python unpacker can not handle if radix given as [] and not as a number ([#1381](https://github.com/beautifier/js-beautify/issues/1381))
* unindent\_chained\_methods breaks indentation for if statements without brackets  ([#1378](https://github.com/beautifier/js-beautify/issues/1378))
* function parameters merged into single line when starting with ! or [ ([#1374](https://github.com/beautifier/js-beautify/issues/1374))
* CSS selector issue (header > div[class~="div-all"]) in SCSS file ([#1373](https://github.com/beautifier/js-beautify/issues/1373))
* Add "Create Issue for Unexpected Output" button to website ([#1371](https://github.com/beautifier/js-beautify/issues/1371))
* Add combobox to control type of beautification ([#1370](https://github.com/beautifier/js-beautify/issues/1370))
* Add Options textbox to website for debugging ([#1369](https://github.com/beautifier/js-beautify/issues/1369))

## v1.7.5
* Strict mode: js\_source\_text is not defined [CSS] ([#1286](https://github.com/beautifier/js-beautify/issues/1286))
* Made brace\_style option more inclusive ([#1277](https://github.com/beautifier/js-beautify/pull/1277))
* White space before"!important" tag missing in CSS beautify ([#1273](https://github.com/beautifier/js-beautify/issues/1273))

## v1.7.4
* Whitespace after ES7 `async` keyword for arrow functions ([#896](https://github.com/beautifier/js-beautify/issues/896))

## v1.7.3
* Version 1.7.0 fail to install through pip ([#1250](https://github.com/beautifier/js-beautify/issues/1250))
* Installing js-beautify fails ([#1247](https://github.com/beautifier/js-beautify/issues/1247))

## v1.7.0
* undindent-chained-methods option. Resolves #482 ([#1240](https://github.com/beautifier/js-beautify/pull/1240))
* Add test and tools folder to npmignore ([#1239](https://github.com/beautifier/js-beautify/issues/1239))
* incorrect new-line insertion after "yield" ([#1206](https://github.com/beautifier/js-beautify/issues/1206))
* Do not modify built-in objects ([#1205](https://github.com/beautifier/js-beautify/issues/1205))
* Fix label checking incorrect box when clicked ([#1169](https://github.com/beautifier/js-beautify/pull/1169))
* Webpack ([#1149](https://github.com/beautifier/js-beautify/pull/1149))
* daisy-chain indentation leads to over-indentation ([#482](https://github.com/beautifier/js-beautify/issues/482))

## v1.6.12
* CSS: Preserve Newlines ([#537](https://github.com/beautifier/js-beautify/issues/537))

## v1.6.11
* On beautify, new line before next CSS selector ([#1142](https://github.com/beautifier/js-beautify/issues/1142))

## v1.6.10

## v1.6.9
* Wrong HTML beautification starting with v1.6.5 ([#1115](https://github.com/beautifier/js-beautify/issues/1115))
* Ignore linebreak when meet handlebar ([#1104](https://github.com/beautifier/js-beautify/pull/1104))
* Lines are not un-indented correctly when attributes are wrapped ([#1103](https://github.com/beautifier/js-beautify/issues/1103))
* force-aligned is not aligned when indenting with tabs ([#1102](https://github.com/beautifier/js-beautify/issues/1102))
* Python package fails to publish  ([#1101](https://github.com/beautifier/js-beautify/issues/1101))
* Explaination of 'operator\_position' is absent from README.md ([#1047](https://github.com/beautifier/js-beautify/issues/1047))

## v1.6.8
* Incorrect indentation after loop with comment ([#1090](https://github.com/beautifier/js-beautify/issues/1090))
* Extra newline is inserted after beautifying code with anonymous function ([#1085](https://github.com/beautifier/js-beautify/issues/1085))
* end brace with next comment line make bad indent ([#1043](https://github.com/beautifier/js-beautify/issues/1043))
* Javascript comment in last line doesn't beautify well ([#964](https://github.com/beautifier/js-beautify/issues/964))
* indent doesn't work with comment (jsdoc) ([#913](https://github.com/beautifier/js-beautify/issues/913))
* Wrong indentation, when new line between chained methods ([#892](https://github.com/beautifier/js-beautify/issues/892))
* Comments in a non-semicolon style have extra indent ([#815](https://github.com/beautifier/js-beautify/issues/815))
* [bug] Incorrect indentation due to commented line(s) following a function call with a function argument. ([#713](https://github.com/beautifier/js-beautify/issues/713))
* Wrong indent formatting ([#569](https://github.com/beautifier/js-beautify/issues/569))

## v1.6.7
* HTML pre code indentation ([#928](https://github.com/beautifier/js-beautify/issues/928))
* Beautify script/style tags but ignore their inner JS/CSS content ([#906](https://github.com/beautifier/js-beautify/issues/906))

## v1.6.6
* Wrong indentation for comment after nested unbraced control constructs ([#1079](https://github.com/beautifier/js-beautify/issues/1079))
* Should prefer breaking the line after operator ? instead of before operator < ([#1073](https://github.com/beautifier/js-beautify/issues/1073))
* New option "force-expand-multiline" for "wrap\_attributes" ([#1070](https://github.com/beautifier/js-beautify/pull/1070))
* Breaks if html file starts with comment ([#1068](https://github.com/beautifier/js-beautify/issues/1068))
* collapse-preserve-inline restricts users to collapse brace\_style ([#1057](https://github.com/beautifier/js-beautify/issues/1057))
* Parsing failure on numbers with "e" ([#1054](https://github.com/beautifier/js-beautify/issues/1054))
* Issue with Browser Instructions ([#1053](https://github.com/beautifier/js-beautify/issues/1053))
* Add preserve inline function for expand style braces ([#1052](https://github.com/beautifier/js-beautify/issues/1052))
* Update years in LICENSE ([#1038](https://github.com/beautifier/js-beautify/issues/1038))
* JS. Switch with template literals. Unexpected indentation. ([#1030](https://github.com/beautifier/js-beautify/issues/1030))
* The object with spread object formatted not correctly ([#1023](https://github.com/beautifier/js-beautify/issues/1023))
* Bad output generator function in class ([#1013](https://github.com/beautifier/js-beautify/issues/1013))
* Support editorconfig for stdin ([#1012](https://github.com/beautifier/js-beautify/issues/1012))
* Publish to cdnjs ([#992](https://github.com/beautifier/js-beautify/issues/992))
* breaks if handlebars comments contain handlebars tags ([#930](https://github.com/beautifier/js-beautify/issues/930))
* Using jsbeautifyrc is broken ([#929](https://github.com/beautifier/js-beautify/issues/929))
* Option to put HTML attributes on their own lines, aligned ([#916](https://github.com/beautifier/js-beautify/issues/916))
* Erroneously changes CRLF to LF on Windows in HTML and CSS ([#899](https://github.com/beautifier/js-beautify/issues/899))
* Weird space in {get } vs { normal } ([#888](https://github.com/beautifier/js-beautify/issues/888))
* Bad for-of formatting with constant Array ([#875](https://github.com/beautifier/js-beautify/issues/875))
* Problems with filter property in css and scss ([#755](https://github.com/beautifier/js-beautify/issues/755))
* Add "collapse-one-line" option for non-collapse brace styles  ([#487](https://github.com/beautifier/js-beautify/issues/487))

## v1.6.4
* css-beautify sibling combinator space issue ([#1001](https://github.com/beautifier/js-beautify/issues/1001))
* Bug: Breaks when the source code it found an unclosed multiline comment. ([#996](https://github.com/beautifier/js-beautify/issues/996))
* CSS: Preserve white space before pseudo-class and pseudo-element selectors ([#985](https://github.com/beautifier/js-beautify/pull/985))
* Spelling error in token definition ([#984](https://github.com/beautifier/js-beautify/issues/984))
* collapse-preserve-inline does not preserve simple, single line ("return") statements ([#982](https://github.com/beautifier/js-beautify/issues/982))
* Publish the library via cdn ([#971](https://github.com/beautifier/js-beautify/issues/971))
* Bug with css calc() function ([#957](https://github.com/beautifier/js-beautify/issues/957))
* &:first-of-type:not(:last-child) when prettified insert erroneous white character ([#952](https://github.com/beautifier/js-beautify/issues/952))
* Shorthand generator functions are formatting strangely ([#941](https://github.com/beautifier/js-beautify/issues/941))
* Add handlebars support on cli for html ([#935](https://github.com/beautifier/js-beautify/pull/935))
* Do not put a space within `yield*` generator functions. ([#920](https://github.com/beautifier/js-beautify/issues/920))
* Possible to add an indent\_inner\_inner\_html option? (Prevent indenting second-level tags) ([#917](https://github.com/beautifier/js-beautify/issues/917))
* Messing up jsx formatting multi-line attribute ([#914](https://github.com/beautifier/js-beautify/issues/914))
* Bug report: Closing 'body' tag isn't formatted correctly ([#900](https://github.com/beautifier/js-beautify/issues/900))
* { throw … } not working with collapse-preserve-inline ([#898](https://github.com/beautifier/js-beautify/issues/898))
* ES6 concise method not propely indented ([#889](https://github.com/beautifier/js-beautify/issues/889))
* CSS beautify changing symantics ([#883](https://github.com/beautifier/js-beautify/issues/883))
* Dojo unsupported script types. ([#874](https://github.com/beautifier/js-beautify/issues/874))
* Readme version comment  ([#868](https://github.com/beautifier/js-beautify/issues/868))
* Extra space after pseudo-elements within :not() ([#618](https://github.com/beautifier/js-beautify/issues/618))
* space in media queries after colon &: selectors ([#565](https://github.com/beautifier/js-beautify/issues/565))
* Integrating editor config ([#551](https://github.com/beautifier/js-beautify/issues/551))
* Preserve short expressions/statements on single line ([#338](https://github.com/beautifier/js-beautify/issues/338))

## v1.6.3
* CLI broken when output path is not set ([#933](https://github.com/beautifier/js-beautify/issues/933))
* huge memory leak ([#909](https://github.com/beautifier/js-beautify/issues/909))
* don't print unpacking errors on stdout (python) ([#884](https://github.com/beautifier/js-beautify/pull/884))
* Fix incomplete list of non-positionable operators (python lib) ([#878](https://github.com/beautifier/js-beautify/pull/878))
* Fix Issue #844 ([#873](https://github.com/beautifier/js-beautify/pull/873))
* assignment exponentiation operator ([#864](https://github.com/beautifier/js-beautify/issues/864))
* Bug in Less mixins ([#844](https://github.com/beautifier/js-beautify/issues/844))
* Can't Nest Conditionals ([#680](https://github.com/beautifier/js-beautify/issues/680))
* ternary operations ([#670](https://github.com/beautifier/js-beautify/issues/670))
* Support newline before logical or ternary operator ([#605](https://github.com/beautifier/js-beautify/issues/605))
* Provide config files for format and linting ([#336](https://github.com/beautifier/js-beautify/issues/336))

## v1.6.2
* Add missing 'collapse-preserve-inline' option to js module ([#861](https://github.com/beautifier/js-beautify/pull/861))

## v1.6.1
* Inconsistent formatting for arrays of objects ([#860](https://github.com/beautifier/js-beautify/issues/860))
* Publish v1.6.1 ([#859](https://github.com/beautifier/js-beautify/issues/859))
* Space added to "from++" due to ES6 keyword  ([#858](https://github.com/beautifier/js-beautify/issues/858))
* Changelog generator doesn't sort versions above 9 right ([#778](https://github.com/beautifier/js-beautify/issues/778))
* space-after-anon-function not applied to object properties ([#761](https://github.com/beautifier/js-beautify/issues/761))
* Separating 'input' elements adds whitespace ([#580](https://github.com/beautifier/js-beautify/issues/580))
* Inline Format ([#572](https://github.com/beautifier/js-beautify/issues/572))
* Preserve attributes line break in HTML ([#455](https://github.com/beautifier/js-beautify/issues/455))
* Multiline Array ([#406](https://github.com/beautifier/js-beautify/issues/406))

## v1.6.0
* Individual tests pollute options object ([#855](https://github.com/beautifier/js-beautify/issues/855))
* Object attribute assigned fat arrow function with implicit return of a ternary causes next line to indent ([#854](https://github.com/beautifier/js-beautify/issues/854))
* Treat php tags as single in html ([#850](https://github.com/beautifier/js-beautify/pull/850))
* Read piped input by default ([#849](https://github.com/beautifier/js-beautify/pull/849))
* Replace makefile dependency with bash script ([#848](https://github.com/beautifier/js-beautify/pull/848))
* list of HTML inline elements incomplete; wraps inappropriately ([#840](https://github.com/beautifier/js-beautify/issues/840))
* Beautifying bracket-less if/elses ([#838](https://github.com/beautifier/js-beautify/issues/838))
* <col> elements within a <colgroup> are getting indented incorrectly ([#836](https://github.com/beautifier/js-beautify/issues/836))
* single attribute breaks jsx beautification ([#834](https://github.com/beautifier/js-beautify/issues/834))
* Improve Python packaging ([#831](https://github.com/beautifier/js-beautify/pull/831))
* Erroneously changes CRLF to LF on Windows. ([#829](https://github.com/beautifier/js-beautify/issues/829))
* Can't deal with XHTML5 ([#828](https://github.com/beautifier/js-beautify/issues/828))
* HTML after PHP is indented ([#826](https://github.com/beautifier/js-beautify/issues/826))
* exponentiation operator ([#825](https://github.com/beautifier/js-beautify/issues/825))
* Add support for script type "application/ld+json" ([#821](https://github.com/beautifier/js-beautify/issues/821))
* package.json: Remove "preferGlobal" option ([#820](https://github.com/beautifier/js-beautify/pull/820))
* Don't use array.indexOf() to support legacy browsers ([#816](https://github.com/beautifier/js-beautify/pull/816))
* ES6 Object Shortand Indenting Weirdly Sometimes ([#810](https://github.com/beautifier/js-beautify/issues/810))
* Implicit Return Function on New Line not Preserved ([#806](https://github.com/beautifier/js-beautify/issues/806))
* Misformating "0b" Binary Strings ([#803](https://github.com/beautifier/js-beautify/issues/803))
* Beautifier breaks ES6 nested template strings ([#797](https://github.com/beautifier/js-beautify/issues/797))
* Misformating "0o" Octal Strings ([#792](https://github.com/beautifier/js-beautify/issues/792))
* Do not use hardcoded directory for tests ([#788](https://github.com/beautifier/js-beautify/pull/788))
* Handlebars {{else}} tag not given a newline ([#784](https://github.com/beautifier/js-beautify/issues/784))
* Wrong indentation for XML header (<?xml version="1.0"?>) ([#783](https://github.com/beautifier/js-beautify/issues/783))
* is\_whitespace for loop incrementing wrong variable ([#777](https://github.com/beautifier/js-beautify/pull/777))
* Newline is inserted after comment with comma\_first ([#775](https://github.com/beautifier/js-beautify/issues/775))
* Cannot copy more than 1000 characters out of CodeMirror buffer ([#768](https://github.com/beautifier/js-beautify/issues/768))
* Missing 'var' in beautify-html.js; breaks strict mode ([#763](https://github.com/beautifier/js-beautify/issues/763))
* Fix typo in the example javascript code of index.html ([#753](https://github.com/beautifier/js-beautify/pull/753))

## v1.5.10
* Preserve directive doesn't work as intended ([#723](https://github.com/beautifier/js-beautify/issues/723))

## v1.5.7
* Support for legacy JavaScript versions (e.g. WSH+JScript & Co) ([#720](https://github.com/beautifier/js-beautify/pull/720))
* Is \\n hard coded into CSS Beautifier logic? ([#715](https://github.com/beautifier/js-beautify/issues/715))
* Spaces and linebreaks after # and around { } messing up interpolation/mixins (SASS/SCSS) ([#689](https://github.com/beautifier/js-beautify/issues/689))
* Calls to functions get completely messed up in Sass (*.scss) ([#675](https://github.com/beautifier/js-beautify/issues/675))
* No new line after selector in scss files ([#666](https://github.com/beautifier/js-beautify/issues/666))
* using html-beautify on handlebars template deletes unclosed tag if on second line ([#623](https://github.com/beautifier/js-beautify/issues/623))
* more Extra space after scss pseudo classes ([#557](https://github.com/beautifier/js-beautify/issues/557))
* Unnecessary spaces in PHP code ([#490](https://github.com/beautifier/js-beautify/issues/490))
* Some underscore.js template tags are broken ([#417](https://github.com/beautifier/js-beautify/issues/417))
* Selective ignore using comments (feature request) ([#384](https://github.com/beautifier/js-beautify/issues/384))

## v1.5.6
* Fix tokenizer's bracket pairs' open stack ([#693](https://github.com/beautifier/js-beautify/pull/693))
* Indentation is incorrect for HTML5 void tag <source> ([#692](https://github.com/beautifier/js-beautify/issues/692))
* Line wrapping breaks at the wrong place when the line is indented. ([#691](https://github.com/beautifier/js-beautify/issues/691))
* Publish v1.5.6 ([#687](https://github.com/beautifier/js-beautify/issues/687))
* Replace existing file fails using python beautifier ([#686](https://github.com/beautifier/js-beautify/issues/686))
* Pseudo-classes formatted incorrectly and inconsistently with @page ([#661](https://github.com/beautifier/js-beautify/issues/661))
* doc: add end\_with\_newline option ([#650](https://github.com/beautifier/js-beautify/pull/650))
* Improve support for xml parts of jsx (React) => spaces, spread attributes and nested objects break the process ([#646](https://github.com/beautifier/js-beautify/issues/646))
* html-beautify formats handlebars comments but does not format html comments ([#635](https://github.com/beautifier/js-beautify/issues/635))
* Support for ES7 async ([#630](https://github.com/beautifier/js-beautify/issues/630))
* css beautify adding an extra newline after a comment line in a css block ([#609](https://github.com/beautifier/js-beautify/issues/609))
* No option to "Indent with tabs" for HTML files ([#587](https://github.com/beautifier/js-beautify/issues/587))
* Function body is indented when followed by a comment ([#583](https://github.com/beautifier/js-beautify/issues/583))
* JSX support ([#425](https://github.com/beautifier/js-beautify/issues/425))
* Alternative Newline Characters ([#260](https://github.com/beautifier/js-beautify/issues/260))

## v1.5.5
* Add GUI support for `--indent-inner-html`. ([#633](https://github.com/beautifier/js-beautify/pull/633))
* Publish v1.5.5 ([#629](https://github.com/beautifier/js-beautify/issues/629))
* CSS: Updating the documentation for the 'newline\_between\_rules' ([#615](https://github.com/beautifier/js-beautify/pull/615))
* Equal Sign Removed from Filter Properties Alpha Opacity Assignment ([#599](https://github.com/beautifier/js-beautify/issues/599))
* Keep trailing spaces on comments ([#598](https://github.com/beautifier/js-beautify/issues/598))
* only print the file names of changed files ([#597](https://github.com/beautifier/js-beautify/issues/597))
*  CSS: support add newline between rules ([#574](https://github.com/beautifier/js-beautify/pull/574))
* elem[array]++ changes to elem[array] ++ inserting unnecessary gap ([#570](https://github.com/beautifier/js-beautify/issues/570))
* add support to less functions paramters braces ([#568](https://github.com/beautifier/js-beautify/pull/568))
* selector\_separator\_newline: true for Sass doesn't work ([#563](https://github.com/beautifier/js-beautify/issues/563))
* yield statements are being beautified to their own newlines since 1.5.2 ([#560](https://github.com/beautifier/js-beautify/issues/560))
* HTML beautifier inserts extra newline into `<li>`s ending with `<code>` ([#524](https://github.com/beautifier/js-beautify/issues/524))
* Add wrap\_attributes option ([#476](https://github.com/beautifier/js-beautify/issues/476))
* Add or preserve empty line between CSS rules ([#467](https://github.com/beautifier/js-beautify/issues/467))
* Support comma first style of variable declaration ([#245](https://github.com/beautifier/js-beautify/issues/245))

## v1.5.4
* TypeScript oddly formatted with 1.5.3 ([#552](https://github.com/beautifier/js-beautify/issues/552))
* HTML beautifier inserts double spaces between adjacent tags ([#525](https://github.com/beautifier/js-beautify/issues/525))
* Keep space in font rule ([#491](https://github.com/beautifier/js-beautify/issues/491))
* [Brackets plug in] Space after </a> disappears ([#454](https://github.com/beautifier/js-beautify/issues/454))
* Support nested pseudo-classes and parent reference (LESS) ([#427](https://github.com/beautifier/js-beautify/pull/427))
* Alternate approach: preserve single spacing and treat img as inline element ([#415](https://github.com/beautifier/js-beautify/pull/415))

## v1.5.3
* [TypeError: Cannot read property 'type' of undefined] ([#548](https://github.com/beautifier/js-beautify/issues/548))
* Bug with RegExp ([#547](https://github.com/beautifier/js-beautify/issues/547))
* Odd behaviour on less ([#520](https://github.com/beautifier/js-beautify/issues/520))
* css beauitify ([#506](https://github.com/beautifier/js-beautify/issues/506))
* Extra space after scss pseudo classes. ([#500](https://github.com/beautifier/js-beautify/issues/500))
* Generates invalid scss when formatting ampersand selectors ([#498](https://github.com/beautifier/js-beautify/issues/498))
* bad formatting of .less files using @variable or &:hover syntax ([#489](https://github.com/beautifier/js-beautify/issues/489))
* Incorrect beautifying of CSS comment including an url. ([#466](https://github.com/beautifier/js-beautify/issues/466))
* Handle SASS parent reference &: ([#414](https://github.com/beautifier/js-beautify/issues/414))
* Js-beautify breaking selectors in less code.  ([#410](https://github.com/beautifier/js-beautify/issues/410))
* Problem with "content" ([#364](https://github.com/beautifier/js-beautify/issues/364))
* Space gets inserted between function and paren for function in Define  ([#313](https://github.com/beautifier/js-beautify/issues/313))
* beautify-html returns null on broken html ([#301](https://github.com/beautifier/js-beautify/issues/301))
* Indentation of functions inside conditionals not passing jslint ([#298](https://github.com/beautifier/js-beautify/issues/298))

## v1.5.2
* Allow custom elements to be unformatted ([#540](https://github.com/beautifier/js-beautify/pull/540))
* Need option to ignore brace style ([#538](https://github.com/beautifier/js-beautify/issues/538))
* Refactor to Output and OutputLine classes ([#536](https://github.com/beautifier/js-beautify/pull/536))
* Recognize ObjectLiteral on open brace ([#535](https://github.com/beautifier/js-beautify/pull/535))
* Refactor to fully tokenize before formatting ([#530](https://github.com/beautifier/js-beautify/pull/530))
* Cleanup checked in six.py file ([#527](https://github.com/beautifier/js-beautify/pull/527))
* Changelog.md? ([#526](https://github.com/beautifier/js-beautify/issues/526))
* New line added between each css declaration ([#523](https://github.com/beautifier/js-beautify/issues/523))
* Kendo Template scripts get messed up! ([#516](https://github.com/beautifier/js-beautify/issues/516))
* SyntaxError: Unexpected token ++ ([#514](https://github.com/beautifier/js-beautify/issues/514))
* space appears before open square bracket when the object name is "set" ([#508](https://github.com/beautifier/js-beautify/issues/508))
* Unclosed string problem ([#505](https://github.com/beautifier/js-beautify/issues/505))
* "--n" and "++n" are not indented like "n--" and "n++" are... ([#495](https://github.com/beautifier/js-beautify/issues/495))
* Allow `<style>` and `<script>` tags to be unformatted ([#494](https://github.com/beautifier/js-beautify/pull/494))
* Preserve new line at end of file ([#492](https://github.com/beautifier/js-beautify/issues/492))
* Line wraps breaking numbers (causes syntax error) ([#488](https://github.com/beautifier/js-beautify/issues/488))
* jsBeautify acts differently when handling different kinds of function expressions ([#485](https://github.com/beautifier/js-beautify/issues/485))
* AttributeError: 'NoneType' object has no attribute 'groups' ([#479](https://github.com/beautifier/js-beautify/issues/479))
* installation doco for python need update -- pip install six? ([#478](https://github.com/beautifier/js-beautify/issues/478))
* Move einars/js-beautify to beautify-web/js-beautify ([#475](https://github.com/beautifier/js-beautify/issues/475))
* Bring back space\_after\_anon\_function ([#474](https://github.com/beautifier/js-beautify/pull/474))
* fix for #453, Incompatible handlebar syntax ([#468](https://github.com/beautifier/js-beautify/pull/468))
* Python: missing explicit dependency on "six" package ([#465](https://github.com/beautifier/js-beautify/issues/465))
* function declaration inside array, adds extra line.  ([#464](https://github.com/beautifier/js-beautify/issues/464))
* [es6] yield a array ([#458](https://github.com/beautifier/js-beautify/issues/458))
* Publish v1.5.2 ([#452](https://github.com/beautifier/js-beautify/issues/452))
* Port css colon character fix to python  ([#446](https://github.com/beautifier/js-beautify/issues/446))
* Cannot declare object literal properties with unquoted reserved words ([#440](https://github.com/beautifier/js-beautify/issues/440))
* Do not put a space within `function*` generator functions. ([#428](https://github.com/beautifier/js-beautify/issues/428))
* beautification of "nth-child" css fails csslint ([#418](https://github.com/beautifier/js-beautify/issues/418))


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team@beautifier.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing


## Report Issues and Request Changes
If you find a bug, please report it, including environment and examples of current behavior and what you believe to be the correct behavior.  The clearer your description and information, the more likely it is someone will be able to make progress on it.  The default issue template will help guide you through this.

## How to Make Changes (Implement Fixes and New Features)
Fixes and enhancements are totally welcome.  We prefer you to file an issue before filing a PR, as this gives us chance to discuss design details, but feel free to dive right in.

### 0. Prerequisites for development

* bash
* make
* nodejs - v16.x or greater (with npm)
* python - v3.7 or greater (with pip)

If you encounter issues and cannot build, come chat on gitter.im.  We're happy to help.

### 1. Build and Test Locally
This repository holds two mostly identical implementations of the beautifiers: a JavaScript implementation and a Python implementation.
While developing, you may locally build and test the JavaScript or Python (or both). The HTML beautifier is only implemented in JavaScript.

* Familiarize yourself with the folder structure and code style before you dive in.
* Make changes to the implementation of your choice.
* If working in the JavaScript implementation:
  * Run `make js` to build and run unit tests
  * Run `make serve` to manually test changes locally at `http://localhost:8080`
  * To load a debug (human readable) version of the beautifier source, open `http://localhost:8080/?debug`
* If working in the Python implementation:
  * Run `make py` to build and run unit tests 
* Add tests to `/test/data/*/test.js`.
* Run `make jstest` or `make pytest` to run style checks, and to generate and run tests.
* Include all changed files in your commit - The generated test files are checked in along with changes to the test data files.

### 2. Ensure Feature Parity
Any changes made to one implementation must be also made to the other implementation.  **This is required**.  Every time we make an exception to this requirement the project becomes harder to maintain.  This will become painfully clear, should you find yourself unable to port changes from one implementation to the other due to implementations being out of sync. We made this a requirement several years ago and there are **still** open issues for changes that people promised to port "in the next week or two".  The entire HTML beautifier is an example of this. :(

The implementations are already very similar and neither Python nor JavaScript are that hard to understand.  Take the plunge, it is easier than you think.  If you get stuck, go ahead and file a Pull Request and we can discuss how to move forward.

* Run `make` (with no parameters) to run style checks, and to generate and run tests on both implementations.
* Include all changed files in your commit - The generated test files are checked in along with changes to the test data files.

### 3. Update Documentation and Tools
Update documentation as needed.  This includes files such as the README.md, internal command-line help, and file comments.
Also, check if your change needs any tooling updates.  For example, the CDN URLs required additional scripting to update automatically for new releases.

### 4. Submit a Pull Request

* Run `make ci` locally after commit but before creation of Pull Request.  You may start a Pull Request even if this reports errors, but the PR will not be merged until all errors are fixed.
* Include description of changes. Include examples of input and expected output if possible.
* Pull requests must pass build checks on all platforms before being merged. We use Travis CI and AppVeyor to run tests on Linux and Windows across multiple versions of Node.js and Python.


# Folders

## Root
Some files related to specific implementations or platforms are found in the root folder, but most are cross-project tools and configuration.

## `js`
Files related to the JavaScript implementations of the beautifiers.

## `python`
Files related to the Python implementations of the beautifiers.

## `web`
Files related to https://beautifier.io/.

## `test`
Test data files and support files used to generate implementation-specific test files.


# Branches and Tags

## Main
We use the `main` branch as the primary development branch.

## Release
We use the `release` branch to hold releases, including built files for bower and the website.

# Tags
Each release is has a tag created for it in the `release` branch when it is published.  The latest release is linked from the `README.md`.

## Attic
This project has been around for a while.  While some parts have improved significantly over time, others fell
into disrepair and were mothballed. All branches named `attic-*` are significantly out of date and kept for reference purposes only.

### PHP
`attic-php` contains a PHP implementation of the beautifier.
If you're interested in using it feel free.
If you plan to enhance it, please consider joining this project, and updating this version to match current functionality.

### Other Languages
Versions of the beautifier adapted to other languages are available on branch `attic-other`.
Take a look and feel free to resurrect them, but know it's pretty dusty back there.

### Generic Eval Unpacker
The `attic-genericeval` branch includes an unpacker that calls `eval` on whatever source is passed to it.
This file may be useful when working with source that unpacks itself when `eval` is called on it, but is also very unsafe.
We have isolated it on this separate branch to keep it from hurting the other children.

# How to publish a new version

NOTE: Before you publish a release make sure the latest changes have passed the Travis CI build!

## Setup

### Python

1. A PyPI user account from https://pypi.python.org/pypi?%3Aaction=register_form.
2. Permissions to the jsbeautifier package.  File an issue here on GitHub and the appropriate person will help you.

### Node

1. An npmjs.org user account from https://npmjs.org/signup.
2. Permissions to the js-beautify module on npmjs.org.  File an issue here on GitHub and the appropriate person will help you.

## Publish to Production
To publish a release:
* Close the Milestone for this release on github
* Run `./tools/release-all.sh <version>`.

This is script will:

* Update README.md with correct cdn links
* Update CHANGLOG.md with the milestone description and a list of closed issues
* Commit the built files to the `release` branch
* Publish the python version to PyPI
* Publish the javascript version to npm
* Merge the changes and publish them on the gh-pages branch

NOTE: We keep Python and Node version numbers synchronized,
so if you publish a Python release, you publish a Node release as well.

## Publish to Beta Channel

To publish a Beta or RC (Release Candidate), add `-beta1` or `-rc1` to the end of the version, incrementing the number on the end as needed.





================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: Makefile
================================================
PROJECT_ROOT=$(subst \,/,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))
BUILD_DIR=$(PROJECT_ROOT)build
SCRIPT_DIR=$(PROJECT_ROOT)tools
SHELL=/bin/bash
PYTHON=$(SCRIPT_DIR)/python
NODE=$(SCRIPT_DIR)/node
NPM=$(SCRIPT_DIR)/npm

all: depends generate-tests js beautify py package jstest pytest perf

help:
	@echo "make <action>"
	@echo "    all       - build both implementations"
	@echo "    serve    - serve site locally from localhost:8080"
	@echo "    js        - build javascript"
	@echo "    py        - build python"
	@echo "    alltest   - test both implementations, js and python"
	@echo "    pytest    - test python implementation"
	@echo "    jstest    - test javascript implementation"

ci: all git-status-clear

serve: js/lib/*.js
	@./node_modules/.bin/serve

js: generate-tests js/lib/*.js
	@echo Testing node beautify functionality...
	./node_modules/.bin/mocha --recursive js/test && \
		./js/test/node-src-index-tests.js

py: generate-tests $(BUILD_DIR)/python
	@echo Testing python beautify functionality...
	$(SCRIPT_DIR)/python-dev3 black --config=python/pyproject.toml python
	$(SCRIPT_DIR)/python-dev python python/js-beautify-test.py || exit 1

jstest: depends js build/*.tgz
	@echo Testing javascript implementation...
	@$(NODE) js/test/node-beautify-tests.js || exit 1
	@$(NODE) js/test/amd-beautify-tests.js || exit 1
	@$(NODE) --version && \
		./js/test/shell-test.sh

pytest: depends py python/dist/*
	@echo Testing python implementation...
	@cd python && \
		$(PYTHON) --version && \
		./jsbeautifier/tests/shell-test.sh

alltest: jstest pytest

package: js py build/*.tgz python/dist/*


perf:
	@echo ----------------------------------------
	@echo Testing node js beautify performance...
	$(NODE) js/test/node-beautify-perf-tests.js || exit 1
	@echo Testing node css beautify performance...
	$(NODE) js/test/node-beautify-css-perf-tests.js || exit 1
	@echo Testing html-beautify performance...
	$(NODE) js/test/node-beautify-html-perf-tests.js || exit 1
	@echo Testing python js beautify performance...
	$(SCRIPT_DIR)/python-dev python python/test-perf-jsbeautifier.py || exit 1
	@echo Testing python css beautify performance...
	$(SCRIPT_DIR)/python-dev python python/test-perf-cssbeautifier.py || exit 1
	@echo ----------------------------------------

generate-tests: $(BUILD_DIR)/generate

beautify:
	$(SCRIPT_DIR)/build.sh beautify

# Build
#######################################################

# javascript bundle generation
js/lib/*.js: $(BUILD_DIR)/node $(BUILD_DIR)/generate $(wildcard js/src/*) $(wildcard js/src/**/*) $(wildcard web/*.js) js/index.js tools/template/* webpack.config.js
	$(SCRIPT_DIR)/build.sh js


# python package generation
python/dist/*: $(BUILD_DIR)/python $(BUILD_DIR)/generate $(wildcard python/**/*.py) python/jsbeautifier/* python/cssbeautifier/*
	@echo Building python package...
	@rm -f python/dist/*
	@cd python && \
		cp setup-css.py setup.py && \
		$(PYTHON) setup.py sdist && \
		rm setup.py
	@cd python && \
		cp setup-js.py setup.py && \
		$(PYTHON) setup.py sdist && \
		rm setup.py
	# Order matters here! Install css then js to make sure the local dist version of js is used
	$(SCRIPT_DIR)/python-rel pip install -U python/dist/cssbeautifier*
	$(SCRIPT_DIR)/python-rel pip install -U python/dist/jsbeautifier*

# python package generation
build/*.tgz: js/lib/*.js
	@echo Building node package...
	mkdir -p build/node_modules
	rm -f build/*.tgz
	rm -rf node_modules/js-beautify
	$(NPM) pack && mv *.tgz build/
	cd build && \
		$(NPM) install ./*.tgz

# Test generation
$(BUILD_DIR)/generate: $(BUILD_DIR)/node test/generate-tests.js $(wildcard test/data/**/*)
	@echo Generating tests...
	$(NODE) test/generate-tests.js
	@touch $(BUILD_DIR)/generate


# Handling dependencies
#######################################################
depends: $(BUILD_DIR)/node $(BUILD_DIR)/python
	@$(NODE) --version
	@$(PYTHON) --version

# update dependencies information
update: depends
	@rm package-lock.json
	$(NPM) update --save

# when we pull dependencies also pull docker image
# without this images can get stale and out of sync from CI system
$(BUILD_DIR)/node: package.json package-lock.json | $(BUILD_DIR)
	@$(NODE) --version
	$(NPM) --version
	$(NPM) install 
	@touch $(BUILD_DIR)/node

$(BUILD_DIR)/python: $(BUILD_DIR)/generate python/setup-js.py python/setup-css.py | $(BUILD_DIR) $(BUILD_DIR)/virtualenv
	@$(PYTHON) --version
	# Order matters here! Install css then js to make sure the local dist version of js is used
	@cp ./python/setup-css.py ./python/setup.py
	$(SCRIPT_DIR)/python-dev pip install -e ./python
	@cp ./python/setup-js.py ./python/setup.py
	$(SCRIPT_DIR)/python-dev pip install -e ./python
	@rm ./python/setup.py
	@touch $(BUILD_DIR)/python

$(BUILD_DIR)/virtualenv: | $(BUILD_DIR)
	virtualenv --version || pip install virtualenv
	virtualenv build/python-dev
	virtualenv build/python-rel
	$(SCRIPT_DIR)/python-dev python -m pip install --upgrade pip || exit 0
	$(SCRIPT_DIR)/python-rel python -m pip install --upgrade pip || exit 0
	$(SCRIPT_DIR)/python-dev3 pip install black
	@touch $(BUILD_DIR)/virtualenv



# Miscellaneous tasks
#######################################################
$(BUILD_DIR):
	mkdir -p $(BUILD_DIR)

git-status-clear:
	$(SCRIPT_DIR)/git-status-clear.sh

clean:
	git clean -xfd
#######################################################

.PHONY: all beautify clean depends generate-tests git-status-clear help serve update



================================================
FILE: README.md
================================================
<p align="center"><img src="https://raw.githubusercontent.com/beautifier/js-beautify/7db71fc/web/wordmark-light.svg" height="200px" align="center" alt="JS Beautifier"/></p>

<p align="center"><a href="https://github.com/beautifier/js-beautify/actions/workflows/main.yml"><img alt="CI" src="https://github.com/beautifier/js-beautify/workflows/CI/badge.svg"/></a>&#32;<a href="https://greenkeeper.io/" target="_blank"><img alt="Greenkeeper badge" src="https://badges.greenkeeper.io/beautifier/js-beautify.svg"/></a></p>

<p align="center"><a href="https://pypi.python.org/pypi/jsbeautifier" target="_blank"><img alt="PyPI version" src="https://img.shields.io/pypi/v/jsbeautifier.svg"/></a>&#32;<a href="https://cdnjs.com/libraries/js-beautify" target="_blank"><img alt="CDNJS version" src="https://img.shields.io/cdnjs/v/js-beautify.svg"/></a>&#32;<a href="https://www.npmjs.com/package/js-beautify" target="_blank"><img alt="NPM @latest" src="https://img.shields.io/npm/v/js-beautify.svg"/></a>&#32;<a href="https://www.npmjs.com/package/js-beautify?activeTab=versions" target="_blank"><img alt="NPM @next" src="https://img.shields.io/npm/v/js-beautify/next.svg"/></a></p>

<p align="center"><a href="https://gitter.im/beautifier/js-beautify?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge" target="_blank"><img alt="Join the chat at https://gitter.im/beautifier/js-beautify" src="https://badges.gitter.im/Join%20Chat.svg"></a>&#32;<a href="https://twitter.com/intent/user?screen_name=js_beautifier" target="_blank"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/js_beautifier.svg?style=social&label=Follow"/></a></p>

<p align="center"><a href="https://www.npmjs.org/package/js-beautify" target="_blank"><img alt="NPM stats" src=https://nodei.co/npm/js-beautify.svg?downloadRank=true&downloads=true"/></a></p>

This little beautifier will reformat and re-indent bookmarklets, ugly
JavaScript, unpack scripts packed by Dean Edward’s popular packer,
as well as partly deobfuscate scripts processed by the npm package
[javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator).

Open [beautifier.io](https://beautifier.io/) to try it out.  Options are available via the UI.


# Contributors Needed
I'm putting this front and center above because existing owners have very limited time to work on this project currently.
This is a popular project and widely used but it desperately needs contributors who have time to commit to fixing both
customer facing bugs and underlying problems with the internal design and implementation.

If you are interested, please take a look at the [CONTRIBUTING.md](https://github.com/beautifier/js-beautify/blob/main/CONTRIBUTING.md) then fix an issue marked with the ["Good first issue"](https://github.com/beautifier/js-beautify/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label and submit a PR. Repeat as often as possible.  Thanks!


# Installation

You can install the beautifier for Node.js or Python.

## Node.js JavaScript

You may install the NPM package `js-beautify`. When installed globally, it provides an executable `js-beautify` script. As with the Python script, the beautified result is sent to `stdout` unless otherwise configured.

```bash
$ npm -g install js-beautify
$ js-beautify foo.js
```

You can also use `js-beautify` as a `node` library (install locally, the `npm` default):

```bash
$ npm install js-beautify
```

## Node.js JavaScript (vNext)

The above install the latest stable release. To install beta or RC versions:

```bash
$ npm install js-beautify@next
```

## Web Library
The beautifier can be added on your page as web library.

JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries/js-beautify) and rawgit.

To pull the latest version from one of these services include one set of the script tags below in your document:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-html.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-html.min.js"></script>
```

Example usage of a JS tag in html:

```html
<!DOCTYPE html>
<html lang="en">
  <body>

. . .

    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify.min.js"></script>
    <script src="script.js"></script>
  </body>
</html>
```
Older versions are available by changing the version number.

Disclaimer: These are free services, so there are [no uptime or support guarantees](https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions#i-need-guaranteed-100-uptime-should-i-use-cdnrawgitcom).


## Python
To install the Python version of the beautifier:

```bash
$ pip install jsbeautifier
```
Unlike the JavaScript version, the Python version can only reformat JavaScript. It does not work against HTML or CSS files, but you can install _css-beautify_ for CSS:

```bash
$ pip install cssbeautifier
```

# Usage
You can beautify JavaScript using JS Beautifier in your web browser, or on the command-line using Node.js or Python.

## Web Browser
Open [beautifier.io](https://beautifier.io/).  Options are available via the UI.

## Web Library
After you embed the `<script>` tags in your `html` file, they expose three functions: `js_beautify`, `css_beautify`, and `html_beautify` 

Example usage of beautifying a json string:

```js
const options = { indent_size: 2, space_in_empty_paren: true }

const dataObj = {completed: false,id: 1,title: "delectus aut autem",userId: 1,}

const dataJson = JSON.stringify(dataObj)

js_beautify(dataJson, options)

/* OUTPUT
{
  "completed": false,
  "id": 1,
  "title": "delectus aut autem",
  "userId": 1,
}
*/
```

## Node.js JavaScript

When installed globally, the beautifier provides an executable `js-beautify` script. The beautified result is sent to `stdout` unless otherwise configured.

```bash
$ js-beautify foo.js
```

To use `js-beautify` as a `node` library (after install locally), import and call the appropriate beautifier method for JavaScript (JS), CSS, or HTML.  All three method signatures are `beautify(code, options)`. `code` is the string of code to be beautified. options is an object with the settings you would like used to beautify the code.

The configuration option names are the same as the CLI names but with underscores instead of dashes.  For example, `--indent-size 2 --space-in-empty-paren` would be `{ indent_size: 2, space_in_empty_paren: true }`.

```js
var beautify = require('js-beautify/js').js,
    fs = require('fs');

fs.readFile('foo.js', 'utf8', function (err, data) {
    if (err) {
        throw err;
    }
    console.log(beautify(data, { indent_size: 2, space_in_empty_paren: true }));
});
```

If you are using ESM Imports, you can import `js-beautify` like this:

```js
// 'beautify' can be any name here.
import beautify from 'js-beautify';

beautify.js(data, options);
beautify.html(data, options);
beautify.css(data, options);
```

## Python
After installing, to beautify using Python:

```bash
$ js-beautify file.js
```

Beautified output goes to `stdout` by default.

To use `jsbeautifier` as a library is simple:

```python
import jsbeautifier
res = jsbeautifier.beautify('your JavaScript string')
res = jsbeautifier.beautify_file('some_file.js')
```

...or, to specify some options:

```python
opts = jsbeautifier.default_options()
opts.indent_size = 2
opts.space_in_empty_paren = True
res = jsbeautifier.beautify('some JavaScript', opts)
```

The configuration option names are the same as the CLI names but with underscores instead of dashes.  The example above would be set on the command-line as `--indent-size 2 --space-in-empty-paren`.


# Options

These are the command-line flags for both Python and JS scripts:

```text
CLI Options:
  -f, --file       Input file(s) (Pass '-' for stdin)
  -r, --replace    Write output in-place, replacing input
  -o, --outfile    Write output to file (default stdout)
  --config         Path to config file
  --type           [js|css|html] ["js"] Select beautifier type (NOTE: Does *not* filter files, only defines which beautifier type to run)
  -q, --quiet      Suppress logging to stdout
  -h, --help       Show this help
  -v, --version    Show the version

Beautifier Options:
  -s, --indent-size                 Indentation size [4]
  -c, --indent-char                 Indentation character [" "]
  -t, --indent-with-tabs            Indent with tabs, overrides -s and -c
  -e, --eol                         Character(s) to use as line terminators.
                                    [first newline in file, otherwise "\n]
  -n, --end-with-newline            End output with newline
  --editorconfig                    Use EditorConfig to set up the options
  -l, --indent-level                Initial indentation level [0]
  -p, --preserve-newlines           Preserve line-breaks (--no-preserve-newlines disables)
  -m, --max-preserve-newlines       Number of line-breaks to be preserved in one chunk [10]
  -P, --space-in-paren              Add padding spaces within paren, ie. f( a, b )
  -E, --space-in-empty-paren        Add a single space inside empty paren, ie. f( )
  -j, --jslint-happy                Enable jslint-stricter mode
  -a, --space-after-anon-function   Add a space before an anonymous function's parens, ie. function ()
  --space-after-named-function      Add a space before a named function's parens, i.e. function example ()
  -b, --brace-style                 [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]
  -u, --unindent-chained-methods    Don't indent chained method calls
  -B, --break-chained-methods       Break chained method calls across subsequent lines
  -k, --keep-array-indentation      Preserve array indentation
  -x, --unescape-strings            Decode printable characters encoded in xNN notation
  -w, --wrap-line-length            Wrap lines that exceed N characters [0]
  -X, --e4x                         Pass E4X xml literals through untouched
  --good-stuff                      Warm the cockles of Crockford's heart
  -C, --comma-first                 Put commas at the beginning of new line instead of end
  -O, --operator-position           Set operator position (before-newline|after-newline|preserve-newline) [before-newline]
  --indent-empty-lines              Keep indentation on empty lines
  --templating                      List of templating languages (auto,django,erb,handlebars,php,smarty,angular) ["auto"] auto = none in JavaScript, all in HTML
```

Which correspond to the underscored option keys for both library interfaces

**defaults per CLI options**
```json
{
    "indent_size": 4,
    "indent_char": " ",
    "indent_with_tabs": false,
    "editorconfig": false,
    "eol": "\n",
    "end_with_newline": false,
    "indent_level": 0,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "space_in_paren": false,
    "space_in_empty_paren": false,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "space_after_named_function": false,
    "brace_style": "collapse",
    "unindent_chained_methods": false,
    "break_chained_methods": false,
    "keep_array_indentation": false,
    "unescape_strings": false,
    "wrap_line_length": 0,
    "e4x": false,
    "comma_first": false,
    "operator_position": "before-newline",
    "indent_empty_lines": false,
    "templating": ["auto"]
}
```

**defaults not exposed in the cli**
```json
{
  "eval_code": false,
  "space_before_conditional": true
}
```

Notice not all defaults are exposed via the CLI.  Historically, the Python and
JS APIs have not been 100% identical. There are still a
few other additional cases keeping us from 100% API-compatibility.


## Loading settings from environment or .jsbeautifyrc (JavaScript-Only)

In addition to CLI arguments, you may pass config to the JS executable via:

 * any `jsbeautify_`-prefixed environment variables
 * a `JSON`-formatted file indicated by the `--config` parameter
 * a `.jsbeautifyrc` file containing `JSON` data at any level of the filesystem above `$PWD`

Configuration sources provided earlier in this stack will override later ones.

## Setting inheritance and Language-specific overrides

The settings are a shallow tree whose values are inherited for all languages, but
can be overridden.  This works for settings passed directly to the API in either implementation.
In the JavaScript implementation, settings loaded from a config file, such as .jsbeautifyrc, can also use inheritance/overriding.

Below is an example configuration tree showing all the supported locations
for language override nodes.  We'll use `indent_size` to discuss how this configuration would behave, but any number of settings can be inherited or overridden:

```json
{
    "indent_size": 4,
    "html": {
        "end_with_newline": true,
        "js": {
            "indent_size": 2
        },
        "css": {
            "indent_size": 2
        }
    },
    "css": {
        "indent_size": 1
    },
    "js": {
       "preserve-newlines": true
    }
}
```

Using the above example would have the following result:

* HTML files
  * Inherit `indent_size` of 4 spaces from the top-level setting.
  * The files would also end with a newline.
  * JavaScript and CSS inside HTML
    * Inherit the HTML `end_with_newline` setting.
    * Override their indentation to 2 spaces.
* CSS files
  * Override the top-level setting to an `indent_size` of 1 space.
* JavaScript files
  * Inherit `indent_size` of 4 spaces from the top-level setting.
  * Set `preserve-newlines` to `true`.

## CSS & HTML

In addition to the `js-beautify` executable, `css-beautify` and `html-beautify`
are also provided as an easy interface into those scripts. Alternatively,
`js-beautify --css` or `js-beautify --html` will accomplish the same thing, respectively.

```js
// Programmatic access
var beautify_js = require('js-beautify'); // also available under "js" export
var beautify_css = require('js-beautify').css;
var beautify_html = require('js-beautify').html;

// All methods accept two arguments, the string to be beautified, and an options object.
```

The CSS & HTML beautifiers are much simpler in scope, and possess far fewer options.

```text
CSS Beautifier Options:
  -s, --indent-size                  Indentation size [4]
  -c, --indent-char                  Indentation character [" "]
  -t, --indent-with-tabs             Indent with tabs, overrides -s and -c
  -e, --eol                          Character(s) to use as line terminators. (default newline - "\\n")
  -n, --end-with-newline             End output with newline
  -b, --brace-style                  [collapse|expand] ["collapse"]
  -L, --selector-separator-newline   Add a newline between multiple selectors
  -N, --newline-between-rules        Add a newline between CSS rules
  --indent-empty-lines               Keep indentation on empty lines

HTML Beautifier Options:
  -s, --indent-size                  Indentation size [4]
  -c, --indent-char                  Indentation character [" "]
  -t, --indent-with-tabs             Indent with tabs, overrides -s and -c
  -e, --eol                          Character(s) to use as line terminators. (default newline - "\\n")
  -n, --end-with-newline             End output with newline
  -p, --preserve-newlines            Preserve existing line-breaks (--no-preserve-newlines disables)
  -m, --max-preserve-newlines        Maximum number of line-breaks to be preserved in one chunk [10]
  -I, --indent-inner-html            Indent <head> and <body> sections. Default is false.
  -b, --brace-style                  [collapse-preserve-inline|collapse|expand|end-expand|none] ["collapse"]
  -S, --indent-scripts               [keep|separate|normal] ["normal"]
  -w, --wrap-line-length             Maximum characters per line (0 disables) [250]
  -A, --wrap-attributes              Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline|aligned-multiple|preserve|preserve-aligned] ["auto"]
  -M, --wrap-attributes-min-attrs    Minimum number of html tag attributes for force wrap attribute options [2]
  -i, --wrap-attributes-indent-size  Indent wrapped attributes to after N characters [indent-size] (ignored if wrap-attributes is "aligned")
  -d, --inline                       List of tags to be considered inline tags
  --inline_custom_elements           Inline custom elements [true]
  -U, --unformatted                  List of tags (defaults to inline) that should not be reformatted
  -T, --content_unformatted          List of tags (defaults to pre) whose content should not be reformatted
  -E, --extra_liners                 List of tags (defaults to [head,body,/html] that should have an extra newline before them.
  --editorconfig                     Use EditorConfig to set up the options
  --indent_scripts                   Sets indent level inside script tags ("normal", "keep", "separate")
  --unformatted_content_delimiter    Keep text content together between this string [""]
  --indent-empty-lines               Keep indentation on empty lines
  --templating                       List of templating languages (auto,none,django,erb,handlebars,php,smarty,angular) ["auto"] auto = none in JavaScript, all in html
```

## Directives

Directives let you control the behavior of the Beautifier from within your source files. Directives are placed in comments inside the file.  Directives are in the format `/* beautify {name}:{value} */` in CSS and JavaScript. In HTML they are formatted as `<!-- beautify {name}:{value} -->`.

### Ignore directive

The `ignore` directive makes the beautifier completely ignore part of a file, treating it as literal text that is not parsed.
The input below will remain unchanged after beautification:

```js
// Use ignore when the content is not parsable in the current language, JavaScript in this case.
var a =  1;
/* beautify ignore:start */
 {This is some strange{template language{using open-braces?
/* beautify ignore:end */
```

### Preserve directive

NOTE: this directive only works in HTML and JavaScript, not CSS.

The `preserve` directive makes the Beautifier parse and then keep the existing formatting of a section of code.

The input below will remain unchanged after beautification:

```js
// Use preserve when the content is valid syntax in the current language, JavaScript in this case.
// This will parse the code and preserve the existing formatting.
/* beautify preserve:start */
{
    browserName: 'internet explorer',
    platform:    'Windows 7',
    version:     '8'
}
/* beautify preserve:end */
```

# License

You are free to use this in any way you want, in case you find this useful or working for you but you must keep the copyright notice and license. (MIT)

# Credits

* Created by Einar Lielmanis, <einar@beautifier.io>
* Python version flourished by Stefano Sanfilippo <a.little.coder@gmail.com>
* Command-line for node.js by Daniel Stockman <daniel.stockman@gmail.com>
* Maintained and expanded by Liam Newman <bitwiseman@beautifier.io>

Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, Dave
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
Mathias Bynens, Vittorio Gambaletta and others.

(README.md: js-beautify@1.15.4)


================================================
FILE: bower.json
================================================
{
  "name": "js-beautify",
  "main": [
    "./js/lib/beautify.js",
    "./js/lib/beautify-css.js",
    "./js/lib/beautify-html.js"
  ],
  "ignore": [
    "**/.*"
  ]
}


================================================
FILE: index.html
================================================
<!doctype html>
<html lang="en-US" dir="ltr" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta charset="utf-8" /><!-- The <meta> element must be within the first 1024 bytes of the HTML -->

  <!--
  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
  -->

  <!-- if you feel an urge to move this to bootstrap or something, you're most welcome -->
  <title>Online JavaScript beautifier</title>
  <link rel="icon" href="web/favicon.png" type="image/png">

  <script src="https://cdnjs.cloudflare.com/polyfill/v2/polyfill.min.js?features=default&flags=gated"></script>

  <!-- Codemirror from https://cdnjs.com/libraries/codemirror -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.css" integrity="sha512-uf06llspW44/LZpHzHT6qBOIVODjWtv4MxCricRxkzvopAlSWnTf6hpZTFxuuZcuNE9CBQhqE0Seu1CoRk84nQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/theme/darcula.min.css" integrity="sha512-kqCOYFDdyQF4JM8RddA6rMBi9oaLdR0aEACdB95Xl1EgaBhaXMIe8T4uxmPitfq4qRmHqo+nBU2d1l+M4zUx1g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.js" integrity="sha512-OeZ4Yrb/W7d2W4rAMOO0HQ9Ro/aWLtpW9BUSR2UOWnSV2hprXLkkYnnCGc9NeLUxxE4ZG7zN16UuT1Elqq8Opg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

  <!-- Codemirror Modes -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/xml/xml.min.js" integrity="sha512-LarNmzVokUmcA7aUDtqZ6oTS+YXmUKzpGdm8DxC46A6AHu+PQiYCUlwEGWidjVYMo/QXZMFMIadZtrkfApYp/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/javascript/javascript.min.js" integrity="sha512-Cbz+kvn+l5pi5HfXsEB/FYgZVKjGIhOgYNBwj4W2IHP2y8r3AdyDCQRnEUqIQ+6aJjygKPTyaNT2eIihaykJlw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/css/css.min.js" integrity="sha512-rQImvJlBa8MV1Tl1SXR5zD2bWfmgCEIzTieFegGg89AAt7j/NBEe50M5CqYQJnRwtkjKMmuYgHBqtD1Ubbk5ww==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/htmlmixed/htmlmixed.min.js" integrity="sha512-HN6cn6mIWeFJFwRN9yetDAMSh+AK9myHF1X9GlSlKmThaat65342Yw8wL7ITuaJnPioG0SYG09gy0qd5+s777w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/search/search.min.js" integrity="sha512-Mw3RqCUHTyvN3iSp5TSs731TiLqnKrxzyy2UVZv3+tJa524Rj7pBC7Ivv3ka2oDnkQwLOMHNDKU5nMJ16YRgrA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/search/searchcursor.min.js" integrity="sha512-+ZfZDC9gi1y9Xoxi9UUsSp+5k+AcFE0TRNjI0pfaAHQ7VZTaaoEpBZp9q9OvHdSomOze/7s5w27rcsYpT6xU6g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/dialog/dialog.min.js" integrity="sha512-NAJeqwfpM7/nfX90EweQhjudb66diK3Y9mkBjb4xJ6wufuVqFVAjHd8mJW//CGHNR9cI8wUfDRJ0jtLzZ9v8Qg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/dialog/dialog.min.css" integrity="sha512-Vogm+Cii1SXP5oxWQyPdkA91rHB776209ZVvX4C/i4ypcfBlWVRXZGodoTDAyyZvO36JlTqDqkMhVKAYc7CMjQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />

  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.min.js" integrity="sha512-nlp9/l96/EpjYBx7EP7pGASVXNe80hGhYAUrjeXnu/fyF5Py0/RXav4BBNs7n5Hx1WFhOEOWSAVjGeC3oKxDVQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" integrity="sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

  <script src="js/lib/unpackers/javascriptobfuscator_unpacker.js"></script>
  <script src="js/lib/unpackers/urlencode_unpacker.js"></script>
  <script src="js/lib/unpackers/p_a_c_k_e_r_unpacker.js"></script>
  <script src="js/lib/unpackers/myobfuscate_unpacker.js"></script>
  <script src="web/common-function.js"></script>

  <link rel="stylesheet" href="web/common-style.css">
</head>

<body class="container">

  <div class="title">
    <h1 class="logo">
      <img alt="js-beautify" src="web/banner-light.svg" height="54px" />
      <span id="version-number"></span>
    </h1>
    <div class="sub-title">
      <p>
        <strong>Beautify JavaScript, JSON, React.js, HTML, CSS, SCSS, and SASS</strong>
      </p>
    </div>
  </div>
  <div class="options">
    <div id="theme-toggle-wrapper">
      <label id="theme-toggle-label" for="theme-toggle-btn">
        <input type="checkbox" id="theme-toggle-btn" style="display: none" />
        <div id="theme-toggle-slider"></div>
      </label>
      <span id="theme-text">Enable Light Mode</span>
    </div>
    <select name="language" id="language">
      <option value="css">Beautify CSS</option>
      <option value="html">Beautify HTML</option>
      <option value="js">Beautify JavaScript</option>
    </select>

    <div class="buttons-box">
      <button class="submit"><strong>Beautify Code</strong> <em>(ctrl&#8209;enter)</em></button>
      <button class="control" type="button" onclick="copyText()"><strong>Copy to Clipboard</strong></button>
      <button class="control" type="button" onclick="downloadBeautifiedCode()"><strong>Download</strong></button>
      <button class="control" type="button" onclick="selectAll()"><strong>Select All</strong></button>
      <button class="control" type="button" onclick="clearAll()"><strong>Clear</strong></button>
      <input type="file" onchange="changeToFileContent(this)">
    </div>

    <div class="config-options">
      <h2>Options</h2>
      <div id="options">

        <div class="options-select">
          <select name="tabsize" id="tabsize">
            <option value="1">Indent with a tab character</option>
            <option value="2">Indent with 2 spaces</option>
            <option value="3">Indent with 3 spaces</option>
            <option value="4">Indent with 4 spaces</option>
            <option value="8">Indent with 8 spaces</option>
          </select>
          <select name="max-preserve-newlines" id="max-preserve-newlines">
            <option value="-1">Remove all extra newlines</option>
            <option value="1">Allow 1 newline between tokens</option>
            <option value="2">Allow 2 newlines between tokens</option>
            <option value="5">Allow 5 newlines between tokens</option>
            <option value="10">Allow 10 newlines between tokens</option>
            <option value="0">Allow unlimited newlines between tokens</option>
          </select>
          <select name="wrap-line-length" id="wrap-line-length">
            <option value="0">Do not wrap lines</option>
            <option value="40">Wrap lines near 40 characters</option>
            <option value="70">Wrap lines near 70 characters</option>
            <option value="80">Wrap lines near 80 characters</option>
            <option value="110">Wrap lines near 110 characters</option>
            <option value="120">Wrap lines near 120 characters</option>
            <option value="160">Wrap lines near 160 characters</option>
          </select>
          <select id="brace-style">
            <option value="collapse">Braces with control statement</option>
            <option value="expand">Braces on own line</option>
            <option value="end-expand">End braces on own line</option>
            <option value="none">Attempt to keep braces where they are</option>
          </select>
          <div>
            <p style="margin:6px 0 0 0">HTML &lt;style&gt;, &lt;script&gt; formatting:</p>
            <select id="indent-scripts">
              <option value="keep">Keep indent level of the tag</option>
              <option value="normal">Add one indent level</option>
              <option value="separate">Separate indentation</option>
            </select>
          </div>
        </div>

        <div class="options-checkboxes">
          <input class="checkbox" type="checkbox" id="end-with-newline">
          <label for="end-with-newline">End script and style with newline?</label>
          <br>
          <input class="checkbox" type="checkbox" id="e4x">
          <label for="e4x">Support e4x/jsx syntax</label>
          <br>
          <input class="checkbox" type="checkbox" id="comma-first">
          <label for="comma-first">Use comma-first list style?</label>
          <br>
          <input class="checkbox" type="checkbox" id="detect-packers">
          <label for="detect-packers">Detect packers and obfuscators? (unsafe)</label>
          <br>
          <input class="checkbox" type="checkbox" id="brace-preserve-inline">
          <label for="brace-preserve-inline">Preserve inline braces/code blocks?</label>
          <br>
          <input class="checkbox" type="checkbox" id="keep-array-indentation">
          <label for="keep-array-indentation">Keep array indentation?</label>
          <br>
          <input class="checkbox" type="checkbox" id="break-chained-methods">
          <label for="break-chained-methods">Break lines on chained methods?</label>
          <br>
          <input class="checkbox" type="checkbox" id="space-before-conditional">
          <label for="space-before-conditional">Space before conditional: "if(x)" / "if (x)"</label>
          <br>
          <input class="checkbox" type="checkbox" id="unescape-strings">
          <label for="unescape-strings">Unescape printable chars encoded as \xNN or \uNNNN?</label>
          <br>
          <input class="checkbox" type="checkbox" id="jslint-happy">
          <label for="jslint-happy">Use JSLint-happy formatting tweaks?</label>
          <br>
          <input class="checkbox" type="checkbox" id="indent-inner-html">
          <label for="indent-inner-html">Indent &lt;head&gt; and &lt;body&gt; sections?</label>
          <br>
          <input class="checkbox" type="checkbox" id="indent-empty-lines">
          <label for="indent-empty-lines">Keep indentation on empty lines?</label>
          <br><a href="?without-codemirror" class="turn-off-codemirror">Use a simple textarea for code input?</a>
        </div>

        <div>
          <p style="margin:6px 0 0 0">Additional Settings (JSON):</p>
          <textarea id="additional-options" rows="5">{}</textarea>
        </div>
        <p id="additional-options-error" hidden style="margin:6px 0 0 0; color:red ">Could Not Parse JSON!</p>
        <p style="margin:6px 0 0 0">Your Selected Options (JSON):</p>
        <div>
          <textarea readonly id="options-selected" rows="5"></textarea>
        </div>
      </div>
    </div>

    <div class="contributions">
      <p class="contributor-sep">Created by <a href="https://github.com/einars">Einar Lielmanis</a>, maintained and evolved by <a href="https://github.com/bitwiseman/">Liam Newman</a>.</p>
      </p>
      <p>
        All of the source code is completely free and open, available on <a href="https://github.com/beautifier/js-beautify">GitHub</a> under MIT licence,
        and we have a command-line version, <a href="https://pypi.org/project/jsbeautifier/">python library</a> and a <a href="https://npmjs.org/package/js-beautify">node package</a> as well.
      </p>
      <p>We use the wonderful <a href="http://codemirror.net">CodeMirror</a> syntax highlighting editor, written by Marijn Haverbeke.</p>
      <p class="contributors">Made with a great help of many contributors. Special thanks to:<br>
        Jason&nbsp;Diamond,
        Patrick&nbsp;Hof,
        Nochum&nbsp;Sossonko,
        Andreas&nbsp;Schneider,
        Dave&nbsp;Vasilevsky,
        <a href="https://moikrug.ru/vital">Vital&nbsp;Batmanov</a>,
        Ron&nbsp;Baldwin,
        Gabriel&nbsp;Harrison,
        <a href="http://shullian.com">Chris J. Shull</a>,
        <a href="http://mathiasbynens.be/">Mathias Bynens</a>,
        <a href="https://www.vittgam.net/">Vittorio Gambaletta</a>,
        <a href="https://github.com/esseks">Stefano Sanfilippo</a> and
        <a href="https://github.com/evocateur">Daniel Stockman</a>.
      </p>
    </div>
  </div>

  <div class="editor">
    <textarea id="source"></textarea>
  </div>

  <div class="hide">

    <p id="open-issue" hidden>Not pretty enough for you?
      <button type="button" onclick="submitIssue()" name="issue-button">Report a problem with this input</button>
    </p>

    <div class="blurb">

      <h2>Browser extensions and other uses</h2>
      <div class="col-6">
        <ul class="uses">

          <li>A
            <a href="javascript:(function(){s=document.getElementsByTagName('SCRIPT');tx='';sr=[];for(i=0;i<s.length;i++){with(s.item(i)){t=text;if(t){tx+=t;}else{sr.push(src)};}};with(window.open()){document.write('<textarea id=&quot;t&quot;>'+(sr.join(&quot;\n&quot;))+&quot;\n\n-----\n\n&quot;+tx+'</textarea><script src=&quot;https://beautifier.io/js/lib/beautify.js&quot;></script><script>with(document.getElementById(&quot;t&quot;)){value=js_beautify(value);with(style){width=&quot;99%&quot;;height=&quot;99%&quot;;borderStyle=&quot;none&quot;;}};</script>');document.close();}})();">
              <strong>bookmarklet</strong></a>
            (drag it to your bookmarks) by Ichiro Hiroshi to see all scripts used on the page,
          </li>

          <li><strong>Chrome</strong>, in case the built-in CSS and javascript formatting isn't enough for you:<br>
            — <a href="https://chrome.google.com/webstore/detail/cfmcghennfbpmhemnnfjhkdmnbidpanb">Quick source viewer</a> by Tomi Mickelsson (<a href="https://github.com/tomimick/chrome-ext-view-src">github</a>, <a href="http://tomicloud.com/2012/07/viewsrc-chrome-ext">blog</a>),<br>
            — <a href="https://chrome.google.com/webstore/detail/javascript-and-css-code-b/iiglodndmmefofehaibmaignglbpdald">Javascript and CSS Code beautifier</a> by c7sky,<br>
            — <a href="https://chrome.google.com/webstore/detail/jsbeautify-for-google-chr/kkioiolcacgoihiiekambdciinadbpfk">jsbeautify-for-chrome</a> by Tom Rix (<a href="https://github.com/rixth/jsbeautify-for-chrome">github</a>),<br>
            — <a href="https://chrome.google.com/webstore/detail/piekbefgpgdecckjcpffhnacjflfoddg">Pretty Beautiful JavaScript</a> by Will McSweeney<br>
            — <a href="https://chrome.google.com/webstore/detail/stackoverflow-code-beauti/pljeafjjkkbacckkollfejkciddacmeb">Stackoverflow Code Beautify</a> by Making Odd Edit Studios (<a href="https://github.com/MakingOddEdit/CodeBeautify">github</a>).
          </li>
          <li><strong>Firefox</strong>: <a href="https://addons.mozilla.org/en-US/firefox/addon/javascript-deminifier/">Javascript deminifier</a> by Ben Murphy, to be
            used together with the firebug (<a href="https://github.com/benmmurphy/jsdeminifier_xpi/">github</a>),</li>
          <li><strong>Safari</strong>: <a href="http://spadin.github.com/js-beautify-safari-extension">Safari extension</a> by Sandro Padin,</li>
          <li><strong>Opera</strong>: <a href="https://addons.opera.com/addons/extensions/details/readable-javascript/">Readable JavaScript</a>
            (<a href="https://github.com/Dither/readable-javascript">github</a>) by Dither,</li>
          <li><strong>Opera</strong>: <a href="https://addons.opera.com/addons/extensions/details/source/">Source</a> extension by Deathamns,</li>
          <li><strong>Sublime Text 2/3:</strong> <a href="https://github.com/akalongman/sublimetext-codeformatter">CodeFormatter</a>, a python plugin by Avtandil Kikabidze, supports HTML, CSS, JS and a bunch of other languages,</li>
          <li><strong>Sublime Text 2/3:</strong> <a href="https://github.com/victorporof/Sublime-HTMLPrettify">HTMLPrettify</a>, a javascript plugin by Victor Porof,</li>
          <li><strong>Sublime Text 2:</strong> <a href="https://github.com/jdc0589/JsFormat">JsFormat</a>, a javascript formatting plugin for this nice editor by Davis
            Clark,</li>
          <li><strong>vim:</strong> <a href="https://github.com/michalliu/sourcebeautify.vim">sourcebeautify.vim</a>, a plugin by michalliu (requires node.js, V8, SpiderMonkey
            or cscript js engine),</li>
          <li><strong>vim:</strong> <a href="https://github.com/maksimr/vim-jsbeautify">vim-jsbeautify</a>, a plugin by Maksim Ryzhikov (node.js or V8 required),</li>

          <li><strong>Emacs:</strong> <a href="https://github.com/yasuyk/web-beautify">Web-beautify</a> formatting package by Yasuyuki Oka,</li>
          <li><strong>Komodo IDE:</strong> <a href="http://komodoide.com/packages/addons/beautify-js/">Beautify-js</a> addon by Bob de Haas (<a href="https://github.com/babobski/Beautify-js">github</a>),</li>
          <li><strong>C#:</strong> ghost6991 <a href="https://github.com/ghost6991/Jsbeautifier">ported the javascript formatter to C#</a>,</li>
          <li><strong>Go:</strong> ditashi has <a href="https://github.com/ditashi/jsbeautifier-go">ported the javascript formatter to golang</a>,</li>
        </ul>
      </div>
      <div class="col-6">
        <ul class="uses">
          <li><a href="https://marketplace.visualstudio.com/items/HookyQR.beautify">Beautify plugin</a> (<a href="https://github.com/HookyQR/VSCodeBeautify">github</a>) by HookyQR for the <a href="https://code.visualstudio.com/">Visual Studio Code</a> IDE,</li>
          <li><a href="http://fiddler2.com/">Fiddler</a> proxy: <a href="http://fiddler2.com/Fiddler2/extensions.asp">JavaScript Formatter addon</a>,</li>
          <li><a href="https://github.com/nagaozen/gedit-tunnings/">gEdit tips</a> by Fabio Nagao,</li>
          <li><a href="http://akelpad.sourceforge.net/forum/viewtopic.php?p=11246#11246">Akelpad extension</a> by Infocatcher,</li>
          <li>Beautifier in <a href="http://sethmason.com/2011/04/28/jsbeautify-in-emacs.html">Emacs</a> write-up by Seth Mason,</li>
          <li><a href="http://c9.io">Cloud9</a>, a lovely IDE running in a browser, working in the node/cloud, uses jsbeautifier (<a href="https://github.com/ajaxorg/cloud9">github</a>),</li>
          <li><a href="https://www.comment-devenir-un-hacker.com/app.html">Devenir Hacker App</a>, a non-free JavaScript packer for Mac,</li>
          <li><a href="http://www.restconsole.com/">REST Console</a>, a request debugging tool for Chrome, beautifies JSON responses (<a href="https://github.com/codeinchaos/rest-console">github</a>),</li>
          <li><a href="http://mitmproxy.org/">mitmproxy</a>, a nifty SSL-capable HTTP proxy, provides pretty javascript responses (<a href="https://github.com/cortesi/mitmproxy">github</a>).</li>
          <li><a href="http://www.wakanda.org/">wakanda</a>, a neat IDE for web and mobile applications has a <a href="http://forum.wakanda.org/showthread.php?1483-3-new-extensions-JSLint-Beautifier-and-Snippet">Beautifier extension</a>
            (<a href="https://github.com/Wakanda/wakanda-extensions/tree/master/Beautifier">github</a>).</li>
          <li><a href="http://portswigger.net/burp/">Burp Suite</a> now has a <a href="https://github.com/irsdl/BurpSuiteJSBeautifier/">beautfier extension</a>,
            thanks to Soroush Dalili,</li>
          <li><a href="http://plugins.netbeans.org/plugin/43263/jsbeautify">Netbeans jsbeautify</a> plugin by Drew Hamlett
            (<a href="https://github.com/drewhjava/netbeans-jsbeautify">github</a>).</li>
          <li><a href="https://github.com/drewhjava/brackets-beautify">brackets-beautify-extension</a> for <a href="http://brackets.io">Adobe Brackets</a> by Drew
            Hamlett (<a href="https://github.com/drewhjava/brackets-beautify">github</a>),</li>
          <li><a href="http://codecaddy.net/">codecaddy.net</a>, a collection of webdev-related tools, assembled by Darik Hall,</li>
          <li><a href="http://www.editey.com/">editey.com</a>, an interesting and free Google-Drive oriented editor uses this beautifier,</li>
          <li><a href="https://github.com/vkadam/grunt-jsbeautifier">a beautifier plugin for Grunt</a> by Vishal Kadam,</li>
          <li><a href="http://www.uvviewsoft.com/synwrite/">SynWrite</a> editor has a JsFormat plugin (<a href="https://sourceforge.net/projects/synwrite-addons/files/PyPlugins/Alexey.JsFormat/">rar</a>, <a href="http://synwrite.sourceforge.net/forums/viewtopic.php?f=19&t=865">readme</a>),</li>
          <li><a href="http://liveditor.com/">LIVEditor</a>, a live-editing HTML/CSS/JS IDE (commercial, Windows-only) uses the library,</li>
        </ul>
      </div>
      <p>Doing anything interesting? Write us to <b>team@beautifier.io</b> so we can add your project to the list.</p>

      <p style="text-align:right">
        <a href="#" style="color: #ccc; border-bottom: 1px dashed #ccc; text-decoration: none;" onclick="run_tests(); return false;">Run the tests</a>
      </p>
      <div id="testresults"></div>
    </div>
  </div>
  <script src="web/onload.js"></script>
  <script src="web/google-analytics.js"></script>
</body>

</html>


================================================
FILE: js/bin/css-beautify.js
================================================
#!/usr/bin/env node
var cli = require('../lib/cli'); cli.interpret();




================================================
FILE: js/bin/html-beautify.js
================================================
#!/usr/bin/env node
var cli = require('../lib/cli'); cli.interpret();




================================================
FILE: js/bin/js-beautify.js
================================================
#!/usr/bin/env node

var cli = require('../lib/cli');
cli.interpret();

================================================
FILE: js/config/defaults.json
================================================
{
    "indent_size": 4,
    "indent_char": " ",
    "indent_level": 0,
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "jslint_happy": false,
    "space_after_named_function": false,
    "space_after_anon_function": false,
    "brace_style": "collapse",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "space_before_conditional": true,
    "break_chained_methods": false,
    "eval_code": false,
    "unescape_strings": false,
    "wrap_line_length": 0,
    "indent_empty_lines": false,
    "templating": ["auto"]
}


================================================
FILE: js/index.js
================================================
/*jshint node:true */
/* globals define */
/*
  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

*/

'use strict';

/**
The following batches are equivalent:

var beautify_js = require('js-beautify');
var beautify_js = require('js-beautify').js;
var beautify_js = require('js-beautify').js_beautify;

var beautify_css = require('js-beautify').css;
var beautify_css = require('js-beautify').css_beautify;

var beautify_html = require('js-beautify').html;
var beautify_html = require('js-beautify').html_beautify;

All methods returned accept two arguments, the source string and an options object.
**/

function get_beautify(js_beautify, css_beautify, html_beautify) {
  // the default is js
  var beautify = function(src, config) {
    return js_beautify.js_beautify(src, config);
  };

  // short aliases
  beautify.js = js_beautify.js_beautify;
  beautify.css = css_beautify.css_beautify;
  beautify.html = html_beautify.html_beautify;

  // legacy aliases
  beautify.js_beautify = js_beautify.js_beautify;
  beautify.css_beautify = css_beautify.css_beautify;
  beautify.html_beautify = html_beautify.html_beautify;

  return beautify;
}

if (typeof define === "function" && define.amd) {
  // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )
  define([
    "./lib/beautify",
    "./lib/beautify-css",
    "./lib/beautify-html"
  ], function(js_beautify, css_beautify, html_beautify) {
    return get_beautify(js_beautify, css_beautify, html_beautify);
  });
} else {
  (function(mod) {
    var beautifier = require('./src/index');
    beautifier.js_beautify = beautifier.js;
    beautifier.css_beautify = beautifier.css;
    beautifier.html_beautify = beautifier.html;

    mod.exports = get_beautify(beautifier, beautifier, beautifier);

  })(module);
}

================================================
FILE: js/src/cli.js
================================================
#!/usr/bin/env node

/*
  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

  Js-Beautify Command-line for node.js
  -------------------------------------

  Written by Daniel Stockman (daniel.stockman@gmail.com)

*/
/*jshint strict:false */
/*jshint esversion: 6 */

const { globSync } = require('glob');

var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG ? function() {
    console.error.apply(console, arguments);
} : function() {};

var fs = require('fs'),
    cc = require('config-chain'),
    beautify = require('../index'),
    nopt = require('nopt'),
    glob = require("glob");

nopt.invalidHandler = function(key, val) {
    throw new Error(key + " was invalid with value \"" + val + "\"");
};

nopt.typeDefs.brace_style = {
    type: "brace_style",
    validate: function(data, key, val) {
        data[key] = val;
        // TODO: expand-strict is obsolete, now identical to expand.  Remove in future version
        // TODO: collapse-preserve-inline is obselete, now identical to collapse,preserve-inline = true. Remove in future version
        var validVals = ["collapse", "collapse-preserve-inline", "expand", "end-expand", "expand-strict", "none", "preserve-inline"];
        var valSplit = val.split(/[^a-zA-Z0-9_\-]+/); //Split will always return at least one parameter
        for (var i = 0; i < valSplit.length; i++) {
            if (validVals.indexOf(valSplit[i]) === -1) {
                return false;
            }
        }
        return true;
    }
};
nopt.typeDefs.glob = {
    type: "glob",
    validate: function(data, key, val) {
        if (typeof val === 'string' && glob.hasMagic(val)) {
            // Preserve value if it contains glob magic
            data[key] = val;
            return true;
        } else {
            // Otherwise validate it as regular path
            return nopt.typeDefs.path.validate(data, key, val);
        }
    }
};
var path = require('path'),
    editorconfig = require('editorconfig'),
    knownOpts = {
        // Beautifier
        "indent_size": Number,
        "indent_char": String,
        "eol": String,
        "indent_level": Number,
        "indent_with_tabs": Boolean,
        "preserve_newlines": Boolean,
        "max_preserve_newlines": Number,
        "space_in_paren": Boolean,
        "space_in_empty_paren": Boolean,
        "jslint_happy": Boolean,
        "space_after_anon_function": Boolean,
        "space_after_named_function": Boolean,
        "brace_style": "brace_style", //See above for validation
        "unindent_chained_methods": Boolean,
        "break_chained_methods": Boolean,
        "keep_array_indentation": Boolean,
        "unescape_strings": Boolean,
        "wrap_line_length": Number,
        "wrap_attributes": ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"],
        "wrap_attributes_min_attrs": Number,
        "wrap_attributes_indent_size": Number,
        "e4x": Boolean,
        "end_with_newline": Boolean,
        "comma_first": Boolean,
        "operator_position": ["before-newline", "after-newline", "preserve-newline"],
        "indent_empty_lines": Boolean,
        "templating": [String, Array],
        // CSS-only
        "selector_separator_newline": Boolean,
        "newline_between_rules": Boolean,
        "space_around_combinator": Boolean,
        //deprecated - replaced with space_around_combinator, remove in future version
        "space_around_selector_separator": Boolean,
        // HTML-only
        "max_char": Number, // obsolete since 1.3.5
        "inline": [String, Array],
        "inline_custom_elements": [Boolean],
        "unformatted": [String, Array],
        "content_unformatted": [String, Array],
        "indent_inner_html": [Boolean],
        "indent_handlebars": [Boolean],
        "indent_scripts": ["keep", "separate", "normal"],
        "extra_liners": [String, Array],
        "unformatted_content_delimiter": String,
        // CLI
        "version": Boolean,
        "help": Boolean,
        "files": ["glob", Array],
        "outfile": path,
        "replace": Boolean,
        "quiet": Boolean,
        "type": ["js", "css", "html"],
        "config": path,
        "editorconfig": Boolean
    },
    // dasherizeShorthands provides { "indent-size": ["--indent_size"] }
    // translation, allowing more convenient dashes in CLI arguments
    shortHands = dasherizeShorthands({
        // Beautifier
        "s": ["--indent_size"],
        "c": ["--indent_char"],
        "e": ["--eol"],
        "l": ["--indent_level"],
        "t": ["--indent_with_tabs"],
        "p": ["--preserve_newlines"],
        "m": ["--max_preserve_newlines"],
        "P": ["--space_in_paren"],
        "Q": ["--space_in_empty_paren"],
        "j": ["--jslint_happy"],
        "a": ["--space_after_anon_function"],
        "b": ["--brace_style"],
        "u": ["--unindent_chained_methods"],
        "B": ["--break_chained_methods"],
        "k": ["--keep_array_indentation"],
        "x": ["--unescape_strings"],
        "w": ["--wrap_line_length"],
        "X": ["--e4x"],
        "n": ["--end_with_newline"],
        "C": ["--comma_first"],
        "O": ["--operator_position"],
        // CSS-only
        "L": ["--selector_separator_newline"],
        "N": ["--newline_between_rules"],
        // HTML-only
        "A": ["--wrap_attributes"],
        "M": ["--wrap_attributes_min_attrs"],
        "i": ["--wrap_attributes_indent_size"],
        "W": ["--max_char"], // obsolete since 1.3.5
        "d": ["--inline"],
        // no shorthand for "inline_custom_elements"
        "U": ["--unformatted"],
        "T": ["--content_unformatted"],
        "I": ["--indent_inner_html"],
        "H": ["--indent_handlebars"],
        "S": ["--indent_scripts"],
        "E": ["--extra_liners"],
        // non-dasherized hybrid shortcuts
        "good-stuff": [
            "--keep_array_indentation",
            "--keep_function_indentation",
            "--jslint_happy"
        ],
        "js": ["--type", "js"],
        "css": ["--type", "css"],
        "html": ["--type", "html"],
        // CLI
        "v": ["--version"],
        "h": ["--help"],
        "f": ["--files"],
        "file": ["--files"],
        "o": ["--outfile"],
        "r": ["--replace"],
        "q": ["--quiet"]
        // no shorthand for "config"
        // no shorthand for "editorconfig"
        // no shorthand for "indent_empty_lines"
        // no shorthad for "templating"
    });

function verifyExists(fullPath) {
    return fs.existsSync(fullPath) ? fullPath : null;
}

function findRecursive(dir, fileName) {
    var fullPath = path.join(dir, fileName);
    var nextDir = path.dirname(dir);
    var result = verifyExists(fullPath);

    if (!result && (nextDir !== dir)) {
        result = findRecursive(nextDir, fileName);
    }

    return result;
}

function getUserHome() {
    var user_home = '';
    try {
        user_home = process.env.USERPROFILE || process.env.HOME || '';
    } catch (ex) {}
    return user_home;
}

function set_file_editorconfig_opts(file, config) {
    try {
        var eConfigs = editorconfig.parseSync(file);

        if (eConfigs.indent_style === "tab") {
            config.indent_with_tabs = true;
        } else if (eConfigs.indent_style === "space") {
            config.indent_with_tabs = false;
        }

        if (eConfigs.indent_size) {
            config.indent_size = eConfigs.indent_size;
        }

        if (eConfigs.max_line_length) {
            if (eConfigs.max_line_length === "off") {
                config.wrap_line_length = 0;
            } else {
                config.wrap_line_length = parseInt(eConfigs.max_line_length, 10);
            }
        }

        if (eConfigs.insert_final_newline === true) {
            config.end_with_newline = true;
        } else if (eConfigs.insert_final_newline === false) {
            config.end_with_newline = false;
        }

        if (eConfigs.end_of_line) {
            if (eConfigs.end_of_line === 'cr') {
                config.eol = '\r';
            } else if (eConfigs.end_of_line === 'lf') {
                config.eol = '\n';
            } else if (eConfigs.end_of_line === 'crlf') {
                config.eol = '\r\n';
            }
        }
    } catch (e) {
        debug(e);
    }
}

// var cli = require('js-beautify/cli'); cli.interpret();
var interpret = exports.interpret = function(argv, slice) {
    var parsed;
    try {
        parsed = nopt(knownOpts, shortHands, argv, slice);
    } catch (ex) {
        usage(ex);
        // console.error(ex);
        // console.error('Run `' + getScriptName() + ' -h` for help.');
        process.exit(1);
    }


    if (parsed.version) {
        console.log(require('../../package.json').version);
        process.exit(0);
    } else if (parsed.help) {
        usage();
        process.exit(0);
    }

    var cfg;
    var configRecursive = findRecursive(process.cwd(), '.jsbeautifyrc');
    var configHome = verifyExists(path.join(getUserHome() || "", ".jsbeautifyrc"));
    var configDefault = __dirname + '/../config/defaults.json';

    try {
        cfg = cc(
            parsed,
            cleanOptions(cc.env('jsbeautify_'), knownOpts),
            parsed.config,
            configRecursive,
            configHome,
            configDefault
        ).snapshot;
    } catch (ex) {
        debug(cfg);
        // usage(ex);
        console.error(ex);
        console.error('Error while loading beautifier configuration.');
        console.error('Configuration file chain included:');
        if (parsed.config) {
            console.error(parsed.config);
        }
        if (configRecursive) {
            console.error(configRecursive);
        }
        if (configHome) {
            console.error(configHome);
        }
        console.error(configDefault);
        console.error('Run `' + getScriptName() + ' -h` for help.');
        process.exit(1);
    }

    try {
        // Verify arguments
        checkType(cfg);
        checkFiles(cfg);
        debug(cfg);

        // Process files synchronously to avoid EMFILE error
        cfg.files.forEach(processInputSync, {
            cfg: cfg
        });
    } catch (ex) {
        debug(cfg);
        // usage(ex);
        console.error(ex);
        console.error('Run `' + getScriptName() + ' -h` for help.');
        process.exit(1);
    }
};

// interpret args immediately when called as executable
if (require.main === module) {
    interpret();
}

function usage(err) {
    var scriptName = getScriptName();
    var msg = [
        scriptName + '@' + require('../../package.json').version,
        '',
        'CLI Options:',
        '  -f, --file       Input file(s) (Pass \'-\' for stdin)',
        '  -r, --replace    Write output in-place, replacing input',
        '  -o, --outfile    Write output to file (default stdout)',
        '  --config         Path to config file',
        '  --type           [js|css|html] ["js"]',
        '  -q, --quiet      Suppress logging to stdout',
        '  -h, --help       Show this help',
        '  -v, --version    Show the version',
        '',
        'Beautifier Options:',
        '  -s, --indent-size                 Indentation size [4]',
        '  -c, --indent-char                 Indentation character [" "]',
        '  -t, --indent-with-tabs            Indent with tabs, overrides -s and -c',
        '  -e, --eol                         Character(s) to use as line terminators.',
        '                                    [first newline in file, otherwise "\\n]',
        '  -n, --end-with-newline            End output with newline',
        '  --indent-empty-lines              Keep indentation on empty lines',
        '  --templating                      List of templating languages (auto,none,angular,django,erb,handlebars,php,smarty)',
        '                                    ["auto", auto = none in JavaScript, auto = all except angular in html (and inline javascript/css)]',
        '  --editorconfig                    Use EditorConfig to set up the options'
    ];

    switch (scriptName.split('-').shift()) {
        case "js":
            msg.push('  -l, --indent-level                Initial indentation level [0]');
            msg.push('  -p, --preserve-newlines           Preserve line-breaks (--no-preserve-newlines disables)');
            msg.push('  -m, --max-preserve-newlines       Number of line-breaks to be preserved in one chunk [10]');
            msg.push('  -P, --space-in-paren              Add padding spaces within paren, ie. f( a, b )');
            msg.push('  -E, --space-in-empty-paren        Add a single space inside empty paren, ie. f( )');
            msg.push('  -j, --jslint-happy                Enable jslint-stricter mode');
            msg.push('  -a, --space-after-anon-function   Add a space before an anonymous function\'s parens, ie. function ()');
            msg.push('  --space_after_named_function      Add a space before a named function\'s parens, ie. function example ()');
            msg.push('  -b, --brace-style                 [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]');
            msg.push('  -u, --unindent-chained-methods    Don\'t indent chained method calls');
            msg.push('  -B, --break-chained-methods       Break chained method calls across subsequent lines');
            msg.push('  -k, --keep-array-indentation      Preserve array indentation');
            msg.push('  -x, --unescape-strings            Decode printable characters encoded in xNN notation');
            msg.push('  -w, --wrap-line-length            Wrap lines that exceed N characters [0]');
            msg.push('  -X, --e4x                         Pass E4X xml literals through untouched');
            msg.push('  --good-stuff                      Warm the cockles of Crockford\'s heart');
            msg.push('  -C, --comma-first                 Put commas at the beginning of new line instead of end');
            msg.push('  -O, --operator-position           Set operator position (before-newline|after-newline|preserve-newline) [before-newline]');
            break;
        case "html":
            msg.push('  -b, --brace-style                 [collapse|expand|end-expand] ["collapse"]');
            msg.push('  -I, --indent-inner-html           Indent body and head sections. Default is false.');
            msg.push('  -H, --indent-handlebars           Indent handlebars. Default is false.');
            msg.push('  -S, --indent-scripts              [keep|separate|normal] ["normal"]');
            msg.push('  -w, --wrap-line-length            Wrap lines that exceed N characters [0]');
            msg.push('  -A, --wrap-attributes             Wrap html tag attributes to new lines [auto|force|force-aligned|force-expand-multiline|aligned-multiple|preserve|preserve-aligned] ["auto"]');
            msg.push('  -M, --wrap-attributes-min-attrs   Minimum number of html tag attributes for force wrap attribute options [2]');
            msg.push('  -i, --wrap-attributes-indent-size Indent wrapped tags to after N characters [indent-level]');
            msg.push('  -p, --preserve-newlines           Preserve line-breaks (--no-preserve-newlines disables)');
            msg.push('  -m, --max-preserve-newlines       Number of line-breaks to be preserved in one chunk [10]');
            msg.push('  -U, --unformatted                 List of tags (defaults to inline) that should not be reformatted');
            msg.push('  -T, --content_unformatted         List of tags (defaults to pre) whose content should not be reformatted');
            msg.push('  -E, --extra_liners                List of tags (defaults to [head,body,/html] that should have an extra newline');
            msg.push('  --unformatted_content_delimiter   Keep text content together between this string [""]');
            break;
        case "css":
            msg.push('  -b, --brace-style                       [collapse|expand] ["collapse"]');
            msg.push('  -L, --selector-separator-newline        Add a newline between multiple selectors.');
            msg.push('  -N, --newline-between-rules             Add a newline between CSS rules.');
    }

    if (err) {
        msg.push(err);
        msg.push('');
        console.error(msg.join('\n'));
    } else {
        console.log(msg.join('\n'));
    }
}

// main iterator, {cfg} passed as thisArg of forEach call

function processInputSync(filepath) {
    var data = null,
        config = this.cfg,
        outfile = config.outfile,
        input;

    // -o passed with no value overwrites
    if (outfile === true || config.replace) {
        outfile = filepath;
    }

    var fileType = getOutputType(outfile, filepath, config.type);

    if (config.editorconfig) {
        var editorconfig_filepath = filepath;

        if (editorconfig_filepath === '-') {
            if (outfile) {
                editorconfig_filepath = outfile;
            } else {
                editorconfig_filepath = 'stdin.' + fileType;
            }
        }

        debug("EditorConfig is enabled for ", editorconfig_filepath);
        config = cc(config).snapshot;
        set_file_editorconfig_opts(editorconfig_filepath, config);
        debug(config);
    }

    if (filepath === '-') {
        input = process.stdin;

        input.setEncoding('utf8');

        input.on('error', function() {
            throw 'Must pipe input or define at least one file.';
        });

        input.on('data', function(chunk) {
            data = data || '';
            data += chunk;
        });

        input.on('end', function() {
            if (data === null) {
                throw 'Must pipe input or define at least one file.';
            }
            makePretty(fileType, data, config, outfile, writePretty); // Where things get beautified
        });

        input.resume();

    } else {
        data = fs.readFileSync(filepath, 'utf8');
        makePretty(fileType, data, config, outfile, writePretty);
    }
}

function makePretty(fileType, code, config, outfile, callback) {
    try {
        var pretty = beautify[fileType](code, config);

        callback(null, pretty, outfile, config);
    } catch (ex) {
        callback(ex);
    }
}

function writePretty(err, pretty, outfile, config) {
    debug('writing ' + outfile);
    if (err) {
        console.error(err);
        process.exit(1);
    }

    if (outfile) {
        fs.mkdirSync(path.dirname(outfile), { recursive: true });

        if (isFileDifferent(outfile, pretty)) {
            try {
                fs.writeFileSync(outfile, pretty, 'utf8');
                logToStdout('beautified ' + path.relative(process.cwd(), outfile), config);
            } catch (ex) {
                onOutputError(ex);
            }
        } else {
            logToStdout('beautified ' + path.relative(process.cwd(), outfile) + ' - unchanged', config);
        }
    } else {
        process.stdout.write(pretty);
    }
}

function isFileDifferent(filePath, expected) {
    try {
        return fs.readFileSync(filePath, 'utf8') !== expected;
    } catch (ex) {
        // failing to read is the same as different
        return true;
    }
}

// workaround the fact that nopt.clean doesn't return the object passed in :P

function cleanOptions(data, types) {
    nopt.clean(data, types);
    return data;
}

// error handler for output stream that swallows errors silently,
// allowing the loop to continue over unwritable files.

function onOutputError(err) {
    if (err.code === 'EACCES') {
        console.error(err.path + " is not writable. Skipping!");
    } else {
        console.error(err);
        process.exit(0);
    }
}

// turn "--foo_bar" into "foo-bar"

function dasherizeFlag(str) {
    return str.replace(/^\-+/, '').replace(/_/g, '-');
}

// translate weird python underscored keys into dashed argv,
// avoiding single character aliases.

function dasherizeShorthands(hash) {
    // operate in-place
    Object.keys(hash).forEach(function(key) {
        // each key value is an array
        var val = hash[key][0];
        // only dasherize one-character shorthands
        if (key.length === 1 && val.indexOf('_') > -1) {
            hash[dasherizeFlag(val)] = val;
        }
    });

    return hash;
}

function getOutputType(outfile, filepath, configType) {
    if (outfile && /\.(js|css|html)$/.test(outfile)) {
        return outfile.split('.').pop();
    } else if (filepath !== '-' && /\.(js|css|html)$/.test(filepath)) {
        return filepath.split('.').pop();
    } else if (configType) {
        return configType;
    } else {
        throw 'Could not determine appropriate beautifier from file paths: ' + filepath;
    }
}

function getScriptName() {
    return path.basename(process.argv[1]);
}

function checkType(parsed) {
    var scriptType = getScriptName().split('-').shift();
    if (!/^(js|css|html)$/.test(scriptType)) {
        scriptType = null;
    }

    debug("executable type:", scriptType);

    var parsedType = parsed.type;
    debug("parsed type:", parsedType);

    if (!parsedType) {
        debug("type defaulted:", scriptType);
        parsed.type = scriptType;
    }
}

function checkFiles(parsed) {
    var argv = parsed.argv;
    var isTTY = true;
    var file_params = parsed.files || [];
    var hadGlob = false;

    try {
        isTTY = process.stdin.isTTY;
    } catch (ex) {
        debug("error querying for isTTY:", ex);
    }

    debug('isTTY: ' + isTTY);

    // assume any remaining args are files
    file_params = file_params.concat(argv.remain);

    parsed.files = [];
    // assume any remaining args are files
    file_params.forEach(function(f) {
        // strip stdin path eagerly added by nopt in '-f -' case
        if (f === '-') {
            return;
        }

        var foundFiles = [];
        var isGlob = glob.hasMagic(f);

        // Input was a glob
        if (isGlob) {
            hadGlob = true;
            foundFiles = globSync(f, {
                absolute: true,
                ignore: ['**/node_modules/**', '**/.git/**']
            });
        } else {
            // Input was not a glob, add it to an array so we are able to handle it in the same loop below
            try {
                testFilePath(f);
            } catch (err) {
                // if file is not found, and the resolved path indicates stdin marker
                if (path.parse(f).base === '-') {
                    f = '-';
                } else {
                    throw err;
                }
            }
            foundFiles = [f];
        }

        if (foundFiles && foundFiles.length) {
            // Add files to the parsed.files if it didn't exist in the array yet
            foundFiles.forEach(function(file) {
                var filePath = path.resolve(file);
                if (file === '-') { // case of stdin
                    parsed.files.push(file);
                } else if (parsed.files.indexOf(filePath) === -1) {
                    parsed.files.push(filePath);
                }
            });
        }
    });

    if ('string' === typeof parsed.outfile && isTTY && !parsed.files.length) {
        testFilePath(parsed.outfile);
        // use outfile as input when no other files passed in args
        parsed.files.push(parsed.outfile);
        // operation is now an implicit overwrite
        parsed.replace = true;
    }

    if (hadGlob || parsed.files.length > 1) {
        parsed.replace = true;
    }

    if (!parsed.files.length && !hadGlob) {
        // read stdin by default
        parsed.files.push('-');
    }

    debug('files.length ' + parsed.files.length);

    if (parsed.files.indexOf('-') > -1 && isTTY && !hadGlob) {
        throw 'Must pipe input or define at least one file.';
    }

    return parsed;
}

function testFilePath(filepath) {
    try {
        if (filepath !== "-") {
            fs.statSync(filepath);
        }
    } catch (err) {
        throw 'Unable to open path "' + filepath + '"';
    }
}

function logToStdout(str, config) {
    if (typeof config.quiet === "undefined" || !config.quiet) {
        console.log(str);
    }
}

================================================
FILE: js/src/core/directives.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

function Directives(start_block_pattern, end_block_pattern) {
  start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
  end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
  this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
  this.__directive_pattern = / (\w+)[:](\w+)/g;

  this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
}

Directives.prototype.get_directives = function(text) {
  if (!text.match(this.__directives_block_pattern)) {
    return null;
  }

  var directives = {};
  this.__directive_pattern.lastIndex = 0;
  var directive_match = this.__directive_pattern.exec(text);

  while (directive_match) {
    directives[directive_match[1]] = directive_match[2];
    directive_match = this.__directive_pattern.exec(text);
  }

  return directives;
};

Directives.prototype.readIgnored = function(input) {
  return input.readUntilAfter(this.__directives_end_ignore_pattern);
};


module.exports.Directives = Directives;


================================================
FILE: js/src/core/inputscanner.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');

function InputScanner(input_string) {
  this.__input = input_string || '';
  this.__input_length = this.__input.length;
  this.__position = 0;
}

InputScanner.prototype.restart = function() {
  this.__position = 0;
};

InputScanner.prototype.back = function() {
  if (this.__position > 0) {
    this.__position -= 1;
  }
};

InputScanner.prototype.hasNext = function() {
  return this.__position < this.__input_length;
};

InputScanner.prototype.next = function() {
  var val = null;
  if (this.hasNext()) {
    val = this.__input.charAt(this.__position);
    this.__position += 1;
  }
  return val;
};

InputScanner.prototype.peek = function(index) {
  var val = null;
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__input_length) {
    val = this.__input.charAt(index);
  }
  return val;
};

// This is a JavaScript only helper function (not in python)
// Javascript doesn't have a match method
// and not all implementation support "sticky" flag.
// If they do not support sticky then both this.match() and this.test() method
// must get the match and check the index of the match.
// If sticky is supported and set, this method will use it.
// Otherwise it will check that global is set, and fall back to the slower method.
InputScanner.prototype.__match = function(pattern, index) {
  pattern.lastIndex = index;
  var pattern_match = pattern.exec(this.__input);

  if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
    if (pattern_match.index !== index) {
      pattern_match = null;
    }
  }

  return pattern_match;
};

InputScanner.prototype.test = function(pattern, index) {
  index = index || 0;
  index += this.__position;

  if (index >= 0 && index < this.__input_length) {
    return !!this.__match(pattern, index);
  } else {
    return false;
  }
};

InputScanner.prototype.testChar = function(pattern, index) {
  // test one character regex match
  var val = this.peek(index);
  pattern.lastIndex = 0;
  return val !== null && pattern.test(val);
};

InputScanner.prototype.match = function(pattern) {
  var pattern_match = this.__match(pattern, this.__position);
  if (pattern_match) {
    this.__position += pattern_match[0].length;
  } else {
    pattern_match = null;
  }
  return pattern_match;
};

InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
  var val = '';
  var match;
  if (starting_pattern) {
    match = this.match(starting_pattern);
    if (match) {
      val += match[0];
    }
  }
  if (until_pattern && (match || !starting_pattern)) {
    val += this.readUntil(until_pattern, until_after);
  }
  return val;
};

InputScanner.prototype.readUntil = function(pattern, until_after) {
  var val = '';
  var match_index = this.__position;
  pattern.lastIndex = this.__position;
  var pattern_match = pattern.exec(this.__input);
  if (pattern_match) {
    match_index = pattern_match.index;
    if (until_after) {
      match_index += pattern_match[0].length;
    }
  } else {
    match_index = this.__input_length;
  }

  val = this.__input.substring(this.__position, match_index);
  this.__position = match_index;
  return val;
};

InputScanner.prototype.readUntilAfter = function(pattern) {
  return this.readUntil(pattern, true);
};

InputScanner.prototype.get_regexp = function(pattern, match_from) {
  var result = null;
  var flags = 'g';
  if (match_from && regexp_has_sticky) {
    flags = 'y';
  }
  // strings are converted to regexp
  if (typeof pattern === "string" && pattern !== '') {
    // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags);
    result = new RegExp(pattern, flags);
  } else if (pattern) {
    result = new RegExp(pattern.source, flags);
  }
  return result;
};

InputScanner.prototype.get_literal_regexp = function(literal_string) {
  return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
};

/* css beautifier legacy helpers */
InputScanner.prototype.peekUntilAfter = function(pattern) {
  var start = this.__position;
  var val = this.readUntilAfter(pattern);
  this.__position = start;
  return val;
};

InputScanner.prototype.lookBack = function(testVal) {
  var start = this.__position - 1;
  return start >= testVal.length && this.__input.substring(start - testVal.length, start)
    .toLowerCase() === testVal;
};

module.exports.InputScanner = InputScanner;


================================================
FILE: js/src/core/options.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

function Options(options, merge_child_field) {
  this.raw_options = _mergeOpts(options, merge_child_field);

  // Support passing the source text back with no change
  this.disabled = this._get_boolean('disabled');

  this.eol = this._get_characters('eol', 'auto');
  this.end_with_newline = this._get_boolean('end_with_newline');
  this.indent_size = this._get_number('indent_size', 4);
  this.indent_char = this._get_characters('indent_char', ' ');
  this.indent_level = this._get_number('indent_level');

  this.preserve_newlines = this._get_boolean('preserve_newlines', true);
  this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
  if (!this.preserve_newlines) {
    this.max_preserve_newlines = 0;
  }

  this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
  if (this.indent_with_tabs) {
    this.indent_char = '\t';

    // indent_size behavior changed after 1.8.6
    // It used to be that indent_size would be
    // set to 1 for indent_with_tabs. That is no longer needed and
    // actually doesn't make sense - why not use spaces? Further,
    // that might produce unexpected behavior - tabs being used
    // for single-column alignment. So, when indent_with_tabs is true
    // and indent_size is 1, reset indent_size to 4.
    if (this.indent_size === 1) {
      this.indent_size = 4;
    }
  }

  // Backwards compat with 1.3.x
  this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));

  this.indent_empty_lines = this._get_boolean('indent_empty_lines');

  // valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty', 'angular']
  // For now, 'auto' = all off for javascript, all except angular on for html (and inline javascript/css).
  // other values ignored
  this.templating = this._get_selection_list('templating', ['auto', 'none', 'angular', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
}

Options.prototype._get_array = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || [];
  if (typeof option_value === 'object') {
    if (option_value !== null && typeof option_value.concat === 'function') {
      result = option_value.concat();
    }
  } else if (typeof option_value === 'string') {
    result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
  }
  return result;
};

Options.prototype._get_boolean = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = option_value === undefined ? !!default_value : !!option_value;
  return result;
};

Options.prototype._get_characters = function(name, default_value) {
  var option_value = this.raw_options[name];
  var result = default_value || '';
  if (typeof option_value === 'string') {
    result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
  }
  return result;
};

Options.prototype._get_number = function(name, default_value) {
  var option_value = this.raw_options[name];
  default_value = parseInt(default_value, 10);
  if (isNaN(default_value)) {
    default_value = 0;
  }
  var result = parseInt(option_value, 10);
  if (isNaN(result)) {
    result = default_value;
  }
  return result;
};

Options.prototype._get_selection = function(name, selection_list, default_value) {
  var result = this._get_selection_list(name, selection_list, default_value);
  if (result.length !== 1) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }

  return result[0];
};


Options.prototype._get_selection_list = function(name, selection_list, default_value) {
  if (!selection_list || selection_list.length === 0) {
    throw new Error("Selection list cannot be empty.");
  }

  default_value = default_value || [selection_list[0]];
  if (!this._is_valid_selection(default_value, selection_list)) {
    throw new Error("Invalid Default Value!");
  }

  var result = this._get_array(name, default_value);
  if (!this._is_valid_selection(result, selection_list)) {
    throw new Error(
      "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
      selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
  }

  return result;
};

Options.prototype._is_valid_selection = function(result, selection_list) {
  return result.length && selection_list.length &&
    !result.some(function(item) { return selection_list.indexOf(item) === -1; });
};


// merges child options up with the parent options object
// Example: obj = {a: 1, b: {a: 2}}
//          mergeOpts(obj, 'b')
//
//          Returns: {a: 2}
function _mergeOpts(allOptions, childFieldName) {
  var finalOpts = {};
  allOptions = _normalizeOpts(allOptions);
  var name;

  for (name in allOptions) {
    if (name !== childFieldName) {
      finalOpts[name] = allOptions[name];
    }
  }

  //merge in the per type settings for the childFieldName
  if (childFieldName && allOptions[childFieldName]) {
    for (name in allOptions[childFieldName]) {
      finalOpts[name] = allOptions[childFieldName][name];
    }
  }
  return finalOpts;
}

function _normalizeOpts(options) {
  var convertedOpts = {};
  var key;

  for (key in options) {
    var newKey = key.replace(/-/g, "_");
    convertedOpts[newKey] = options[key];
  }
  return convertedOpts;
}

module.exports.Options = Options;
module.exports.normalizeOpts = _normalizeOpts;
module.exports.mergeOpts = _mergeOpts;


================================================
FILE: js/src/core/output.js
================================================
/*jshint node:true */
/*
  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

function OutputLine(parent) {
  this.__parent = parent;
  this.__character_count = 0;
  // use indent_count as a marker for this.__lines that have preserved indentation
  this.__indent_count = -1;
  this.__alignment_count = 0;
  this.__wrap_point_index = 0;
  this.__wrap_point_character_count = 0;
  this.__wrap_point_indent_count = -1;
  this.__wrap_point_alignment_count = 0;

  this.__items = [];
}

OutputLine.prototype.clone_empty = function() {
  var line = new OutputLine(this.__parent);
  line.set_indent(this.__indent_count, this.__alignment_count);
  return line;
};

OutputLine.prototype.item = function(index) {
  if (index < 0) {
    return this.__items[this.__items.length + index];
  } else {
    return this.__items[index];
  }
};

OutputLine.prototype.has_match = function(pattern) {
  for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
    if (this.__items[lastCheckedOutput].match(pattern)) {
      return true;
    }
  }
  return false;
};

OutputLine.prototype.set_indent = function(indent, alignment) {
  if (this.is_empty()) {
    this.__indent_count = indent || 0;
    this.__alignment_count = alignment || 0;
    this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
  }
};

OutputLine.prototype._set_wrap_point = function() {
  if (this.__parent.wrap_line_length) {
    this.__wrap_point_index = this.__items.length;
    this.__wrap_point_character_count = this.__character_count;
    this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
    this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
  }
};

OutputLine.prototype._should_wrap = function() {
  return this.__wrap_point_index &&
    this.__character_count > this.__parent.wrap_line_length &&
    this.__wrap_point_character_count > this.__parent.next_line.__character_count;
};

OutputLine.prototype._allow_wrap = function() {
  if (this._should_wrap()) {
    this.__parent.add_new_line();
    var next = this.__parent.current_line;
    next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
    next.__items = this.__items.slice(this.__wrap_point_index);
    this.__items = this.__items.slice(0, this.__wrap_point_index);

    next.__character_count += this.__character_count - this.__wrap_point_character_count;
    this.__character_count = this.__wrap_point_character_count;

    if (next.__items[0] === " ") {
      next.__items.splice(0, 1);
      next.__character_count -= 1;
    }
    return true;
  }
  return false;
};

OutputLine.prototype.is_empty = function() {
  return this.__items.length === 0;
};

OutputLine.prototype.last = function() {
  if (!this.is_empty()) {
    return this.__items[this.__items.length - 1];
  } else {
    return null;
  }
};

OutputLine.prototype.push = function(item) {
  this.__items.push(item);
  var last_newline_index = item.lastIndexOf('\n');
  if (last_newline_index !== -1) {
    this.__character_count = item.length - last_newline_index;
  } else {
    this.__character_count += item.length;
  }
};

OutputLine.prototype.pop = function() {
  var item = null;
  if (!this.is_empty()) {
    item = this.__items.pop();
    this.__character_count -= item.length;
  }
  return item;
};


OutputLine.prototype._remove_indent = function() {
  if (this.__indent_count > 0) {
    this.__indent_count -= 1;
    this.__character_count -= this.__parent.indent_size;
  }
};

OutputLine.prototype._remove_wrap_indent = function() {
  if (this.__wrap_point_indent_count > 0) {
    this.__wrap_point_indent_count -= 1;
  }
};
OutputLine.prototype.trim = function() {
  while (this.last() === ' ') {
    this.__items.pop();
    this.__character_count -= 1;
  }
};

OutputLine.prototype.toString = function() {
  var result = '';
  if (this.is_empty()) {
    if (this.__parent.indent_empty_lines) {
      result = this.__parent.get_indent_string(this.__indent_count);
    }
  } else {
    result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
    result += this.__items.join('');
  }
  return result;
};

function IndentStringCache(options, baseIndentString) {
  this.__cache = [''];
  this.__indent_size = options.indent_size;
  this.__indent_string = options.indent_char;
  if (!options.indent_with_tabs) {
    this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
  }

  // Set to null to continue support for auto detection of base indent
  baseIndentString = baseIndentString || '';
  if (options.indent_level > 0) {
    baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
  }

  this.__base_string = baseIndentString;
  this.__base_string_length = baseIndentString.length;
}

IndentStringCache.prototype.get_indent_size = function(indent, column) {
  var result = this.__base_string_length;
  column = column || 0;
  if (indent < 0) {
    result = 0;
  }
  result += indent * this.__indent_size;
  result += column;
  return result;
};

IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
  var result = this.__base_string;
  column = column || 0;
  if (indent_level < 0) {
    indent_level = 0;
    result = '';
  }
  column += indent_level * this.__indent_size;
  this.__ensure_cache(column);
  result += this.__cache[column];
  return result;
};

IndentStringCache.prototype.__ensure_cache = function(column) {
  while (column >= this.__cache.length) {
    this.__add_column();
  }
};

IndentStringCache.prototype.__add_column = function() {
  var column = this.__cache.length;
  var indent = 0;
  var result = '';
  if (this.__indent_size && column >= this.__indent_size) {
    indent = Math.floor(column / this.__indent_size);
    column -= indent * this.__indent_size;
    result = new Array(indent + 1).join(this.__indent_string);
  }
  if (column) {
    result += new Array(column + 1).join(' ');
  }

  this.__cache.push(result);
};

function Output(options, baseIndentString) {
  this.__indent_cache = new IndentStringCache(options, baseIndentString);
  this.raw = false;
  this._end_with_newline = options.end_with_newline;
  this.indent_size = options.indent_size;
  this.wrap_line_length = options.wrap_line_length;
  this.indent_empty_lines = options.indent_empty_lines;
  this.__lines = [];
  this.previous_line = null;
  this.current_line = null;
  this.next_line = new OutputLine(this);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
  // initialize
  this.__add_outputline();
}

Output.prototype.__add_outputline = function() {
  this.previous_line = this.current_line;
  this.current_line = this.next_line.clone_empty();
  this.__lines.push(this.current_line);
};

Output.prototype.get_line_number = function() {
  return this.__lines.length;
};

Output.prototype.get_indent_string = function(indent, column) {
  return this.__indent_cache.get_indent_string(indent, column);
};

Output.prototype.get_indent_size = function(indent, column) {
  return this.__indent_cache.get_indent_size(indent, column);
};

Output.prototype.is_empty = function() {
  return !this.previous_line && this.current_line.is_empty();
};

Output.prototype.add_new_line = function(force_newline) {
  // never newline at the start of file
  // otherwise, newline only if we didn't just add one or we're forced
  if (this.is_empty() ||
    (!force_newline && this.just_added_newline())) {
    return false;
  }

  // if raw output is enabled, don't print additional newlines,
  // but still return True as though you had
  if (!this.raw) {
    this.__add_outputline();
  }
  return true;
};

Output.prototype.get_code = function(eol) {
  this.trim(true);

  // handle some edge cases where the last tokens
  // has text that ends with newline(s)
  var last_item = this.current_line.pop();
  if (last_item) {
    if (last_item[last_item.length - 1] === '\n') {
      last_item = last_item.replace(/\n+$/g, '');
    }
    this.current_line.push(last_item);
  }

  if (this._end_with_newline) {
    this.__add_outputline();
  }

  var sweet_code = this.__lines.join('\n');

  if (eol !== '\n') {
    sweet_code = sweet_code.replace(/[\n]/g, eol);
  }
  return sweet_code;
};

Output.prototype.set_wrap_point = function() {
  this.current_line._set_wrap_point();
};

Output.prototype.set_indent = function(indent, alignment) {
  indent = indent || 0;
  alignment = alignment || 0;

  // Next line stores alignment values
  this.next_line.set_indent(indent, alignment);

  // Never indent your first output indent at the start of the file
  if (this.__lines.length > 1) {
    this.current_line.set_indent(indent, alignment);
    return true;
  }

  this.current_line.set_indent();
  return false;
};

Output.prototype.add_raw_token = function(token) {
  for (var x = 0; x < token.newlines; x++) {
    this.__add_outputline();
  }
  this.current_line.set_indent(-1);
  this.current_line.push(token.whitespace_before);
  this.current_line.push(token.text);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = false;
};

Output.prototype.add_token = function(printable_token) {
  this.__add_space_before_token();
  this.current_line.push(printable_token);
  this.space_before_token = false;
  this.non_breaking_space = false;
  this.previous_token_wrapped = this.current_line._allow_wrap();
};

Output.prototype.__add_space_before_token = function() {
  if (this.space_before_token && !this.just_added_newline()) {
    if (!this.non_breaking_space) {
      this.set_wrap_point();
    }
    this.current_line.push(' ');
  }
};

Output.prototype.remove_indent = function(index) {
  var output_length = this.__lines.length;
  while (index < output_length) {
    this.__lines[index]._remove_indent();
    index++;
  }
  this.current_line._remove_wrap_indent();
};

Output.prototype.trim = function(eat_newlines) {
  eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;

  this.current_line.trim();

  while (eat_newlines && this.__lines.length > 1 &&
    this.current_line.is_empty()) {
    this.__lines.pop();
    this.current_line = this.__lines[this.__lines.length - 1];
    this.current_line.trim();
  }

  this.previous_line = this.__lines.length > 1 ?
    this.__lines[this.__lines.length - 2] : null;
};

Output.prototype.just_added_newline = function() {
  return this.current_line.is_empty();
};

Output.prototype.just_added_blankline = function() {
  return this.is_empty() ||
    (this.current_line.is_empty() && this.previous_line.is_empty());
};

Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
  var index = this.__lines.length - 2;
  while (index >= 0) {
    var potentialEmptyLine = this.__lines[index];
    if (potentialEmptyLine.is_empty()) {
      break;
    } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
      potentialEmptyLine.item(-1) !== ends_with) {
      this.__lines.splice(index + 1, 0, new OutputLine(this));
      this.previous_line = this.__lines[this.__lines.length - 2];
      break;
    }
    index--;
  }
};

module.exports.Output = Output;


================================================
FILE: js/src/core/pattern.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

function Pattern(input_scanner, parent) {
  this._input = input_scanner;
  this._starting_pattern = null;
  this._match_pattern = null;
  this._until_pattern = null;
  this._until_after = false;

  if (parent) {
    this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);
    this._match_pattern = this._input.get_regexp(parent._match_pattern, true);
    this._until_pattern = this._input.get_regexp(parent._until_pattern);
    this._until_after = parent._until_after;
  }
}

Pattern.prototype.read = function() {
  var result = this._input.read(this._starting_pattern);
  if (!this._starting_pattern || result) {
    result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);
  }
  return result;
};

Pattern.prototype.read_match = function() {
  return this._input.match(this._match_pattern);
};

Pattern.prototype.until_after = function(pattern) {
  var result = this._create();
  result._until_after = true;
  result._until_pattern = this._input.get_regexp(pattern);
  result._update();
  return result;
};

Pattern.prototype.until = function(pattern) {
  var result = this._create();
  result._until_after = false;
  result._until_pattern = this._input.get_regexp(pattern);
  result._update();
  return result;
};

Pattern.prototype.starting_with = function(pattern) {
  var result = this._create();
  result._starting_pattern = this._input.get_regexp(pattern, true);
  result._update();
  return result;
};

Pattern.prototype.matching = function(pattern) {
  var result = this._create();
  result._match_pattern = this._input.get_regexp(pattern, true);
  result._update();
  return result;
};

Pattern.prototype._create = function() {
  return new Pattern(this._input, this);
};

Pattern.prototype._update = function() {};

module.exports.Pattern = Pattern;


================================================
FILE: js/src/core/templatablepattern.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

var Pattern = require('./pattern').Pattern;


var template_names = {
  django: false,
  erb: false,
  handlebars: false,
  php: false,
  smarty: false,
  angular: false
};

// This lets templates appear anywhere we would do a readUntil
// The cost is higher but it is pay to play.
function TemplatablePattern(input_scanner, parent) {
  Pattern.call(this, input_scanner, parent);
  this.__template_pattern = null;
  this._disabled = Object.assign({}, template_names);
  this._excluded = Object.assign({}, template_names);

  if (parent) {
    this.__template_pattern = this._input.get_regexp(parent.__template_pattern);
    this._excluded = Object.assign(this._excluded, parent._excluded);
    this._disabled = Object.assign(this._disabled, parent._disabled);
  }
  var pattern = new Pattern(input_scanner);
  this.__patterns = {
    handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),
    handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),
    handlebars: pattern.starting_with(/{{/).until_after(/}}/),
    php: pattern.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
    erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),
    // django coflicts with handlebars a bit.
    django: pattern.starting_with(/{%/).until_after(/%}/),
    django_value: pattern.starting_with(/{{/).until_after(/}}/),
    django_comment: pattern.starting_with(/{#/).until_after(/#}/),
    smarty: pattern.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
    smarty_comment: pattern.starting_with(/{\*/).until_after(/\*}/),
    smarty_literal: pattern.starting_with(/{literal}/).until_after(/{\/literal}/)
  };
}
TemplatablePattern.prototype = new Pattern();

TemplatablePattern.prototype._create = function() {
  return new TemplatablePattern(this._input, this);
};

TemplatablePattern.prototype._update = function() {
  this.__set_templated_pattern();
};

TemplatablePattern.prototype.disable = function(language) {
  var result = this._create();
  result._disabled[language] = true;
  result._update();
  return result;
};

TemplatablePattern.prototype.read_options = function(options) {
  var result = this._create();
  for (var language in template_names) {
    result._disabled[language] = options.templating.indexOf(language) === -1;
  }
  result._update();
  return result;
};

TemplatablePattern.prototype.exclude = function(language) {
  var result = this._create();
  result._excluded[language] = true;
  result._update();
  return result;
};

TemplatablePattern.prototype.read = function() {
  var result = '';
  if (this._match_pattern) {
    result = this._input.read(this._starting_pattern);
  } else {
    result = this._input.read(this._starting_pattern, this.__template_pattern);
  }
  var next = this._read_template();
  while (next) {
    if (this._match_pattern) {
      next += this._input.read(this._match_pattern);
    } else {
      next += this._input.readUntil(this.__template_pattern);
    }
    result += next;
    next = this._read_template();
  }

  if (this._until_after) {
    result += this._input.readUntilAfter(this._until_pattern);
  }
  return result;
};

TemplatablePattern.prototype.__set_templated_pattern = function() {
  var items = [];

  if (!this._disabled.php) {
    items.push(this.__patterns.php._starting_pattern.source);
  }
  if (!this._disabled.handlebars) {
    items.push(this.__patterns.handlebars._starting_pattern.source);
  }
  if (!this._disabled.angular) {
    // Handlebars ('{{' and '}}') are also special tokens in Angular)
    items.push(this.__patterns.handlebars._starting_pattern.source);
  }
  if (!this._disabled.erb) {
    items.push(this.__patterns.erb._starting_pattern.source);
  }
  if (!this._disabled.django) {
    items.push(this.__patterns.django._starting_pattern.source);
    // The starting pattern for django is more complex because it has different
    // patterns for value, comment, and other sections
    items.push(this.__patterns.django_value._starting_pattern.source);
    items.push(this.__patterns.django_comment._starting_pattern.source);
  }
  if (!this._disabled.smarty) {
    items.push(this.__patterns.smarty._starting_pattern.source);
  }

  if (this._until_pattern) {
    items.push(this._until_pattern.source);
  }
  this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');
};

TemplatablePattern.prototype._read_template = function() {
  var resulting_string = '';
  var c = this._input.peek();
  if (c === '<') {
    var peek1 = this._input.peek(1);
    //if we're in a comment, do something special
    // We treat all comments as literals, even more than preformatted tags
    // we just look for the appropriate close tag
    if (!this._disabled.php && !this._excluded.php && peek1 === '?') {
      resulting_string = resulting_string ||
        this.__patterns.php.read();
    }
    if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {
      resulting_string = resulting_string ||
        this.__patterns.erb.read();
    }
  } else if (c === '{') {
    if (!this._disabled.handlebars && !this._excluded.handlebars) {
      resulting_string = resulting_string ||
        this.__patterns.handlebars_comment.read();
      resulting_string = resulting_string ||
        this.__patterns.handlebars_unescaped.read();
      resulting_string = resulting_string ||
        this.__patterns.handlebars.read();
    }
    if (!this._disabled.django) {
      // django coflicts with handlebars a bit.
      if (!this._excluded.django && !this._excluded.handlebars) {
        resulting_string = resulting_string ||
          this.__patterns.django_value.read();
      }
      if (!this._excluded.django) {
        resulting_string = resulting_string ||
          this.__patterns.django_comment.read();
        resulting_string = resulting_string ||
          this.__patterns.django.read();
      }
    }
    if (!this._disabled.smarty) {
      // smarty cannot be enabled with django or handlebars enabled
      if (this._disabled.django && this._disabled.handlebars) {
        resulting_string = resulting_string ||
          this.__patterns.smarty_comment.read();
        resulting_string = resulting_string ||
          this.__patterns.smarty_literal.read();
        resulting_string = resulting_string ||
          this.__patterns.smarty.read();
      }
    }
  }
  return resulting_string;
};


module.exports.TemplatablePattern = TemplatablePattern;


================================================
FILE: js/src/core/token.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

function Token(type, text, newlines, whitespace_before) {
  this.type = type;
  this.text = text;

  // comments_before are
  // comments that have a new line before them
  // and may or may not have a newline after
  // this is a set of comments before
  this.comments_before = null; /* inline comment*/


  // this.comments_after =  new TokenStream(); // no new line before and newline after
  this.newlines = newlines || 0;
  this.whitespace_before = whitespace_before || '';
  this.parent = null;
  this.next = null;
  this.previous = null;
  this.opened = null;
  this.closed = null;
  this.directives = null;
}


module.exports.Token = Token;


================================================
FILE: js/src/core/tokenizer.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

var InputScanner = require('../core/inputscanner').InputScanner;
var Token = require('../core/token').Token;
var TokenStream = require('../core/tokenstream').TokenStream;
var WhitespacePattern = require('./whitespacepattern').WhitespacePattern;

var TOKEN = {
  START: 'TK_START',
  RAW: 'TK_RAW',
  EOF: 'TK_EOF'
};

var Tokenizer = function(input_string, options) {
  this._input = new InputScanner(input_string);
  this._options = options || {};
  this.__tokens = null;

  this._patterns = {};
  this._patterns.whitespace = new WhitespacePattern(this._input);
};

Tokenizer.prototype.tokenize = function() {
  this._input.restart();
  this.__tokens = new TokenStream();

  this._reset();

  var current;
  var previous = new Token(TOKEN.START, '');
  var open_token = null;
  var open_stack = [];
  var comments = new TokenStream();

  while (previous.type !== TOKEN.EOF) {
    current = this._get_next_token(previous, open_token);
    while (this._is_comment(current)) {
      comments.add(current);
      current = this._get_next_token(previous, open_token);
    }

    if (!comments.isEmpty()) {
      current.comments_before = comments;
      comments = new TokenStream();
    }

    current.parent = open_token;

    if (this._is_opening(current)) {
      open_stack.push(open_token);
      open_token = current;
    } else if (open_token && this._is_closing(current, open_token)) {
      current.opened = open_token;
      open_token.closed = current;
      open_token = open_stack.pop();
      current.parent = open_token;
    }

    current.previous = previous;
    previous.next = current;

    this.__tokens.add(current);
    previous = current;
  }

  return this.__tokens;
};


Tokenizer.prototype._is_first_token = function() {
  return this.__tokens.isEmpty();
};

Tokenizer.prototype._reset = function() {};

Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
  this._readWhitespace();
  var resulting_string = this._input.read(/.+/g);
  if (resulting_string) {
    return this._create_token(TOKEN.RAW, resulting_string);
  } else {
    return this._create_token(TOKEN.EOF, '');
  }
};

Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
  return false;
};

Tokenizer.prototype._is_opening = function(current_token) { // jshint unused:false
  return false;
};

Tokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false
  return false;
};

Tokenizer.prototype._create_token = function(type, text) {
  var token = new Token(type, text,
    this._patterns.whitespace.newline_count,
    this._patterns.whitespace.whitespace_before_token);
  return token;
};

Tokenizer.prototype._readWhitespace = function() {
  return this._patterns.whitespace.read();
};



module.exports.Tokenizer = Tokenizer;
module.exports.TOKEN = TOKEN;


================================================
FILE: js/src/core/tokenstream.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/

'use strict';

function TokenStream(parent_token) {
  // private
  this.__tokens = [];
  this.__tokens_length = this.__tokens.length;
  this.__position = 0;
  this.__parent_token = parent_token;
}

TokenStream.prototype.restart = function() {
  this.__position = 0;
};

TokenStream.prototype.isEmpty = function() {
  return this.__tokens_length === 0;
};

TokenStream.prototype.hasNext = function() {
  return this.__position < this.__tokens_length;
};

TokenStream.prototype.next = function() {
  var val = null;
  if (this.hasNext()) {
    val = this.__tokens[this.__position];
    this.__position += 1;
  }
  return val;
};

TokenStream.prototype.peek = function(index) {
  var val = null;
  index = index || 0;
  index += this.__position;
  if (index >= 0 && index < this.__tokens_length) {
    val = this.__tokens[index];
  }
  return val;
};

TokenStream.prototype.add = function(token) {
  if (this.__parent_token) {
    token.parent = this.__parent_token;
  }
  this.__tokens.push(token);
  this.__tokens_length += 1;
};

module.exports.TokenStream = TokenStream;


================================================
FILE: js/src/core/whitespacepattern.js
================================================
/*jshint node:true */
/*

  The MIT License (MIT)

  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS O
Download .txt
gitextract_sjeuf_wc/

├── .codeclimate.yml
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── beautification-problem.md
│   │   ├── feature_request.md
│   │   └── question-about-usage.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── codeql-analysis.yml
│       ├── main.yml
│       ├── milestone-publish.yml
│       ├── pr-staging.yml
│       └── ssh_config.txt
├── .gitignore
├── .jshintignore
├── .jshintrc
├── .npmignore
├── .pylintrc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── bower.json
├── index.html
├── js/
│   ├── bin/
│   │   ├── css-beautify.js
│   │   ├── html-beautify.js
│   │   └── js-beautify.js
│   ├── config/
│   │   └── defaults.json
│   ├── index.js
│   ├── src/
│   │   ├── cli.js
│   │   ├── core/
│   │   │   ├── directives.js
│   │   │   ├── inputscanner.js
│   │   │   ├── options.js
│   │   │   ├── output.js
│   │   │   ├── pattern.js
│   │   │   ├── templatablepattern.js
│   │   │   ├── token.js
│   │   │   ├── tokenizer.js
│   │   │   ├── tokenstream.js
│   │   │   └── whitespacepattern.js
│   │   ├── css/
│   │   │   ├── beautifier.js
│   │   │   ├── index.js
│   │   │   ├── options.js
│   │   │   └── tokenizer.js
│   │   ├── html/
│   │   │   ├── beautifier.js
│   │   │   ├── index.js
│   │   │   ├── options.js
│   │   │   └── tokenizer.js
│   │   ├── index.js
│   │   ├── javascript/
│   │   │   ├── acorn.js
│   │   │   ├── beautifier.js
│   │   │   ├── index.js
│   │   │   ├── options.js
│   │   │   └── tokenizer.js
│   │   └── unpackers/
│   │       ├── javascriptobfuscator_unpacker.js
│   │       ├── myobfuscate_unpacker.js
│   │       ├── p_a_c_k_e_r_unpacker.js
│   │       └── urlencode_unpacker.js
│   └── test/
│       ├── amd-beautify-tests.js
│       ├── core/
│       │   ├── test_inputscanner.js
│       │   └── test_options.js
│       ├── node-beautify-css-perf-tests.js
│       ├── node-beautify-html-perf-tests.js
│       ├── node-beautify-perf-tests.js
│       ├── node-beautify-tests.js
│       ├── node-src-index-tests.js
│       ├── resources/
│       │   ├── configerror/
│       │   │   ├── .jsbeautifyrc
│       │   │   └── subDir1/
│       │   │       └── subDir2/
│       │   │           └── empty.txt
│       │   ├── editorconfig/
│       │   │   ├── .editorconfig
│       │   │   ├── cr/
│       │   │   │   └── .editorconfig
│       │   │   ├── crlf/
│       │   │   │   └── .editorconfig
│       │   │   ├── error/
│       │   │   │   └── .editorconfig
│       │   │   └── example-base.js
│       │   ├── example1.js
│       │   └── indent11chars/
│       │       ├── .jsbeautifyrc
│       │       └── subDir1/
│       │           └── subDir2/
│       │               └── empty.txt
│       ├── run-tests
│       ├── sanitytest.js
│       └── shell-test.sh
├── jsbeautifyrc
├── package.json
├── python/
│   ├── MANIFEST.in
│   ├── __init__.py
│   ├── css-beautify
│   ├── cssbeautifier/
│   │   ├── __init__.py
│   │   ├── __version__.py
│   │   ├── _main.py
│   │   ├── css/
│   │   │   ├── __init__.py
│   │   │   ├── beautifier.py
│   │   │   └── options.py
│   │   └── tests/
│   │       └── __init__.py
│   ├── debian/
│   │   ├── .gitignore
│   │   ├── changelog
│   │   ├── compat
│   │   ├── control
│   │   ├── rules
│   │   └── source/
│   │       └── format
│   ├── js-beautify-profile
│   ├── js-beautify-test
│   ├── js-beautify-test.py
│   ├── jsbeautifier/
│   │   ├── __init__.py
│   │   ├── __version__.py
│   │   ├── cli/
│   │   │   └── __init__.py
│   │   ├── core/
│   │   │   ├── __init__.py
│   │   │   ├── directives.py
│   │   │   ├── inputscanner.py
│   │   │   ├── options.py
│   │   │   ├── output.py
│   │   │   ├── pattern.py
│   │   │   ├── templatablepattern.py
│   │   │   ├── token.py
│   │   │   ├── tokenizer.py
│   │   │   ├── tokenstream.py
│   │   │   └── whitespacepattern.py
│   │   ├── javascript/
│   │   │   ├── __init__.py
│   │   │   ├── acorn.py
│   │   │   ├── beautifier.py
│   │   │   ├── options.py
│   │   │   └── tokenizer.py
│   │   ├── tests/
│   │   │   ├── __init__.py
│   │   │   ├── core/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── test_inputscanner.py
│   │   │   │   └── test_options.py
│   │   │   ├── shell-test.sh
│   │   │   └── testindentation.py
│   │   └── unpackers/
│   │       ├── README.specs.mkd
│   │       ├── __init__.py
│   │       ├── evalbased.py
│   │       ├── javascriptobfuscator.py
│   │       ├── myobfuscate.py
│   │       ├── packer.py
│   │       ├── tests/
│   │       │   ├── __init__.py
│   │       │   ├── test-myobfuscate-input.js
│   │       │   ├── test-myobfuscate-output.js
│   │       │   ├── test-packer-62-input.js
│   │       │   ├── test-packer-non62-input.js
│   │       │   ├── testjavascriptobfuscator.py
│   │       │   ├── testmyobfuscate.py
│   │       │   ├── testpacker.py
│   │       │   └── testurlencode.py
│   │       └── urlencode.py
│   ├── pyproject.toml
│   ├── setup-css.py
│   ├── setup-js.py
│   ├── test-perf-cssbeautifier.py
│   └── test-perf-jsbeautifier.py
├── test/
│   ├── data/
│   │   ├── css/
│   │   │   ├── node.mustache
│   │   │   ├── python.mustache
│   │   │   └── tests.js
│   │   ├── html/
│   │   │   ├── node.mustache
│   │   │   └── tests.js
│   │   └── javascript/
│   │       ├── inputlib.js
│   │       ├── node.mustache
│   │       ├── python.mustache
│   │       └── tests.js
│   ├── generate-tests.js
│   └── resources/
│       ├── github-min.js
│       ├── github.css
│       ├── github.html
│       ├── html-with-base64image.html
│       ├── underscore-min.js
│       ├── underscore.js
│       └── unicode-error.js
├── tools/
│   ├── build.sh
│   ├── generate-changelog.sh
│   ├── git-status-clear.sh
│   ├── node
│   ├── npm
│   ├── python
│   ├── python-dev
│   ├── python-dev3
│   ├── python-rel
│   ├── release-all.sh
│   └── template/
│       ├── beautify-css.wrapper.js
│       ├── beautify-html.wrapper.js
│       └── beautify.wrapper.js
├── web/
│   ├── common-function.js
│   ├── common-style.css
│   ├── google-analytics.js
│   └── onload.js
└── webpack.config.js
Download .txt
SYMBOL INDEX (794 symbols across 72 files)

FILE: js/index.js
  function get_beautify (line 48) | function get_beautify(js_beautify, css_beautify, html_beautify) {

FILE: js/src/cli.js
  function verifyExists (line 205) | function verifyExists(fullPath) {
  function findRecursive (line 209) | function findRecursive(dir, fileName) {
  function getUserHome (line 221) | function getUserHome() {
  function set_file_editorconfig_opts (line 229) | function set_file_editorconfig_opts(file, config) {
  function usage (line 350) | function usage(err) {
  function processInputSync (line 432) | function processInputSync(filepath) {
  function makePretty (line 491) | function makePretty(fileType, code, config, outfile, callback) {
  function writePretty (line 501) | function writePretty(err, pretty, outfile, config) {
  function isFileDifferent (line 526) | function isFileDifferent(filePath, expected) {
  function cleanOptions (line 537) | function cleanOptions(data, types) {
  function onOutputError (line 545) | function onOutputError(err) {
  function dasherizeFlag (line 556) | function dasherizeFlag(str) {
  function dasherizeShorthands (line 563) | function dasherizeShorthands(hash) {
  function getOutputType (line 577) | function getOutputType(outfile, filepath, configType) {
  function getScriptName (line 589) | function getScriptName() {
  function checkType (line 593) | function checkType(parsed) {
  function checkFiles (line 610) | function checkFiles(parsed) {
  function testFilePath (line 699) | function testFilePath(filepath) {
  function logToStdout (line 709) | function logToStdout(str, config) {

FILE: js/src/core/directives.js
  function Directives (line 31) | function Directives(start_block_pattern, end_block_pattern) {

FILE: js/src/core/inputscanner.js
  function InputScanner (line 33) | function InputScanner(input_string) {

FILE: js/src/core/options.js
  function Options (line 31) | function Options(options, merge_child_field) {
  function _mergeOpts (line 160) | function _mergeOpts(allOptions, childFieldName) {
  function _normalizeOpts (line 180) | function _normalizeOpts(options) {

FILE: js/src/core/output.js
  function OutputLine (line 30) | function OutputLine(parent) {
  function IndentStringCache (line 174) | function IndentStringCache(options, baseIndentString) {
  function Output (line 238) | function Output(options, baseIndentString) {

FILE: js/src/core/pattern.js
  function Pattern (line 31) | function Pattern(input_scanner, parent) {

FILE: js/src/core/templatablepattern.js
  function TemplatablePattern (line 45) | function TemplatablePattern(input_scanner, parent) {

FILE: js/src/core/token.js
  function Token (line 31) | function Token(type, text, newlines, whitespace_before) {

FILE: js/src/core/tokenstream.js
  function TokenStream (line 31) | function TokenStream(parent_token) {

FILE: js/src/core/whitespacepattern.js
  function WhitespacePattern (line 33) | function WhitespacePattern(input_scanner, parent) {

FILE: js/src/css/beautifier.js
  function Beautifier (line 47) | function Beautifier(source_text, options) {

FILE: js/src/css/index.js
  function css_beautify (line 34) | function css_beautify(source_text, options) {

FILE: js/src/css/options.js
  function Options (line 33) | function Options(options) {

FILE: js/src/html/beautifier.js
  function in_array (line 181) | function in_array(what, arr) {
  function TagFrame (line 185) | function TagFrame(parent, parser_token, indent_level) {
  function TagStack (line 192) | function TagStack(printer) {
  function Beautifier (line 246) | function Beautifier(source_text, options, js_beautify, css_beautify) {

FILE: js/src/html/index.js
  function style_html (line 34) | function style_html(html_source, options, js_beautify, css_beautify) {

FILE: js/src/html/options.js
  function Options (line 33) | function Options(options) {

FILE: js/src/index.js
  function style_html (line 35) | function style_html(html_source, options, js, css) {

FILE: js/src/javascript/beautifier.js
  function in_array (line 41) | function in_array(what, arr) {
  function ltrim (line 45) | function ltrim(s) {
  function generateMapFromStrings (line 49) | function generateMapFromStrings(list) {
  function reserved_word (line 58) | function reserved_word(token, word) {
  function reserved_array (line 62) | function reserved_array(token, words) {
  function remove_redundant_indentation (line 85) | function remove_redundant_indentation(output, frame) {
  function split_linebreaks (line 103) | function split_linebreaks(s) {
  function is_array (line 120) | function is_array(mode) {
  function is_expression (line 124) | function is_expression(mode) {
  function all_lines_start_with (line 128) | function all_lines_start_with(lines, c) {
  function each_line_matches_indent (line 138) | function each_line_matches_indent(lines, indent) {
  function Beautifier (line 153) | function Beautifier(source_text, options) {

FILE: js/src/javascript/index.js
  function js_beautify (line 34) | function js_beautify(js_source_text, options) {

FILE: js/src/javascript/options.js
  function Options (line 35) | function Options(options) {

FILE: js/src/javascript/tokenizer.js
  function in_array (line 40) | function in_array(what, arr) {
  function unescape_string (line 460) | function unescape_string(s) {

FILE: js/test/amd-beautify-tests.js
  function amd_beautifier_index_tests (line 19) | function amd_beautifier_index_tests(name, test_runner) {
  function amd_beautifier_bundle_tests (line 35) | function amd_beautifier_bundle_tests(name, test_runner) {

FILE: js/test/node-beautify-css-perf-tests.js
  function node_beautifier_html_tests (line 13) | function node_beautifier_html_tests() {

FILE: js/test/node-beautify-html-perf-tests.js
  function node_beautifier_html_tests (line 13) | function node_beautifier_html_tests() {

FILE: js/test/node-beautify-perf-tests.js
  function node_beautifier_tests (line 13) | function node_beautifier_tests() {

FILE: js/test/node-beautify-tests.js
  function test_legacy_names (line 11) | function test_legacy_names() {
  function node_beautifier_index_tests (line 38) | function node_beautifier_index_tests(name, test_runner) {
  function node_beautifier_bundle_tests (line 54) | function node_beautifier_bundle_tests(name, test_runner) {

FILE: js/test/node-src-index-tests.js
  function test_names (line 13) | function test_names() {
  function node_beautifier_index_tests (line 26) | function node_beautifier_index_tests(name, test_runner) {

FILE: js/test/resources/editorconfig/example-base.js
  function indentMe (line 1) | function indentMe() {

FILE: js/test/resources/example1.js
  function indentMe (line 1) | function indentMe() {

FILE: js/test/sanitytest.js
  function SanityTest (line 13) | function SanityTest(func, name_of_test) {

FILE: python/cssbeautifier/__init__.py
  function default_options (line 29) | def default_options():
  function beautify (line 34) | def beautify(string, opts=None):
  function beautify_file (line 39) | def beautify_file(file_name, opts=None):
  function usage (line 44) | def usage(stream=sys.stdout):
  function main (line 49) | def main():

FILE: python/cssbeautifier/_main.py
  function default_options (line 41) | def default_options():
  function beautify (line 45) | def beautify(string, opts=None):
  function beautify_file (line 50) | def beautify_file(file_name, opts=None):
  function usage (line 54) | def usage(stream=sys.stdout):
  function main (line 101) | def main():

FILE: python/cssbeautifier/css/beautifier.py
  function default_options (line 50) | def default_options():
  function beautify (line 54) | def beautify(string, opts=default_options()):
  function beautify_file (line 59) | def beautify_file(file_name, opts=default_options()):
  function usage (line 69) | def usage(stream=sys.stdout):
  class Beautifier (line 84) | class Beautifier:
    method __init__ (line 85) | def __init__(self, source_text, opts=default_options()):
    method eatString (line 121) | def eatString(self, endChars):
    method eatWhitespace (line 137) | def eatWhitespace(self, allowAtLeastOneNewLine=False):
    method foundNestedPseudoClass (line 155) | def foundNestedPseudoClass(self):
    method indent (line 176) | def indent(self):
    method outdent (line 179) | def outdent(self):
    method preserveSingleSpace (line 183) | def preserveSingleSpace(self, isAfterSpace):
    method print_string (line 187) | def print_string(self, output_string):
    method beautify (line 192) | def beautify(self):

FILE: python/cssbeautifier/css/options.py
  class BeautifierOptions (line 29) | class BeautifierOptions(BaseOptions):
    method __init__ (line 30) | def __init__(self, options=None):

FILE: python/js-beautify-test.py
  function run_tests (line 7) | def run_tests():

FILE: python/jsbeautifier/__init__.py
  function default_options (line 76) | def default_options():
  function beautify (line 80) | def beautify(string, opts=default_options()):
  function beautify_file (line 85) | def beautify_file(file_name, opts=default_options()):
  function usage (line 89) | def usage(stream=sys.stdout):
  function main (line 155) | def main():

FILE: python/jsbeautifier/cli/__init__.py
  class MissingInputStreamError (line 50) | class MissingInputStreamError(Exception):
  function set_file_editorconfig_opts (line 54) | def set_file_editorconfig_opts(filename, js_options):
  function process_file (line 92) | def process_file(file_name, opts, beautify_code):
  function mkdir_p (line 125) | def mkdir_p(path):
  function isFileDifferent (line 136) | def isFileDifferent(filepath, expected):
  function get_filepaths_from_params (line 143) | def get_filepaths_from_params(filepath_params, replace):
  function integrate_editorconfig_options (line 184) | def integrate_editorconfig_options(filepath, local_options, outfile, def...
  function write_beautified_output (line 203) | def write_beautified_output(pretty, local_options, outfile):

FILE: python/jsbeautifier/core/directives.py
  class Directives (line 28) | class Directives:
    method __init__ (line 29) | def __init__(self, start_block_pattern, end_block_pattern):
    method get_directives (line 39) | def get_directives(self, text):
    method readIgnored (line 54) | def readIgnored(self, input):

FILE: python/jsbeautifier/core/inputscanner.py
  class InputScanner (line 28) | class InputScanner:
    method __init__ (line 29) | def __init__(self, input_string):
    method restart (line 37) | def restart(self):
    method back (line 40) | def back(self):
    method hasNext (line 44) | def hasNext(self):
    method next (line 47) | def next(self):
    method peek (line 55) | def peek(self, index=0):
    method test (line 63) | def test(self, pattern, index=0):
    method testChar (line 71) | def testChar(self, pattern, index=0):
    method match (line 76) | def match(self, pattern):
    method read (line 84) | def read(self, starting_pattern, until_pattern=None, until_after=False):
    method readUntil (line 97) | def readUntil(self, pattern, include_match=False):
    method readUntilAfter (line 116) | def readUntilAfter(self, pattern):
    method get_regexp (line 119) | def get_regexp(self, pattern, match_from=False):
    method peekUntilAfter (line 129) | def peekUntilAfter(self, pattern):
    method lookBack (line 135) | def lookBack(self, testVal):

FILE: python/jsbeautifier/core/options.py
  class Options (line 30) | class Options:
    method __init__ (line 31) | def __init__(self, options=None, merge_child_field=None):
    method _get_array (line 88) | def _get_array(self, name, default_value=[]):
    method _get_boolean (line 98) | def _get_boolean(self, name, default_value=False):
    method _get_characters (line 108) | def _get_characters(self, name, default_value=""):
    method _get_number (line 120) | def _get_number(self, name, default_value=0):
    method _get_selection (line 130) | def _get_selection(self, name, selection_list, default_value=None):
    method _get_selection_list (line 145) | def _get_selection_list(self, name, selection_list, default_value=None):
    method _is_valid_selection (line 168) | def _is_valid_selection(self, result, selection_list):
  function _mergeOpts (line 186) | def _mergeOpts(options, childFieldName):
  function _normalizeOpts (line 213) | def _normalizeOpts(options):

FILE: python/jsbeautifier/core/output.py
  class OutputLine (line 34) | class OutputLine:
    method __init__ (line 35) | def __init__(self, parent):
    method clone_empty (line 47) | def clone_empty(self):
    method item (line 52) | def item(self, index):
    method is_empty (line 55) | def is_empty(self):
    method set_indent (line 58) | def set_indent(self, indent=0, alignment=0):
    method _set_wrap_point (line 66) | def _set_wrap_point(self):
    method _should_wrap (line 75) | def _should_wrap(self):
    method _allow_wrap (line 83) | def _allow_wrap(self):
    method last (line 106) | def last(self):
    method push (line 112) | def push(self, item):
    method pop (line 120) | def pop(self):
    method _remove_indent (line 127) | def _remove_indent(self):
    method _remove_wrap_indent (line 132) | def _remove_wrap_indent(self):
    method trim (line 136) | def trim(self):
    method toString (line 141) | def toString(self):
  class IndentStringCache (line 154) | class IndentStringCache:
    method __init__ (line 155) | def __init__(self, options, base_string):
    method get_indent_size (line 170) | def get_indent_size(self, indent, column=0):
    method get_indent_string (line 178) | def get_indent_string(self, indent_level, column=0):
    method __ensure_cache (line 188) | def __ensure_cache(self, column):
    method __add_column (line 192) | def __add_column(self):
  class Output (line 205) | class Output:
    method __init__ (line 206) | def __init__(self, options, baseIndentString=""):
    method __add_outputline (line 223) | def __add_outputline(self):
    method get_line_number (line 228) | def get_line_number(self):
    method get_indent_string (line 231) | def get_indent_string(self, indent, column=0):
    method get_indent_size (line 234) | def get_indent_size(self, indent, column=0):
    method is_empty (line 237) | def is_empty(self):
    method add_new_line (line 240) | def add_new_line(self, force_newline=False):
    method get_code (line 252) | def get_code(self, eol):
    method set_wrap_point (line 273) | def set_wrap_point(self):
    method set_indent (line 276) | def set_indent(self, indent=0, alignment=0):
    method add_raw_token (line 287) | def add_raw_token(self, token):
    method add_token (line 298) | def add_token(self, printable_token):
    method __add_space_before_token (line 305) | def __add_space_before_token(self):
    method remove_indent (line 312) | def remove_indent(self, index):
    method trim (line 318) | def trim(self, eat_newlines=False):
    method just_added_newline (line 331) | def just_added_newline(self):
    method just_added_blankline (line 334) | def just_added_blankline(self):
    method ensure_empty_line_above (line 339) | def ensure_empty_line_above(self, starts_with, ends_with):

FILE: python/jsbeautifier/core/pattern.py
  class Pattern (line 28) | class Pattern:
    method __init__ (line 29) | def __init__(self, input_scanner, parent=None):
    method read (line 42) | def read(self):
    method read_match (line 50) | def read_match(self):
    method until_after (line 53) | def until_after(self, pattern):
    method until (line 60) | def until(self, pattern):
    method starting_with (line 67) | def starting_with(self, pattern):
    method matching (line 73) | def matching(self, pattern):
    method _create (line 79) | def _create(self):
    method _update (line 82) | def _update(self):

FILE: python/jsbeautifier/core/templatablepattern.py
  class TemplateNames (line 31) | class TemplateNames:
    method __init__ (line 32) | def __init__(self):
  class TemplatePatterns (line 41) | class TemplatePatterns:
    method __init__ (line 42) | def __init__(self, input_scanner):
  class TemplatablePattern (line 60) | class TemplatablePattern(Pattern):
    method __init__ (line 61) | def __init__(self, input_scanner, parent=None):
    method _create (line 74) | def _create(self):
    method _update (line 77) | def _update(self):
    method read_options (line 80) | def read_options(self, options):
    method disable (line 87) | def disable(self, language):
    method exclude (line 93) | def exclude(self, language):
    method read (line 99) | def read(self):
    method __set_templated_pattern (line 122) | def __set_templated_pattern(self):
    method _read_template (line 149) | def _read_template(self):

FILE: python/jsbeautifier/core/token.py
  class Token (line 26) | class Token:
    method __init__ (line 27) | def __init__(self, type, text, newlines=0, whitespace_before=""):

FILE: python/jsbeautifier/core/tokenizer.py
  class TokenTypes (line 35) | class TokenTypes:
    method __init__ (line 40) | def __init__(self):
  class TokenizerPatterns (line 47) | class TokenizerPatterns:
    method __init__ (line 48) | def __init__(self, input_scanner):
  class Tokenizer (line 52) | class Tokenizer:
    method __init__ (line 53) | def __init__(self, input_string, options):
    method tokenize (line 60) | def tokenize(self):
    method __get_next_token_with_comments (line 86) | def __get_next_token_with_comments(self, previous, open_token):
    method _is_first_token (line 105) | def _is_first_token(self):
    method _reset (line 108) | def _reset(self):
    method _get_next_token (line 111) | def _get_next_token(self, previous_token, open_token):
    method _is_comment (line 119) | def _is_comment(self, current_token):
    method _is_opening (line 122) | def _is_opening(self, current_token):
    method _is_closing (line 125) | def _is_closing(self, current_token, open_token):
    method _create_token (line 128) | def _create_token(self, token_type, text):
    method _readWhitespace (line 137) | def _readWhitespace(self):

FILE: python/jsbeautifier/core/tokenstream.py
  class TokenStream (line 30) | class TokenStream:
    method __init__ (line 31) | def __init__(self, parent_token=None):
    method restart (line 37) | def restart(self):
    method isEmpty (line 40) | def isEmpty(self):
    method hasNext (line 43) | def hasNext(self):
    method next (line 46) | def next(self):
    method peek (line 54) | def peek(self, index=0):
    method add (line 62) | def add(self, token):
    method __iter__ (line 69) | def __iter__(self):
    method __next__ (line 73) | def __next__(self):

FILE: python/jsbeautifier/core/whitespacepattern.py
  class WhitespacePattern (line 31) | class WhitespacePattern(Pattern):
    method __init__ (line 32) | def __init__(self, input_scanner, parent=None):
    method __set_whitespace_patterns (line 43) | def __set_whitespace_patterns(self, whitespace_chars, newline_chars):
    method read (line 52) | def read(self):
    method matching (line 66) | def matching(self, whitespace_chars, newline_chars):
    method _create (line 72) | def _create(self):

FILE: python/jsbeautifier/javascript/beautifier.py
  function default_options (line 35) | def default_options():
  class BeautifierFlags (line 39) | class BeautifierFlags:
    method __init__ (line 40) | def __init__(self, mode):
    method apply_base (line 65) | def apply_base(self, flags_base, added_newline):
  class MODE (line 87) | class MODE:
  function remove_redundant_indentation (line 99) | def remove_redundant_indentation(output, frame):
  function reserved_word (line 116) | def reserved_word(token, word):
  function reserved_array (line 120) | def reserved_array(token, words):
  class Beautifier (line 140) | class Beautifier:
    method __init__ (line 141) | def __init__(self, opts=None):
    method _blank_state (line 149) | def _blank_state(self, js_source_text=None):
    method beautify (line 175) | def beautify(self, source_text="", opts=None):
    method handle_token (line 199) | def handle_token(self, current_token, preserve_statement_flags=False):
    method handle_whitespace_and_comments (line 235) | def handle_whitespace_and_comments(
    method unpack (line 270) | def unpack(self, source, evalcode=False):
    method is_array (line 278) | def is_array(self, mode):
    method is_expression (line 281) | def is_expression(self, mode):
    method allow_wrap_or_preserved_newline (line 292) | def allow_wrap_or_preserved_newline(self, current_token, force_linewra...
    method print_newline (line 322) | def print_newline(self, force_newline=False, preserve_statement_flags=...
    method print_token_line_indentation (line 345) | def print_token_line_indentation(self, current_token):
    method print_token (line 361) | def print_token(self, current_token, s=None):
    method indent (line 396) | def indent(self):
    method deindent (line 400) | def deindent(self):
    method set_mode (line 411) | def set_mode(self, mode):
    method restore_mode (line 424) | def restore_mode(self):
    method start_of_object_property (line 433) | def start_of_object_property(self):
    method start_of_statement (line 443) | def start_of_statement(self, current_token):
    method handle_start_expr (line 507) | def handle_start_expr(self, current_token):
    method handle_end_expr (line 669) | def handle_end_expr(self, current_token):
    method handle_start_block (line 708) | def handle_start_block(self, current_token):
    method handle_end_block (line 850) | def handle_end_block(self, current_token):
    method handle_word (line 881) | def handle_word(self, current_token):
    method handle_semicolon (line 1185) | def handle_semicolon(self, current_token):
    method handle_string (line 1206) | def handle_string(self, current_token):
    method handle_equals (line 1249) | def handle_equals(self, current_token):
    method handle_comma (line 1265) | def handle_comma(self, current_token):
    method handle_operator (line 1300) | def handle_operator(self, current_token):
    method handle_block_comment (line 1524) | def handle_block_comment(self, current_token, preserve_statement_flags):
    method handle_comment (line 1596) | def handle_comment(self, current_token, preserve_statement_flags):
    method handle_dot (line 1607) | def handle_dot(self, current_token):
    method handle_unknown (line 1637) | def handle_unknown(self, current_token, preserve_statement_flags):
    method handle_eof (line 1642) | def handle_eof(self, current_token):

FILE: python/jsbeautifier/javascript/options.py
  class BeautifierOptions (line 31) | class BeautifierOptions(BaseOptions):
    method __init__ (line 32) | def __init__(self, options=None):

FILE: python/jsbeautifier/javascript/tokenizer.py
  class TokenTypes (line 38) | class TokenTypes(BaseTokenTypes):
    method __init__ (line 55) | def __init__(self):
  class TokenizerPatterns (line 129) | class TokenizerPatterns(BaseTokenizerPatterns):
    method __init__ (line 130) | def __init__(self, input_scanner, acorn, options):
  class Tokenizer (line 167) | class Tokenizer(BaseTokenizer):
    method __init__ (line 171) | def __init__(self, input_string, opts):
    method _reset (line 183) | def _reset(self):
    method _is_comment (line 186) | def _is_comment(self, current_token):
    method _is_opening (line 193) | def _is_opening(self, current_token):
    method _is_closing (line 199) | def _is_closing(self, current_token, open_token):
    method _get_next_token (line 212) | def _get_next_token(self, previous_token, open_token):
    method _read_singles (line 235) | def _read_singles(self, c):
    method _read_pair (line 262) | def _read_pair(self, c, d):
    method _read_word (line 274) | def _read_word(self, previous_token):
    method _read_comment (line 301) | def _read_comment(self, c):
    method _read_string (line 321) | def _read_string(self, c):
    method _read_regexp (line 343) | def _read_regexp(self, c, previous_token):
    method _read_xml (line 379) | def _read_xml(self, c, previous_token):
    method _read_non_javascript (line 422) | def _read_non_javascript(self, c):
    method _read_punctuation (line 489) | def _read_punctuation(self):
    method allowRegExOrXML (line 515) | def allowRegExOrXML(self, previous_token):
    method parse_string (line 532) | def parse_string(self, delimiter, allow_unescaped_newlines=False, star...
    method unescape_string (line 575) | def unescape_string(self, s):

FILE: python/jsbeautifier/tests/core/test_inputscanner.py
  class TestInputScanner (line 6) | class TestInputScanner(unittest.TestCase):
    method setUpClass (line 8) | def setUpClass(cls):
    method setUp (line 11) | def setUp(self):
    method test_new (line 15) | def test_new(self):
    method test_next (line 19) | def test_next(self):
    method test_peek (line 28) | def test_peek(self):
    method test_no_param (line 37) | def test_no_param(self):
    method test_pattern (line 42) | def test_pattern(self):
    method test_Char (line 49) | def test_Char(self):
    method test_restart (line 54) | def test_restart(self):
    method test_back (line 61) | def test_back(self):
    method test_hasNext (line 72) | def test_hasNext(self):
    method test_match (line 82) | def test_match(self):
    method test_read (line 98) | def test_read(self):
    method test_readUntil (line 146) | def test_readUntil(self):
    method test_readUntilAfter (line 169) | def test_readUntilAfter(self):
    method test_get_regexp (line 175) | def test_get_regexp(self):
    method test_peekUntilAfter (line 180) | def test_peekUntilAfter(self):
    method test_lookBack (line 187) | def test_lookBack(self):

FILE: python/jsbeautifier/tests/core/test_options.py
  class TestOptions (line 6) | class TestOptions(unittest.TestCase):
    method setUpClass (line 8) | def setUpClass(cls):
    method test_mergeOpts (line 11) | def test_mergeOpts(self):
    method test_normalizeOpts (line 38) | def test_normalizeOpts(self):
    method test__get_boolean (line 53) | def test__get_boolean(self):
    method test__get_characters (line 61) | def test__get_characters(self):
    method test__get_number (line 71) | def test__get_number(self):
    method test__get_array (line 83) | def test__get_array(self):
    method test__is_valid_selection (line 95) | def test__is_valid_selection(self):
    method test__get_selection_list (line 103) | def test__get_selection_list(self):
    method test__get_selection (line 119) | def test__get_selection(self):

FILE: python/jsbeautifier/tests/testindentation.py
  class TestJSBeautifierIndentation (line 6) | class TestJSBeautifierIndentation(unittest.TestCase):
    method test_tabs (line 7) | def test_tabs(self):
    method test_function_indent (line 13) | def test_function_indent(self):
    method decodesto (line 28) | def decodesto(self, input, expectation=None):
    method setUpClass (line 34) | def setUpClass(cls):

FILE: python/jsbeautifier/unpackers/__init__.py
  class UnpackingError (line 16) | class UnpackingError(Exception):
  function getunpackers (line 23) | def getunpackers():
  function run (line 47) | def run(source, evalcode=False):
  function filtercomments (line 56) | def filtercomments(source):

FILE: python/jsbeautifier/unpackers/evalbased.py
  function detect (line 22) | def detect(source):
  function unpack (line 27) | def unpack(source):
  function jseval (line 35) | def jseval(script):

FILE: python/jsbeautifier/unpackers/javascriptobfuscator.py
  function smartsplit (line 24) | def smartsplit(code):
  function detect (line 45) | def detect(code):
  function unpack (line 51) | def unpack(code):

FILE: python/jsbeautifier/unpackers/myobfuscate.py
  function detect (line 65) | def detect(source):
  function unpack (line 70) | def unpack(source):
  function _filter (line 80) | def _filter(source):

FILE: python/jsbeautifier/unpackers/packer.py
  function detect (line 23) | def detect(source):
  function unpack (line 51) | def unpack(source):
  function _filterargs (line 76) | def _filterargs(source):
  function _replacestrings (line 101) | def _replacestrings(source):
  class Unbaser (line 118) | class Unbaser(object):
    method __init__ (line 130) | def __init__(self, base):
    method __call__ (line 153) | def __call__(self, string):
    method _dictunbaser (line 156) | def _dictunbaser(self, string):

FILE: python/jsbeautifier/unpackers/tests/test-myobfuscate-input.js
  function _1OO (line 1) | function _1OO(_0IO){var _011=OO0[0];var lOO,O10,_0ll,OlO,_01O,IOO,I01,_0...
  function O0I (line 1) | function O0I(O11){var OO1=OO0[1],_11O=0;for(_11O=O11[OO0[5]]-1;_11O>=0;_...

FILE: python/jsbeautifier/unpackers/tests/test-packer-non62-input.js
  function ControlVersion (line 1) | function ControlVersion(){var a;var b;var c;try{b=new ActiveXObject("Sho...
  function GetSwfVer (line 1) | function GetSwfVer(){var a=-1;if(navigator["plugins"]!=null&&navigator["...
  function DetectFlashVer (line 1) | function DetectFlashVer(a,b,c){versionStr=GetSwfVer();if(versionStr==-1)...
  function AC_AddExtension (line 1) | function AC_AddExtension(a,b){if(a["indexOf"]("?")!=-1){return a["replac...
  function AC_FL_RunContent (line 1) | function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","c...
  function AC_SW_RunContent (line 1) | function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","cls...
  function AC_GetArgs (line 1) | function AC_GetArgs(a,b,c,d,e){var f=new Object();f["embedAttrs"]=new Ob...

FILE: python/jsbeautifier/unpackers/tests/testjavascriptobfuscator.py
  class TestJavascriptObfuscator (line 13) | class TestJavascriptObfuscator(unittest.TestCase):
    method test_smartsplit (line 16) | def test_smartsplit(self):
    method test_detect (line 28) | def test_detect(self):
    method test_unpack (line 44) | def test_unpack(self):

FILE: python/jsbeautifier/unpackers/tests/testmyobfuscate.py
  class TestMyObfuscate (line 18) | class TestMyObfuscate(unittest.TestCase):
    method setUpClass (line 23) | def setUpClass(cls):
    method test_detect (line 30) | def test_detect(self):
    method test_unpack (line 38) | def test_unpack(self):

FILE: python/jsbeautifier/unpackers/tests/testpacker.py
  class TestPacker (line 14) | class TestPacker(unittest.TestCase):
    method test_detect (line 17) | def test_detect(self):
    method test_unpack (line 31) | def test_unpack(self):

FILE: python/jsbeautifier/unpackers/tests/testurlencode.py
  class TestUrlencode (line 14) | class TestUrlencode(unittest.TestCase):
    method test_detect (line 17) | def test_detect(self):
    method test_unpack (line 32) | def test_unpack(self):

FILE: python/jsbeautifier/unpackers/urlencode.py
  function detect (line 27) | def detect(code):
  function unpack (line 34) | def unpack(code):

FILE: python/test-perf-cssbeautifier.py
  function beautifier_test_github_css (line 14) | def beautifier_test_github_css():
  function report_perf (line 18) | def report_perf(fn):

FILE: python/test-perf-jsbeautifier.py
  function beautifier_test_underscore (line 15) | def beautifier_test_underscore():
  function beautifier_test_underscore_min (line 19) | def beautifier_test_underscore_min():
  function beautifier_test_github_min (line 23) | def beautifier_test_github_min():
  function report_perf (line 27) | def report_perf(fn):

FILE: test/generate-tests.js
  function generate_tests (line 39) | function generate_tests() {
  function generate_test_files (line 51) | function generate_test_files(data_folder, test_method, node_output, pyth...
  function set_generated_header (line 78) | function set_generated_header(data, data_file_path, template_file_path) {
  function isStringOrArray (line 91) | function isStringOrArray(val) {
  function getTestString (line 95) | function getTestString(val) {
  function set_formatters (line 103) | function set_formatters(data, test_method, comment_mark) {

FILE: test/resources/github-min.js
  function n (line 1) | function n(e){if(e in t)return t[e];throw new Error("dependency not foun...
  function e (line 1) | function e(){var e=this,t=0;return{next:function(){return{done:t===e.len...
  function n (line 1) | function n(){throw new Error("Dynamic requires are not currently support...
  function r (line 1) | function r(e,t){return e(t={exports:{}},t.exports),t.exports}
  function i (line 1) | function i(s,u){if(!r[s]){if(!t[s]){if(!u&&n)return n(s,!0);if(a)return ...
  function r (line 1) | function r(e,t){if(void 0===e||null===e)throw new TypeError("Cannot conv...
  function n (line 1) | function n(n,r){return a.type="throw",a.arg=e,t.next=n,!!r}
  function p (line 1) | function p(e,t,r,o){var i=Object.create((t||m).prototype),a=new k(o||[])...
  function v (line 1) | function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){ret...
  function m (line 1) | function m(){}
  function g (line 1) | function g(){}
  function b (line 1) | function b(){}
  function y (line 1) | function y(e){["next","throw","return"].forEach(function(t){e[t]=functio...
  function w (line 1) | function w(e){this.arg=e}
  function E (line 1) | function E(e){function t(n,r,o,i){var a=v(e[n],e,r);if("throw"!==a.type)...
  function _ (line 1) | function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.f...
  function x (line 1) | function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.comp...
  function k (line 1) | function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.r...
  function T (line 1) | function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==type...
  function j (line 1) | function j(){return{value:n,done:!0}}
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function x (line 1) | function x(e,t,n){var r={url:String(e),data:t,type:n};if(_){var o=j()||[...
  function k (line 1) | function k(e){var t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator](...
  function j (line 1) | function j(){var e=void 0;try{e=sessionStorage.getItem(T)}catch(e){}if(e...
  function L (line 1) | function L(e){var t=JSON.stringify(e);try{sessionStorage.setItem(T,t)}ca...
  function O (line 1) | function O(){try{sessionStorage.removeItem(T)}catch(e){}}
  function r (line 1) | function r(){}
  function u (line 1) | function u(e,t){this.scrollLeft=e,this.scrollTop=t}
  function c (line 1) | function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"aut...
  function l (line 1) | function l(e,t){return"Y"===t?e.clientHeight+i<e.scrollHeight:"X"===t?e....
  function f (line 1) | function f(e,n){var r=t.getComputedStyle(e,null)["overflow"+n];return"au...
  function d (line 1) | function d(e){var t=l(e,"Y")&&f(e,"Y"),n=l(e,"X")&&f(e,"X");return t||n}
  function h (line 1) | function h(e){var n,r,i,a,u=(s()-e.startTime)/o;a=u=u>1?1:u,n=.5*(1-Math...
  function p (line 1) | function p(e,r,o){var i,c,l,f,d=s();e===n.body?(i=t,c=t.scrollX||t.pageX...
  function A (line 1) | function A(e,t,n){return o(e instanceof t,"undefined -- app/assets/modul...
  function C (line 1) | function C(e,t){var n=e.head;o(n,"document.head was not initialized -- a...
  function P (line 1) | function P(e){var t=C(e,"expected-hostname");return!!t&&t.replace(/\.$/,...
  function N (line 1) | function N(e){W()&&B(function(e){var t=e.message,n=e.filename,r=e.lineno...
  function I (line 1) | function I(e){W()&&e.promise&&e.promise.catch(function(e){var t={};e&&e....
  function q (line 1) | function q(e){var t=e.body||{},n=new Error("ReportingObserverError");B({...
  function F (line 1) | function F(e){B(X(e,arguments.length>1&&void 0!==arguments[1]?arguments[...
  function B (line 1) | function B(e){var t=C(document,"browser-errors-url");t&&(R++,window.fetc...
  function X (line 1) | function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[...
  function W (line 1) | function W(){return!V&&R<10&&"undefined"!=typeof customElements&&"undefi...
  function G (line 1) | function G(){if(!(this instanceof G))return new G;this.size=0,this.uid=0...
  function e (line 1) | function e(){this.map={}}
  function ne (line 1) | function ne(e,t){var n,r,o,i,a,s,u=(e=e.slice(0).concat(e.default)).leng...
  function re (line 1) | function re(e,t){var n,r,o;for(n=0,r=e.length;n<r;n++)if(o=e[n],t.isProt...
  function oe (line 1) | function oe(e,t){return e.id-t.id}
  function fe (line 1) | function fe(e,t,n){var r=e[t];return e[t]=function(){return n.apply(e,ar...
  function de (line 1) | function de(){se.set(this,!0)}
  function he (line 1) | function he(){se.set(this,!0),ue.set(this,!0)}
  function pe (line 1) | function pe(){return ce.get(this)||null}
  function ve (line 1) | function ve(e,t){le&&Object.defineProperty(e,"currentTarget",{configurab...
  function me (line 1) | function me(e){var t=(1===e.eventPhase?ae:ie)[e.type];if(t){var n=functi...
  function ge (line 1) | function ge(e,t,n){var r=!!(arguments.length>3&&void 0!==arguments[3]?ar...
  function be (line 1) | function be(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,...
  function xe (line 1) | function xe(){return _e}
  function ke (line 1) | function ke(){return history.length-1+Ee}
  function Te (line 1) | function Te(e){_e=e;var t=location.href;we[ke()]={url:t,state:_e},we.len...
  function je (line 1) | function je(e,t){var n={_id:t};if(e)for(var r in e)n[r]=e[r];return n}
  function Le (line 1) | function Le(){return(new Date).getTime()}
  function Oe (line 1) | function Oe(e,t,n){Ee=0,e=je(e,Le()),history.pushState(e,t,n),Te(e)}
  function Se (line 1) | function Se(e,t,n){e=je(e,xe()._id),history.replaceState(e,t,n),Te(e)}
  function Me (line 1) | function Me(e){return Ce(e,De(arguments.length>1&&void 0!==arguments[1]?...
  function Ce (line 1) | function Ce(e,t){if(""!==t)return e.getElementById(t)||e.getElementsByNa...
  function De (line 1) | function De(e){try{return decodeURIComponent(e.slice(1))}catch(e){return...
  function Ne (line 1) | function Ne(e){c(regeneratorRuntime.mark(function t(){return regenerator...
  function Ie (line 1) | function Ie(){var e=Re;Re=He.length,qe(He.slice(e),null,window.location....
  function qe (line 1) | function qe(e,t,n){var r=window.location.hash.slice(1),o={oldURL:t,newUR...
  function Xe (line 1) | function Xe(e){return(e.ctrlKey?"Control+":"")+(e.altKey?"Alt+":"")+(e.m...
  function We (line 1) | function We(e){return!function(e){return e.offsetWidth<=0&&e.offsetHeigh...
  function Ye (line 1) | function Ye(e){var t=e.currentTarget;if(o(t instanceof HTMLElement,"app/...
  function Ze (line 1) | function Ze(e){var t=document.querySelector("button[data-box-overlay-id=...
  function Qe (line 1) | function Qe(e,t){var n=t||Ze(e);et(),$e(e).then(function(){var t=e.query...
  function et (line 1) | function et(){if(Je){var e=Je,t=document.querySelector('[data-box-overla...
  function tt (line 1) | function tt(e){"Escape"===Xe(e)&&et()}
  function it (line 1) | function it(e){o(e instanceof CustomEvent,"app/assets/modules/github/cod...
  function at (line 1) | function at(e,t){return new Promise(function(n){e.addEventListener(t,n,{...
  function ut (line 1) | function ut(e,t){var n=void 0;return function(){var r=this,o=arguments;c...
  function ft (line 1) | function ft(e,t,n){var r=n||HTMLElement,o=e.closest(t);if(o instanceof r...
  function dt (line 1) | function dt(e,t,n){var r=n||HTMLElement,o=e.querySelector(t);if(o instan...
  function ht (line 1) | function ht(e,t,n){var r=n||HTMLElement,o=[],i=!0,a=!1,s=void 0;try{for(...
  function mt (line 1) | function mt(e,t){if(vt){var n=Array.from(e.querySelectorAll(".js-transit...
  function gt (line 1) | function gt(e){return"height"===getComputedStyle(e).transitionProperty}
  function bt (line 1) | function bt(e,t){e.style.transition="none",t(),e.offsetHeight,e.style.tr...
  function yt (line 1) | function yt(e){var t=e.getAttribute("data-details-container")||".js-deta...
  function wt (line 1) | function wt(e){for(var t=!1,n=e.parentElement;n;)n.classList.contains("D...
  function kt (line 1) | function kt(e){var t=e,n=t.ownerDocument;if(n&&t.offsetParent){var r=n.d...
  function Tt (line 1) | function Tt(e,t){var n=t,r=e.ownerDocument;if(r&&r.body){var o=r.documen...
  function jt (line 1) | function jt(e,t){var n=e,r=n.ownerDocument;if(r){var o=r.documentElement...
  function St (line 1) | function St(){if("Intl"in window)try{return(new window.Intl.DateTimeForm...
  function Mt (line 1) | function Mt(e,t){return!!(e&&t in e&&(n=e[t],"function"==typeof n&&n.toS...
  function Pt (line 1) | function Pt(){return Mt("classList"in Ct&&Ct.classList,"add")}
  function Rt (line 1) | function Rt(e){var t=e.querySelector("meta[name=html-safe-nonce]");if(nu...
  function t (line 1) | function t(e,n){l(this,t);var r=p(this,(t.__proto__||Object.getPrototype...
  function It (line 1) | function It(e,t){var n=t.headers.get("content-type")||"";if(!n.startsWit...
  function Ft (line 1) | function Ft(e,t){if("function"!=typeof HTMLTemplateElement.bootstrap){va...
  function t (line 1) | function t(e){l(this,t);var n=e.statusText?" "+e.statusText:"",r=p(this,...
  function Xt (line 1) | function Xt(e){if(e.status>=200&&e.status<300)return e;throw new zt(e)}
  function Vt (line 1) | function Vt(e){return e.json()}
  function Wt (line 1) | function Wt(e){return e.text()}
  function Ut (line 1) | function Ut(e,t){var n=t?Object.assign({},t):{};n.credentials||(n.creden...
  function Yt (line 1) | function Yt(e,t){var n=Ut(e,t);return self.fetch(n).then(Xt)}
  function Gt (line 1) | function Gt(e,t){var n=Ut(e,t);return self.fetch(n).then(Xt).then(Wt)}
  function Kt (line 1) | function Kt(e,t){var n=Ut(e,t);return n.headers.set("Accept","applicatio...
  function Qt (line 1) | function Qt(e){var t=e.querySelector("input.is-submit-button-value");ret...
  function en (line 1) | function en(e){var t=e.closest("form");if(t instanceof HTMLFormElement){...
  function nn (line 1) | function nn(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,...
  function rn (line 1) | function rn(e,t){t&&en(t),nn(e,"submit",!0)&&e.submit()}
  function on (line 1) | function on(e){if(!(e instanceof HTMLElement))return!1;var t=e.nodeName....
  function an (line 1) | function an(e){var t=new URLSearchParams,n=!0,r=!1,o=void 0;try{for(var ...
  function n (line 1) | function n(e){t.set(e)}
  function q (line 1) | function q(e){if(100!=e.get(Ht)&&$n(ee(e,_t))%1e4>=100*te(e,Ht))throw"ab...
  function F (line 1) | function F(e){if(T(ee(e,Tt)))throw"abort"}
  function B (line 1) | function B(){var e=x.location.protocol;if("http:"!=e&&"https:"!=e)throw"...
  function z (line 1) | function z(e){try{_.navigator.sendBeacon?n(42):_.XMLHttpRequest&&"withCr...
  function X (line 1) | function X(e){var t=ee(e,It)||M()+"/collect",n=ee(e,be);if(!n&&e.get(ge)...
  function V (line 1) | function V(e){var t;(_.gaData=_.gaData||{}).expId&&e.set(Ke,(_.gaData=_....
  function W (line 1) | function W(){if(_.navigator&&"preview"==_.navigator.loadPurpose)throw"ab...
  function U (line 1) | function U(e){var t=_.gaDevIds;s(t)&&0!=t.length&&e.set("&did",t.join(",...
  function Y (line 1) | function Y(e){if(!e.get(Tt))throw"abort"}
  function $ (line 1) | function $(e){var t=te(e,tt);if(500<=t&&n(15),"transaction"!=(r=ee(e,pe)...
  function Ft (line 1) | function Ft(e,t,r,o){t[e]=function(){try{return o&&n(o),r.apply(this,arg...
  function rn (line 1) | function rn(e,t,n){"none"==t&&(t="");var r=[],o=j(e);e="__utma"==e?6:2;f...
  function on (line 1) | function on(e,t){var n;null==e?n=e=1:(n=$n(e),e=$n(c(e,".")?e.substring(...
  function un (line 1) | function un(e,t){var n=new Date,r=_.navigator,o=r.plugins||[];for(e=[e,r...
  function dn (line 1) | function dn(e,t){if(t==x.location.hostname)return!1;for(var n=0;n<e.leng...
  function o (line 1) | function o(r){try{var o;r=r||_.event;e:{var a=r.target||r.srcElement;for...
  function t (line 1) | function t(e,t){i.b.data.set(e,t)}
  function r (line 1) | function r(e,n){t(e,n),i.filters.add(e)}
  function o (line 1) | function o(e,t,r){zt(new Bt(1e4,!0,t),i.b)&&(e=j(e))&&0<e.length&&n(r)}
  function In (line 1) | function In(e){return 0<=e.indexOf(".")||0<=e.indexOf(":")}
  function t (line 1) | function t(e,t){t&&(n+="&"+e+"="+h(t))}
  function t (line 1) | function t(e){var t=(e.hostname||"").split(":")[0].toLowerCase(),n=(e.pr...
  function $n (line 1) | function $n(e){var t,n,r=1;if(e)for(r=0,n=e.length-1;0<=n;n--)r=0!=(t=26...
  function cn (line 1) | function cn(e){var t=arguments.length>1&&void 0!==arguments[1]&&argument...
  function ln (line 1) | function ln(e){var t=!0,n=!1,r=void 0;try{for(var o,i=e.querySelectorAll...
  function fn (line 1) | function fn(e){if(e instanceof HTMLInputElement&&("checkbox"===e.type||"...
  function e (line 1) | function e(t){l(this,e),this.children=[],this.parent=t}
  function e (line 1) | function e(t){l(this,e),this.parent=null,this.children={},this.parent=t|...
  function yn (line 1) | function yn(e,t){var n=[];function r(){var e=n;n=[],t(e)}return function...
  function wn (line 1) | function wn(e,t){gn||(gn=new MutationObserver(En)),mn||(mn=e.createEleme...
  function En (line 1) | function En(){var e=bn;bn=[];for(var t=0;t<e.length;t++)try{e[t]()}catch...
  function jn (line 1) | function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r[0],i=r[1],a=...
  function Ln (line 1) | function Ln(e,t){if(t instanceof e.elementConstructor){var n=_n.get(t);i...
  function On (line 1) | function On(e,t){if(t instanceof e.elementConstructor){var n=Tn.get(t);i...
  function Sn (line 1) | function Sn(e,t){if(t instanceof e.elementConstructor){var n=Tn.get(t);i...
  function An (line 1) | function An(e,t){var n=Tn.get(t);if(n){for(var r=n.slice(0),o=0;o<r.leng...
  function Hn (line 1) | function Hn(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];"childList"===...
  function Rn (line 1) | function Rn(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];if("matches"in...
  function Nn (line 1) | function Nn(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];if("querySelec...
  function In (line 1) | function In(e,t,n){if("matches"in n)for(var r=e.selectorSet.matches(n),o...
  function Bn (line 1) | function Bn(e){var t,n,r;this.rootNode=9===e.nodeType?e.documentElement:...
  function Xn (line 1) | function Xn(){return zn||(zn=new Bn(window.document)),zn}
  function Vn (line 1) | function Vn(){var e;return(e=Xn()).observe.apply(e,arguments)}
  function Yn (line 1) | function Yn(e){return e.split(",").reduce(function(e,t){return e.push(t....
  function $n (line 1) | function $n(){Kn=null,Gn=Un}
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function er (line 1) | function er(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function nr (line 1) | function nr(e,t){setTimeout(function(){var n=t.ownerDocument.createEvent...
  function rr (line 1) | function rr(e){return or(e).then(function(t){var n=e.parentNode;n&&(e.in...
  function or (line 1) | function or(e){var t=e.src,n=tr.get(e);return n&&n.src===t?n.data:(n=t?e...
  function t (line 1) | function t(){return function(e,t){if(!(e instanceof t))throw new TypeErr...
  function t (line 1) | function t(t){return e.apply(this,arguments)}
  function cr (line 1) | function cr(e){ur&&lr(ur),be(e,"menu:activate")&&(document.addEventListe...
  function lr (line 1) | function lr(e){be(e,"menu:deactivate")&&(document.removeEventListener("k...
  function fr (line 1) | function fr(e){if(ur){var t=e.target;o(t instanceof Element,"app/assets/...
  function dr (line 1) | function dr(e){if(ur){var t=document.activeElement;t&&"Escape"===e.key&&...
  function vr (line 1) | function vr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&argu...
  function gr (line 1) | function gr(e){var t=br(e);if(t)return t.defaultView}
  function br (line 1) | function br(e){return e?9===e.nodeType?e:e.ownerDocument?e.ownerDocument...
  function wr (line 1) | function wr(e,t){var n=br(e);if(n){e!==n&&e!==n.defaultView&&e!==n.docum...
  function Lr (line 1) | function Lr(e){o(e instanceof MouseEvent,"app/assets/modules/github/navi...
  function Or (line 1) | function Or(e){if(!Tr){var t=e.currentTarget;if(o(t instanceof HTMLEleme...
  function Ar (line 1) | function Ar(e){if(!(e.target!==document.body&&e.target instanceof HTMLEl...
  function Mr (line 1) | function Mr(e){be(e.currentTarget,"navigation:open",{modifierKey:e.modif...
  function Cr (line 1) | function Cr(e){var t=Br();e!==t&&(t&&Dr(t),e.classList.add("js-active-na...
  function Dr (line 1) | function Dr(e){e.classList.remove("js-active-navigation-container")}
  function Hr (line 1) | function Hr(e,t){t||(t=e);var n=zr(e)[0],r=t.closest(".js-navigation-ite...
  function Rr (line 1) | function Rr(e){var t=e.querySelectorAll(".js-navigation-item[aria-select...
  function Nr (line 1) | function Nr(e,t){var n=zr(t),r=n[n.indexOf(e)-1];if(r){if(Fr(r,t))return...
  function Ir (line 1) | function Ir(e,t){var n=zr(t),r=n[n.indexOf(e)+1];if(r){if(Fr(r,t))return...
  function qr (line 1) | function qr(e,t){null==t&&(t=!1),be(e,"navigation:keyopen",{modifierKey:...
  function Fr (line 1) | function Fr(e,t){return!be(e,"navigation:focus")||(Rr(t),e.classList.add...
  function Br (line 1) | function Br(){return document.querySelector(".js-active-navigation-conta...
  function zr (line 1) | function zr(e){return Array.from(e.querySelectorAll(".js-navigation-item...
  function Xr (line 1) | function Xr(e){return e.getAttribute("data-navigation-scroll")||"item"}
  function Vr (line 1) | function Vr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?argumen...
  function Wr (line 1) | function Wr(e,t){var n=jt(t,e),r=Tt(t,e);null!=n&&null!=r&&(r.bottom<=0&...
  function Jr (line 1) | function Jr(e){var t=e.target;if(t instanceof HTMLElement&&t.nodeType!==...
  function Zr (line 1) | function Zr(e,t){Kr||(Kr=!0,document.addEventListener("focus",Jr,!0)),$r...
  function r (line 1) | function r(t){t.currentTarget.removeEventListener(e,n),t.currentTarget.r...
  function n (line 1) | function n(e){e.currentTarget.removeEventListener("input",t),e.currentTa...
  function eo (line 1) | function eo(){}
  function e (line 1) | function e(){l(this,e),this.previousReceiver={resolve:eo,reject:eo}}
  function ro (line 1) | function ro(e){for(var t=[];e&&(t.push(oo(e)),e!==br(e)&&!e.id);)e=e.par...
  function oo (line 1) | function oo(e){if(e===window)return"window";var t=[e.nodeName.toLowerCas...
  function so (line 1) | function so(e,t){var n=function(e,t){var n=ht(e,"link[rel=pjax-prefetch]...
  function po (line 1) | function po(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,...
  function vo (line 1) | function vo(e){mo({url:e.url,container:e.container})}
  function mo (line 1) | function mo(e){var t,n=(t=c(regeneratorRuntime.mark(function e(t){var n,...
  function go (line 1) | function go(e){o(fo,"app/assets/modules/github/pjax.js:406"),Se(null,"",...
  function Eo (line 1) | function Eo(){return(new Date).getTime()}
  function _o (line 1) | function _o(e){var t=e.cloneNode(!0);return[To(e),Array.from(t.childNode...
  function xo (line 1) | function xo(e){var t=document.createElement("a");return t.href=e,t}
  function ko (line 1) | function ko(e){return e.href.replace(/#.*/,"")}
  function To (line 1) | function To(e){if(e.id)return"#"+e.id;throw new Error("pjax container ha...
  function jo (line 1) | function jo(e,t,n){var r=[],o=!0,i=!1,a=void 0;try{for(var s,u=e[Symbol....
  function Lo (line 1) | function Lo(e,t){e.innerHTML="";var n=!0,r=!1,o=void 0;try{for(var i,a=t...
  function Oo (line 1) | function Oo(e,t){var n,r=e.headers.get("X-PJAX-URL");return r?((n=xo(r))...
  function So (line 1) | function So(e,t,n){o("string"==typeof n.requestUrl,"app/assets/modules/g...
  function Ao (line 1) | function Ao(e){if(e){var t=ht(document,"script[src]",HTMLScriptElement),...
  function Po (line 1) | function Po(e,t){for(;e.length>t;)delete Mo[e.shift()]}
  function Ho (line 1) | function Ho(){var e=!0,t=!1,n=void 0;try{for(var r,o=document.getElement...
  function No (line 1) | function No(e){return new Promise(function(t){setTimeout(function(){t()}...
  function t (line 1) | function t(){return l(this,t),p(this,(t.__proto__||Object.getPrototypeOf...
  function zo (line 1) | function zo(e){return new Promise(function(t){e.addEventListener("dialog...
  function Xo (line 1) | function Xo(e){var t=document.querySelector(".sso-modal");t&&(t.classLis...
  function Vo (line 1) | function Vo(e){var t=document.querySelector("meta[name=sso-expires-aroun...
  function Wo (line 1) | function Wo(e){if(!e)return!0;var t=parseInt(A(e,HTMLMetaElement).conten...
  function Yo (line 1) | function Yo(){Uo=null}
  method json (line 1) | get json(){return n=this,r=JSON.parse(n.text),delete n.json,n.json=r,n.j...
  method html (line 1) | get html(){return n=this,It(Rt(document),n),o=Ft(document,n.text),delete...
  function t (line 1) | function t(e,n){l(this,t);var r=p(this,(t.__proto__||Object.getPrototype...
  function Qo (line 1) | function Qo(){var e=void 0,t=void 0,n=new Promise(function(n,r){e=n,t=r}...
  function ni (line 1) | function ni(e,t){ei||(ei=new G,document.addEventListener("submit",ri)),e...
  function ri (line 1) | function ri(e){var t=A(e.target,HTMLFormElement),n=ei&&ei.matches(t);if(...
  function bi (line 1) | function bi(e,t){return e.closest("task-lists")===t.closest("task-lists")}
  function yi (line 1) | function yi(e){if(e.currentTarget===e.target){var t=e.currentTarget;if(t...
  function wi (line 1) | function wi(e){if(gi){var t=e.currentTarget;t instanceof Element&&(bi(gi...
  function Ei (line 1) | function Ei(e){if(gi){var t=e.currentTarget;if(t instanceof Element&&(gi...
  function _i (line 1) | function _i(){gi&&(gi.dragging.classList.remove("is-dragging"),gi.draggi...
  function xi (line 1) | function xi(e){if(gi){var t=e.currentTarget;t instanceof Element&&(bi(gi...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function Li (line 1) | function Li(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){ki(this,t);var e=ji(this,(t.__proto__||Object.getPrototypeO...
  function Ci (line 1) | function Ci(e){if(!Mi.get(e)){Mi.set(e,!0);var t=e.closest("task-lists")...
  function Di (line 1) | function Di(e){var t=e.currentTarget;if(t instanceof Element){var n=t.cl...
  function Pi (line 1) | function Pi(e){var t=e.currentTarget;t instanceof Element&&t.classList.r...
  function Hi (line 1) | function Hi(e){var t=e.parentElement;return t?t.closest(".contains-task-...
  function Ri (line 1) | function Ri(e){return Hi(e)===Ni(e)}
  function Ni (line 1) | function Ni(e){var t=Hi(e);return t?Ni(t)||t:null}
  function Ii (line 1) | function Ii(e){var t=e.querySelectorAll(".contains-task-list > .task-lis...
  function qi (line 1) | function qi(e){var t=!0,n=!1,r=void 0;try{for(var o,i=e.querySelectorAll...
  function Fi (line 1) | function Fi(e){var t=e.parentElement;if(!t)throw new Error("parent not f...
  function Bi (line 1) | function Bi(e){var t=e.src,n=e.dst,r=t.list.closest("task-lists");r&&r.d...
  function zi (line 1) | function zi(e){var t=e.currentTarget;if(t instanceof Element){var n=t.cl...
  function Xi (line 1) | function Xi(e){if(!gi){var t=e.currentTarget;if(t instanceof Element){va...
  function Vi (line 1) | function Vi(e){if(e.querySelector(".js-task-list-field")){var t=!0,n=!1,...
  function Wi (line 1) | function Wi(e,t,n){var r=dt(e,".js-comment-update",HTMLFormElement);!fun...
  function Yi (line 1) | function Yi(e){return e.dispatchEvent(new CustomEvent("change",{bubbles:...
  function $i (line 1) | function $i(e){var t=Ki.get(e);o(t,"app/assets/modules/github/throttled-...
  function Ji (line 1) | function Ji(e){var t=Ki.get(e.currentTarget);o(t,"app/assets/modules/git...
  function Zi (line 1) | function Zi(e){var t=Ki.get(e.currentTarget);o(t,"app/assets/modules/git...
  function Qi (line 1) | function Qi(e){var t=Ki.get(e.currentTarget);o(t,"app/assets/modules/git...
  function ta (line 1) | function ta(e,t,n){if(0===t&&0===n)return[0,0];var r=na(e);wr(e,{top:r.t...
  function na (line 1) | function na(e){if(e.offsetParent&&e instanceof HTMLElement)return{top:e....
  function oa (line 1) | function oa(e){return new Promise(function(t){if(e===window&&((n=ia)<Yr?...
  function sa (line 1) | function sa(){if(document.activeElement!==document.body)return document....
  function ua (line 1) | function ua(e,t){if(!e)return t();var n=function(e){var t=[];for(;e inst...
  function la (line 1) | function la(e,t){return new Promise(function(n,r){e.onload=function(){20...
  function pa (line 1) | function pa(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&argume...
  function t (line 1) | function t(e,t){return null!=e&&!0!==e||null!=(e=n.name)?"function"==typ...
  function X (line 1) | function X(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` ...
  function V (line 1) | function V(t,n){"clone"!==t.lastPullMode&&(n=!0),o&&o.state!==n&&($(o,"d...
  function W (line 1) | function W(e,t,n){if(e){n=n||L;do{if(">*"===t&&e.parentNode===n||oe(e,t)...
  function U (line 1) | function U(e){var t=e.host;return t&&t.nodeType?t:e.parentNode}
  function Y (line 1) | function Y(e,t,n){e.addEventListener(t,n,C)}
  function G (line 1) | function G(e,t,n){e.removeEventListener(t,n,C)}
  function K (line 1) | function K(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);e...
  function $ (line 1) | function $(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return L.defaultV...
  function J (line 1) | function J(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;i...
  function Z (line 1) | function Z(e,t,n,r,i,a,s,u){e=e||t[T];var c=L.createEvent("Event"),l=e.o...
  function Q (line 1) | function Q(e,t,n,r,o,i,a,s){var u,c,l=e[T],f=l.options.onMove;return(u=L...
  function ee (line 1) | function ee(e){e.draggable=!1}
  function te (line 1) | function te(){H=!1}
  function ne (line 1) | function ne(e){for(var t=e.tagName+e.className+e.src+e.href+e.textConten...
  function re (line 1) | function re(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.prev...
  function oe (line 1) | function oe(e,t){if(e){var n=(t=t.split(".")).shift().toUpperCase(),r=ne...
  function ie (line 1) | function ie(e,t){var n,r;return function(){void 0===n&&(n=arguments,r=th...
  function ae (line 1) | function ae(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])...
  function se (line 1) | function se(e){return S(e,0)}
  function ue (line 1) | function ue(e){return clearTimeout(e)}
  function ya (line 1) | function ya(e,t){var n=new XMLHttpRequest;return n.open("GET",t,!0),n.se...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function e (line 1) | function e(t,n,r){var o,i,a;wa(this,e),this.container=t,this.input=n,thi...
  function Ta (line 1) | function Ta(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){return wa(this,t),_a(this,(t.__proto__||Object.getPrototype...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function Sa (line 1) | function Sa(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){return function(e,t){if(!(e instanceof t))throw new TypeErr...
  function Ma (line 1) | function Ma(e){var t=e.currentTarget;if(t instanceof Element&&t.hasAttri...
  function Ca (line 1) | function Ca(e){if(e.open){var t=e.querySelector("[autofocus]");t&&t.focu...
  function Da (line 1) | function Da(e,t){var n=Array.from(e.querySelectorAll('[role^="menuitem"]...
  function Ha (line 1) | function Ha(e){var t=e.target;if(t instanceof Element){var n=e.currentTa...
  function Ra (line 1) | function Ra(e){var t,n=e.currentTarget;if(!n.querySelector("details[open...
  function Na (line 1) | function Na(e){e.open=!1;var t=e.querySelector("summary");t&&t.focus()}
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function Ua (line 1) | function Ua(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){return Xa(this,t),Wa(this,(t.__proto__||Object.getPrototype...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function Ka (line 1) | function Ka(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function Ja (line 1) | function Ja(e){var t=e.currentTarget;if(t.dragStartX&&t.dragStartY){var ...
  function Za (line 1) | function Za(e){var t=e.target.closest("image-crop"),n=t.getBoundingClien...
  function Qa (line 1) | function Qa(e){var t=e.currentTarget.closest("image-crop");if(e.target.h...
  function es (line 1) | function es(e,t,n){var r=Math.max(Math.abs(t),Math.abs(n),e.minWidth);r=...
  function ts (line 1) | function ts(e){var t=e.currentTarget.closest("image-crop");t.loaded=!0;v...
  function ns (line 1) | function ns(e){var t=e.currentTarget;t.dragStartX=t.dragStartY=null,t.cl...
  function rs (line 1) | function rs(e,t){var n=e.image.naturalWidth/e.image.width;for(var r in t...
  function t (line 1) | function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Ca...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function ss (line 1) | function ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
  function us (line 1) | function us(e,t){if(!e)throw new ReferenceError("this hasn't been initia...
  function cs (line 1) | function cs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("...
  function ls (line 1) | function ls(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){ss(this,t);var e,n=us(this,(t.__proto__||Object.getPrototyp...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){ss(this,t);var e=us(this,(t.__proto__||Object.getPrototypeO...
  function t (line 1) | function t(){return ss(this,t),us(this,(t.__proto__||Object.getPrototype...
  function Ls (line 1) | function Ls(e){return e.trim().split("\n").length>1}
  function Os (line 1) | function Os(e,t){return Array(t+1).join(e)}
  function As (line 1) | function As(e,t){var n=e.value.slice(e.selectionStart,e.selectionEnd),r=...
  function Ms (line 1) | function Ms(e){var t=e.value.slice(0,e.selectionStart),n=e.value.slice(e...
  function Cs (line 1) | function Cs(e,t){var n=e.closest("markdown-toolbar");if(n instanceof Ts)...
  function Hs (line 1) | function Hs(e){return("0"+e).slice(-2)}
  function Rs (line 1) | function Rs(e,t){var n=e.getDay(),r=e.getDate(),o=e.getMonth(),i=e.getFu...
  function Ns (line 1) | function Ns(e){var t=void 0;return function(){if(t)return t;if("Intl"in ...
  function Fs (line 1) | function Fs(){if(null!==Is)return Is;var e=qs();if(e){var t=e.format(new...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function Ys (line 1) | function Ys(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){return Xs(this,t),Us(this,(t.__proto__||Object.getPrototype...
  function t (line 1) | function t(){return Xs(this,t),Us(this,(t.__proto__||Object.getPrototype...
  function e (line 1) | function e(t){Xs(this,e),this.date=t}
  function t (line 1) | function t(){return Xs(this,t),Us(this,(t.__proto__||Object.getPrototype...
  function ru (line 1) | function ru(){var e,t=void 0,n=void 0;for(n=0,e=tu.length;n<e;n++)(t=tu[...
  function t (line 1) | function t(){return Xs(this,t),Us(this,(t.__proto__||Object.getPrototype...
  function t (line 1) | function t(){return Xs(this,t),Us(this,(t.__proto__||Object.getPrototype...
  function au (line 1) | function au(e,t){if(!uu(e,t.textContent)){var n=getSelection();if(null!=...
  function su (line 1) | function su(e,t){if(!uu(e,t)){var n=document.body;if(n){var r=function(e...
  function uu (line 1) | function uu(e,t){var n=navigator.clipboard;return!!n&&(n.writeText(t).th...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function du (line 1) | function du(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function hu (line 1) | function hu(e){var t=e.getAttribute("for"),n=e.getAttribute("value");n?s...
  function pu (line 1) | function pu(e){var t=e.currentTarget;t instanceof HTMLElement&&hu(t)}
  function vu (line 1) | function vu(e){if(" "===e.key||"Enter"===e.key){var t=e.currentTarget;t ...
  function mu (line 1) | function mu(e){e.currentTarget.addEventListener("keydown",vu)}
  function gu (line 1) | function gu(e){e.currentTarget.removeEventListener("keydown",vu)}
  function t (line 1) | function t(){cu(this,t);var e=fu(this,(t.__proto__||Object.getPrototypeO...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function wu (line 1) | function wu(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function xu (line 1) | function xu(e){var t=e.currentTarget;t instanceof Element&&("Escape"===e...
  function ku (line 1) | function ku(e){return!(e.disabled||e.hidden||e.type&&"hidden"===e.type)}
  function Tu (line 1) | function Tu(e){var t=e.currentTarget;if(t instanceof Element){var n=t.qu...
  function t (line 1) | function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Ca...
  function e (line 1) | function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.en...
  function t (line 1) | function t(e,n,r){Ou(this,t);var o=Mu(this,(t.__proto__||Object.getProto...
  function Du (line 1) | function Du(){return Reflect.construct(HTMLElement,[],this.__proto__.con...
  function t (line 1) | function t(){Ou(this,t);var e,n,r,o=Mu(this,(t.__proto__||Object.getProt...
  function e (line 1) | function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?argume...
  function t (line 1) | function t(){return l(this,t),p(this,(t.__proto__||Object.getPrototypeOf...
  function Fu (line 1) | function Fu(e){var t=Nu.get(e.type);void 0===t&&(t=new Map,Nu.set(e.type...
  function e (line 1) | function e(t,n,r,o){l(this,e),this.instance=t,this.element=n,this.name=r...
  function e (line 1) | function e(t,n,r){l(this,e),this.instance=t,this.startNode=n,this.endNod...
  function e (line 1) | function e(t,n,r){l(this,e),this._parts=[],this.template=t,this._partCal...

FILE: test/resources/unicode-error.js
  function ot (line 1) | function ot(e){e=e.replace(/https?:\/\/(m\.)?vk\.com\/([^#]+#\/)?/,"");f...

FILE: web/common-function.js
  function any (line 25) | function any(a, b) {
  function set_editor_mode (line 29) | function set_editor_mode() {
  function run_tests (line 44) | function run_tests() {
  function read_settings_from_cookie (line 69) | function read_settings_from_cookie() {
  function store_settings_to_cookie (line 90) | function store_settings_to_cookie() {
  function unpacker_filter (line 116) | function unpacker_filter(source) {
  function downloadBeautifiedCode (line 154) | function downloadBeautifiedCode() {
  function beautify (line 188) | function beautify() {
  function mergeObjects (line 266) | function mergeObjects(allOptions, additionalOptions) {
  function submitIssue (line 279) | function submitIssue() {
  function getSubmitIssueBody (line 305) | function getSubmitIssueBody(trucate) {
  function copyText (line 353) | function copyText() {
  function selectAll (line 372) | function selectAll() {
  function clearAll (line 380) | function clearAll() {
  function changeToFileContent (line 388) | function changeToFileContent(input) {
  function setPreferredColorScheme (line 403) | function setPreferredColorScheme() {
  function switchTheme (line 415) | function switchTheme(themeToggleEvent) {
Condensed preview — 182 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,699K chars).
[
  {
    "path": ".codeclimate.yml",
    "chars": 232,
    "preview": "engines:\n eslint:\n   enabled: true\n pep8:\n   enabled: true\nratings:\n paths:\n - \"**.js\"\n - \"**.py\"\nexclude_paths:\n- webpa"
  },
  {
    "path": ".gitattributes",
    "chars": 130,
    "preview": "*.java text eol=lf\n*.py text eol=lf\n*.js text eol=lf\n*.json text eol=lf\n*.svg text eol=lf\n*.css text eol=lf\n*.mustache t"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/beautification-problem.md",
    "chars": 1288,
    "preview": "---\nname: Beautification problem\nabout: You tried using the beautifier and the resulting format was not what you expecte"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 545,
    "preview": "---\nname: Feature request\nabout: You want new functionality added to the beautifier\n\n---\n\n# Description\n<!--\nThis is the"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/question-about-usage.md",
    "chars": 312,
    "preview": "---\nname: Question about usage\nabout: You have a question about how to use the beautifier\n\n---\n\n# **DO NOT FILE USAGE QU"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 445,
    "preview": "# Description\n- [ ] Source branch in your fork has meaningful name (not `main`)\n\n\nFixes Issue: \n\n\n\n# Before Merge Checkl"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 1015,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 2379,
    "preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
  },
  {
    "path": ".github/workflows/main.yml",
    "chars": 1374,
    "preview": "name: CI\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\n\n\njobs:\n  build:\n    name: B"
  },
  {
    "path": ".github/workflows/milestone-publish.yml",
    "chars": 2445,
    "preview": "# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created\n# For "
  },
  {
    "path": ".github/workflows/pr-staging.yml",
    "chars": 1492,
    "preview": "# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created\n# For "
  },
  {
    "path": ".github/workflows/ssh_config.txt",
    "chars": 272,
    "preview": "Host beautifier-github.com\n   HostName github.com\n   IdentityFile ~/.ssh/deploy_beautifier_io\n   IdentitiesOnly yes\n   \n"
  },
  {
    "path": ".gitignore",
    "chars": 259,
    "preview": "*.orig\nnode_modules\ngh-pages\ngh\n\n*.pyc\npython/setup.py\npython/*/__pycache__\npython/MANIFEST\npython/build\npython/dist\npyt"
  },
  {
    "path": ".jshintignore",
    "chars": 155,
    "preview": "dist/**\njs/bin/**\njs/lib/**\njs/test/resources/**\nnode_modules/**\npython/**\ntarget/**\ntools/**\ntest/resources/*\nweb/lib/*"
  },
  {
    "path": ".jshintrc",
    "chars": 198,
    "preview": "{\n  \"bitwise\": true,\n  \"curly\": true,\n  \"eqeqeq\": true,\n  \"noarg\": true,\n  \"nocomma\": true,\n  \"node\": true,\n  \"nonbsp\": "
  },
  {
    "path": ".npmignore",
    "chars": 267,
    "preview": "# ANY FUTURE CHANGES TO THIS FILE NEED TO BE MANUALLY TESTED LOCALLY\n# USE npm pack AND VERIFY THAT PACKAGE CONTENTS ARE"
  },
  {
    "path": ".pylintrc",
    "chars": 18,
    "preview": "max-line-length=88"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 46583,
    "preview": "# Changelog\n\n## v1.15.4\n* Downgrade nopt to v7.x to maintain Node.js v14 compatibility ([#2358](https://github.com/beaut"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3215,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 6972,
    "preview": "# Contributing\n\n\n## Report Issues and Request Changes\nIf you find a bug, please report it, including environment and exa"
  },
  {
    "path": "LICENSE",
    "chars": 1119,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\nPermission is hereby gra"
  },
  {
    "path": "Makefile",
    "chars": 5444,
    "preview": "PROJECT_ROOT=$(subst \\,/,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))\nBUILD_DIR=$(PROJECT_ROOT)build\nSCRIPT_DIR=$(P"
  },
  {
    "path": "README.md",
    "chars": 19715,
    "preview": "<p align=\"center\"><img src=\"https://raw.githubusercontent.com/beautifier/js-beautify/7db71fc/web/wordmark-light.svg\" hei"
  },
  {
    "path": "bower.json",
    "chars": 168,
    "preview": "{\n  \"name\": \"js-beautify\",\n  \"main\": [\n    \"./js/lib/beautify.js\",\n    \"./js/lib/beautify-css.js\",\n    \"./js/lib/beautif"
  },
  {
    "path": "index.html",
    "chars": 22874,
    "preview": "<!doctype html>\n<html lang=\"en-US\" dir=\"ltr\" prefix=\"og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#\">\n\n<head>\n  <meta na"
  },
  {
    "path": "js/bin/css-beautify.js",
    "chars": 72,
    "preview": "#!/usr/bin/env node\nvar cli = require('../lib/cli'); cli.interpret();\n\n\n"
  },
  {
    "path": "js/bin/html-beautify.js",
    "chars": 72,
    "preview": "#!/usr/bin/env node\nvar cli = require('../lib/cli'); cli.interpret();\n\n\n"
  },
  {
    "path": "js/bin/js-beautify.js",
    "chars": 70,
    "preview": "#!/usr/bin/env node\n\nvar cli = require('../lib/cli');\ncli.interpret();"
  },
  {
    "path": "js/config/defaults.json",
    "chars": 600,
    "preview": "{\n    \"indent_size\": 4,\n    \"indent_char\": \" \",\n    \"indent_level\": 0,\n    \"indent_with_tabs\": false,\n    \"preserve_newl"
  },
  {
    "path": "js/index.js",
    "chars": 2903,
    "preview": "/*jshint node:true */\n/* globals define */\n/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam N"
  },
  {
    "path": "js/src/cli.js",
    "chars": 25336,
    "preview": "#!/usr/bin/env node\n\n/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributor"
  },
  {
    "path": "js/src/core/directives.js",
    "chars": 2403,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/inputscanner.js",
    "chars": 5634,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/options.js",
    "chars": 6766,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/output.js",
    "chars": 12355,
    "preview": "/*jshint node:true */\n/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributo"
  },
  {
    "path": "js/src/core/pattern.js",
    "chars": 3021,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/templatablepattern.js",
    "chars": 7623,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/token.js",
    "chars": 1851,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/tokenizer.js",
    "chars": 4061,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/tokenstream.js",
    "chars": 2259,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/core/whitespacepattern.js",
    "chars": 3412,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/css/beautifier.js",
    "chars": 18035,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/css/index.js",
    "chars": 1539,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/css/options.js",
    "chars": 2241,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/css/tokenizer.js",
    "chars": 1201,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/html/beautifier.js",
    "chars": 37663,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/html/index.js",
    "chars": 1589,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/html/options.js",
    "chars": 4287,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/html/tokenizer.js",
    "chars": 14539,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/index.js",
    "chars": 1666,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/javascript/acorn.js",
    "chars": 10052,
    "preview": "/* jshint node: true, curly: false */\n// Parts of this section of code is taken from acorn.\n//\n// Acorn was written by M"
  },
  {
    "path": "js/src/javascript/beautifier.js",
    "chars": 57707,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/javascript/index.js",
    "chars": 1543,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/javascript/options.js",
    "chars": 4058,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/javascript/tokenizer.js",
    "chars": 20166,
    "preview": "/*jshint node:true */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contribut"
  },
  {
    "path": "js/src/unpackers/javascriptobfuscator_unpacker.js",
    "chars": 4128,
    "preview": "/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n  Permission is "
  },
  {
    "path": "js/src/unpackers/myobfuscate_unpacker.js",
    "chars": 3910,
    "preview": "/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n  Permission is "
  },
  {
    "path": "js/src/unpackers/p_a_c_k_e_r_unpacker.js",
    "chars": 4913,
    "preview": "/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n  Permission is "
  },
  {
    "path": "js/src/unpackers/urlencode_unpacker.js",
    "chars": 3293,
    "preview": "/*global unescape */\n/*jshint curly: false, scripturl: true */\n\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 E"
  },
  {
    "path": "js/test/amd-beautify-tests.js",
    "chars": 2022,
    "preview": "/*jshint node:true */\n\n'use strict';\n\nvar requirejs = require('requirejs'),\n  SanityTest = require('./sanitytest'),\n  Ur"
  },
  {
    "path": "js/test/core/test_inputscanner.js",
    "chars": 10309,
    "preview": "/*jshint mocha:true */\n'use strict';\n\nvar assert = require('assert');\nvar InputScanner = require('../../src/core/inputsc"
  },
  {
    "path": "js/test/core/test_options.js",
    "chars": 5560,
    "preview": "/*jshint mocha:true */\n'use strict';\n\nvar assert = require('assert');\nvar options = require('../../src/core/options');\n\n"
  },
  {
    "path": "js/test/node-beautify-css-perf-tests.js",
    "chars": 1024,
    "preview": "/*global js_beautify: true */\n/*jshint node:true */\n/*jshint unused:false */\n\n'use strict';\n\nvar fs = require('fs'),\n  S"
  },
  {
    "path": "js/test/node-beautify-html-perf-tests.js",
    "chars": 1462,
    "preview": "/*global js_beautify: true */\n/*jshint node:true */\n/*jshint unused:false */\n\n'use strict';\n\nvar fs = require('fs'),\n  S"
  },
  {
    "path": "js/test/node-beautify-perf-tests.js",
    "chars": 1424,
    "preview": "/*global js_beautify: true */\n/*jshint node:true */\n/*jshint unused:false */\n\n'use strict';\n\nvar fs = require('fs'),\n  S"
  },
  {
    "path": "js/test/node-beautify-tests.js",
    "chars": 2895,
    "preview": "/*jshint node:true */\n\n'use strict';\n\nvar SanityTest = require('./sanitytest'),\n  Urlencoded = require('../lib/unpackers"
  },
  {
    "path": "js/test/node-src-index-tests.js",
    "chars": 1532,
    "preview": "#!/usr/bin/env node\n\n/*jshint node:true */\n\n'use strict';\n\nvar SanityTest = require('./sanitytest'),\n  Urlencoded = requ"
  },
  {
    "path": "js/test/resources/configerror/.jsbeautifyrc",
    "chars": 103,
    "preview": "{\n    \"indent_size\": 11,\n    \"indent_char\": \" \"\n    \"indent_level\": 0,\n    \"indent_with_tabs\": false\n}\n"
  },
  {
    "path": "js/test/resources/configerror/subDir1/subDir2/empty.txt",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "js/test/resources/editorconfig/.editorconfig",
    "chars": 86,
    "preview": "root = true\n\n[*.js]\nindent_style = space\nindent_size = 2\ninsert_final_newline = false\n"
  },
  {
    "path": "js/test/resources/editorconfig/cr/.editorconfig",
    "chars": 25,
    "preview": "\n[*.js]\nend_of_line = cr\n"
  },
  {
    "path": "js/test/resources/editorconfig/crlf/.editorconfig",
    "chars": 27,
    "preview": "\n[*.js]\nend_of_line = crlf\n"
  },
  {
    "path": "js/test/resources/editorconfig/error/.editorconfig",
    "chars": 42,
    "preview": "Random stuff in here to cause parse error\n"
  },
  {
    "path": "js/test/resources/editorconfig/example-base.js",
    "chars": 99,
    "preview": "function indentMe() {\n    \"no, me!\"; // indent_size 4, will be beautified to 2 with editorconfig\n}\n"
  },
  {
    "path": "js/test/resources/example1.js",
    "chars": 35,
    "preview": "function indentMe() {\n\"no, me!\";\n}\n"
  },
  {
    "path": "js/test/resources/indent11chars/.jsbeautifyrc",
    "chars": 104,
    "preview": "{\n    \"indent_size\": 11,\n    \"indent_char\": \" \",\n    \"indent_level\": 0,\n    \"indent_with_tabs\": false\n}\n"
  },
  {
    "path": "js/test/resources/indent11chars/subDir1/subDir2/empty.txt",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "js/test/run-tests",
    "chars": 475,
    "preview": "#!/usr/bin/spidermonkey-1.7 -s\n\n//#!/usr/bin/js\n\n// a little helper for testing from command line\n// just run it, it wil"
  },
  {
    "path": "js/test/sanitytest.js",
    "chars": 4280,
    "preview": "//\n// simple testing interface\n// written by Einar Lielmanis, einar@beautifier.io\n//\n// usage:\n//\n// var t = new SanityT"
  },
  {
    "path": "js/test/shell-test.sh",
    "chars": 19005,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "jsbeautifyrc",
    "chars": 608,
    "preview": "{\n    \"indent_size\": 2,\n    \"indent_char\": \" \",\n    \"indent_level\": 0,\n    \"end-with-newline\": true,\n    \"indent_with_ta"
  },
  {
    "path": "package.json",
    "chars": 1856,
    "preview": "{\n  \"name\": \"js-beautify\",\n  \"version\": \"1.15.4\",\n  \"description\": \"beautifier.io for node\",\n  \"main\": \"js/index.js\",\n  "
  },
  {
    "path": "python/MANIFEST.in",
    "chars": 45,
    "preview": "include js-beautify\ninclude js-beautify-test\n"
  },
  {
    "path": "python/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/css-beautify",
    "chars": 121,
    "preview": "#! /usr/bin/env python\n#\n# Stub script to run cssbeautifier\n#\nimport sys\nfrom cssbeautifier import main\nsys.exit(main())"
  },
  {
    "path": "python/cssbeautifier/__init__.py",
    "chars": 1888,
    "preview": "#\n# The MIT License (MIT)\n\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n# Permission is he"
  },
  {
    "path": "python/cssbeautifier/__version__.py",
    "chars": 23,
    "preview": "__version__ = \"1.15.4\"\n"
  },
  {
    "path": "python/cssbeautifier/_main.py",
    "chars": 6913,
    "preview": "#\n# The MIT License (MIT)\n\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n# Permission is he"
  },
  {
    "path": "python/cssbeautifier/css/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/cssbeautifier/css/beautifier.py",
    "chars": 22241,
    "preview": "from __future__ import print_function\nimport sys\nimport re\nimport copy\nfrom .options import BeautifierOptions\nfrom jsbea"
  },
  {
    "path": "python/cssbeautifier/css/options.py",
    "chars": 2392,
    "preview": "#\n# The MIT License (MIT)\n\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n# Permission is he"
  },
  {
    "path": "python/cssbeautifier/tests/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/debian/.gitignore",
    "chars": 62,
    "preview": "/files\n/*.log\n/*.debhelper\n/*.substvars\n/python3-jsbeautifier\n"
  },
  {
    "path": "python/debian/changelog",
    "chars": 177,
    "preview": "jsbeautifier (1.5.10-1) smurf; urgency=low\n\n  * source package automatically created by stdeb 0.8.2\n\n -- Matthias Urlich"
  },
  {
    "path": "python/debian/compat",
    "chars": 2,
    "preview": "9\n"
  },
  {
    "path": "python/debian/control",
    "chars": 406,
    "preview": "Source: jsbeautifier\nMaintainer: Matthias Urlichs <matthias@urlichs.de>\nSection: python\nPriority: optional\nBuild-Depends"
  },
  {
    "path": "python/debian/rules",
    "chars": 193,
    "preview": "#!/usr/bin/make -f\n\n# This file was automatically generated by stdeb 0.8.2 at\n# Sun, 13 Dec 2015 17:36:34 +0100\nexport P"
  },
  {
    "path": "python/debian/source/format",
    "chars": 12,
    "preview": "3.0 (quilt)\n"
  },
  {
    "path": "python/js-beautify-profile",
    "chars": 954,
    "preview": "#! /usr/bin/env python\n\n# To run this: ./js-beautify/tools/python-dev python ./python/js-beautify-profile\n\nimport sys\nim"
  },
  {
    "path": "python/js-beautify-test",
    "chars": 141,
    "preview": "#! /bin/sh\n#\n# Test suite launcher\n#\n\nif [ -z $PYTHON ]; then\n    env python js-beautify-test.py\nelse\n    env $PYTHON js"
  },
  {
    "path": "python/js-beautify-test.py",
    "chars": 370,
    "preview": "#!/usr/bin/env python\n\nimport sys\nimport unittest\n\n\ndef run_tests():\n    suite = unittest.TestLoader().discover(\"jsbeaut"
  },
  {
    "path": "python/jsbeautifier/__init__.py",
    "chars": 11331,
    "preview": "from __future__ import print_function\nimport sys\nimport os\nimport platform\nimport io\nimport getopt\nimport re\nimport stri"
  },
  {
    "path": "python/jsbeautifier/__version__.py",
    "chars": 23,
    "preview": "__version__ = \"1.15.4\"\n"
  },
  {
    "path": "python/jsbeautifier/cli/__init__.py",
    "chars": 8722,
    "preview": "from __future__ import print_function\nimport sys\nimport os\nimport platform\nimport io\nimport getopt\nimport re\nimport stri"
  },
  {
    "path": "python/jsbeautifier/core/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/jsbeautifier/core/directives.py",
    "chars": 2193,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/inputscanner.py",
    "chars": 4643,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/options.py",
    "chars": 8150,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/output.py",
    "chars": 12080,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/pattern.py",
    "chars": 3018,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/templatablepattern.py",
    "chars": 7809,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/token.py",
    "chars": 1582,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/tokenizer.py",
    "chars": 4389,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/tokenstream.py",
    "chars": 2348,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/core/whitespacepattern.py",
    "chars": 2756,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/javascript/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/jsbeautifier/javascript/acorn.py",
    "chars": 9480,
    "preview": "import re\n\n# This section of code was translated to python from acorn (javascript).\n#\n# Acorn was written by Marijn Have"
  },
  {
    "path": "python/jsbeautifier/javascript/beautifier.py",
    "chars": 65043,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/javascript/options.py",
    "chars": 4486,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/javascript/tokenizer.py",
    "chars": 22905,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n#\n# Permission is he"
  },
  {
    "path": "python/jsbeautifier/tests/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/jsbeautifier/tests/core/__init__.py",
    "chars": 16,
    "preview": "# Empty file :)\n"
  },
  {
    "path": "python/jsbeautifier/tests/core/test_inputscanner.py",
    "chars": 7607,
    "preview": "import re\nimport unittest\nfrom ...core.inputscanner import InputScanner\n\n\nclass TestInputScanner(unittest.TestCase):\n   "
  },
  {
    "path": "python/jsbeautifier/tests/core/test_options.py",
    "chars": 5880,
    "preview": "import re\nimport unittest\nfrom ...core.options import _mergeOpts, _normalizeOpts, Options\n\n\nclass TestOptions(unittest.T"
  },
  {
    "path": "python/jsbeautifier/tests/shell-test.sh",
    "chars": 19107,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "python/jsbeautifier/tests/testindentation.py",
    "chars": 1415,
    "preview": "import re\nimport unittest\nimport jsbeautifier\n\n\nclass TestJSBeautifierIndentation(unittest.TestCase):\n    def test_tabs("
  },
  {
    "path": "python/jsbeautifier/unpackers/README.specs.mkd",
    "chars": 1017,
    "preview": "# UNPACKERS SPECIFICATIONS\n\nNothing very difficult: an unpacker is a submodule placed in the directory\nwhere this file w"
  },
  {
    "path": "python/jsbeautifier/unpackers/__init__.py",
    "chars": 2321,
    "preview": "#\n# General code for JSBeautifier unpackers infrastructure. See README.specs\n#     written by Stefano Sanfilippo <a.litt"
  },
  {
    "path": "python/jsbeautifier/unpackers/evalbased.py",
    "chars": 1173,
    "preview": "#\n# Unpacker for eval() based packers, a part of javascript beautifier\n# by Einar Lielmanis <einar@beautifier.io>\n#\n#   "
  },
  {
    "path": "python/jsbeautifier/unpackers/javascriptobfuscator.py",
    "chars": 1790,
    "preview": "#\n# simple unpacker/deobfuscator for scripts messed up with\n# javascriptobfuscator.com\n#\n#     written by Einar Lielmani"
  },
  {
    "path": "python/jsbeautifier/unpackers/myobfuscate.py",
    "chars": 2762,
    "preview": "#\n# deobfuscator for scripts messed up with myobfuscate.com\n# by Einar Lielmanis <einar@beautifier.io>\n#\n#     written b"
  },
  {
    "path": "python/jsbeautifier/unpackers/packer.py",
    "chars": 4954,
    "preview": "#\n# Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier\n# by Einar Lielmanis <einar@beautifier.io>\n#"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/__init__.py",
    "chars": 40,
    "preview": "# Empty file :)\n# pylint: disable=C0111\n"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/test-myobfuscate-input.js",
    "chars": 6883,
    "preview": "var OO0=[\"\\x41\\x42\\x43\\x44\\x45\\x46\\x47\\x48\\x49\\x4A\\x4B\\x4C\\x4D\\x4E\\x4F\\x50\\x51\\x52\\x53\\x54\\x55\\x56\\x57\\x58\\x59\\x5A\\x61\\x"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/test-myobfuscate-output.js",
    "chars": 2380,
    "preview": "//\n// Unpacker warning: be careful when using myobfuscate.com for your projects:\n// scripts obfuscated by the free onlin"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/test-packer-62-input.js",
    "chars": 3802,
    "preview": "eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toStrin"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/test-packer-non62-input.js",
    "chars": 4458,
    "preview": "var isIE=(navigator[\"appVersion\"][\"indexOf\"](\"MSIE\")!=-1)?true:false;var isWin=(navigator[\"appVersion\"][\"toLowerCase\"]()"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/testjavascriptobfuscator.py",
    "chars": 1612,
    "preview": "#\n#     written by Stefano Sanfilippo <a.little.coder@gmail.com>\n#\n\n\"\"\"Tests for JavaScriptObfuscator unpacker.\"\"\"\n\nimpo"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/testmyobfuscate.py",
    "chars": 1199,
    "preview": "#\n#     written by Stefano Sanfilippo <a.little.coder@gmail.com>\n#\n\n\"\"\"Tests for MyObfuscate unpacker.\"\"\"\n\nimport unitte"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/testpacker.py",
    "chars": 3807,
    "preview": "# -*- coding: utf-8 -*-\n#\n#     written by Stefano Sanfilippo <a.little.coder@gmail.com>\n#\n\n\"\"\"Tests for P.A.C.K.E.R. un"
  },
  {
    "path": "python/jsbeautifier/unpackers/tests/testurlencode.py",
    "chars": 1046,
    "preview": "#\n#     written by Stefano Sanfilippo <a.little.coder@gmail.com>\n#\n\n\"\"\"Tests for urlencoded unpacker.\"\"\"\n\nimport unittes"
  },
  {
    "path": "python/jsbeautifier/unpackers/urlencode.py",
    "chars": 981,
    "preview": "#\n# Trivial bookmarklet/escaped script detector for the javascript beautifier\n#     written by Einar Lielmanis <einar@be"
  },
  {
    "path": "python/pyproject.toml",
    "chars": 218,
    "preview": "[tool.black]\ntarget-version = ['py33', 'py36', 'py37', 'py38']\nexclude = '''\n/(\n    \\.eggs\n  | \\.git\n  | \\.hg\n  | \\.mypy"
  },
  {
    "path": "python/setup-css.py",
    "chars": 722,
    "preview": "#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom cssbeautifier.__version__ import __version__\n\nsetup(\n    name=\""
  },
  {
    "path": "python/setup-js.py",
    "chars": 912,
    "preview": "#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom jsbeautifier.__version__ import __version__\n\nsetup(\n    name=\"j"
  },
  {
    "path": "python/test-perf-cssbeautifier.py",
    "chars": 810,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport io\nimport os\nimport copy\nimport cssbeautifier\n\noptions = cssbeauti"
  },
  {
    "path": "python/test-perf-jsbeautifier.py",
    "chars": 1586,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport io\nimport os\nimport copy\nimport jsbeautifier\n\noptions = jsbeautifi"
  },
  {
    "path": "test/data/css/node.mustache",
    "chars": 12197,
    "preview": "/*\n{{&header_text}}\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n"
  },
  {
    "path": "test/data/css/python.mustache",
    "chars": 11503,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n'''\n{{&header_text}}\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 "
  },
  {
    "path": "test/data/css/tests.js",
    "chars": 72338,
    "preview": "/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n  Permission is h"
  },
  {
    "path": "test/data/html/node.mustache",
    "chars": 15866,
    "preview": "/*\n{{&header_text}}\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n"
  },
  {
    "path": "test/data/html/tests.js",
    "chars": 144370,
    "preview": "/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n  Permission is h"
  },
  {
    "path": "test/data/javascript/inputlib.js",
    "chars": 1568,
    "preview": "//--------//\n// Inputs //\n//--------//\n\nvar operator_position = {\n  sanity: [\n    'var res = a + b - c / d * e % f;',\n  "
  },
  {
    "path": "test/data/javascript/node.mustache",
    "chars": 21884,
    "preview": "/*\n{{&header_text}}\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n"
  },
  {
    "path": "test/data/javascript/python.mustache",
    "chars": 30824,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n'''\n{{&header_text}}\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 "
  },
  {
    "path": "test/data/javascript/tests.js",
    "chars": 196561,
    "preview": "/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n  Permission is h"
  },
  {
    "path": "test/generate-tests.js",
    "chars": 7794,
    "preview": "#!/usr/bin/env node\n\n/*\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributor"
  },
  {
    "path": "test/resources/github-min.js",
    "chars": 218281,
    "preview": "!function(e){var t={};function n(e){if(e in t)return t[e];throw new Error(\"dependency not found: \"+e)}e.define=function("
  },
  {
    "path": "test/resources/github.css",
    "chars": 386916,
    "preview": "/*!\n * Primer-product\n * http://primer.github.io\n *\n * Released under MIT license. Copyright (c) 2018 GitHub Inc.\n */.fl"
  },
  {
    "path": "test/resources/github.html",
    "chars": 435657,
    "preview": "<!DOCTYPE html>\n<!-- saved from url=(0019)https://github.com/ -->\n<html lang=\"en\"><head><meta http-equiv=\"Content-Type\" "
  },
  {
    "path": "test/resources/html-with-base64image.html",
    "chars": 211379,
    "preview": "<p><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXkAAAEdCAYAAADpZhdxAAAgAElEQVR4Acy9CbB2W1rX91977/d9z/DNd+huQ"
  },
  {
    "path": "test/resources/underscore-min.js",
    "chars": 15626,
    "preview": "//     Underscore.js 1.7.0\n//     http://underscorejs.org\n//     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Invest"
  },
  {
    "path": "test/resources/underscore.js",
    "chars": 48495,
    "preview": "//     Underscore.js 1.7.0\n//     http://underscorejs.org\n//     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Invest"
  },
  {
    "path": "test/resources/unicode-error.js",
    "chars": 996,
    "preview": "T(e){var C,T,E,x,A,M,P,D,N,z,B=[],H={},j={},R={},L={},q=!1,I=null,F=null,O=null,U=0,X=[],Y=null,V=null,W=null,G=!1,Q=!1,"
  },
  {
    "path": "tools/build.sh",
    "chars": 2115,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "tools/generate-changelog.sh",
    "chars": 1748,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\n\n# based on http"
  },
  {
    "path": "tools/git-status-clear.sh",
    "chars": 846,
    "preview": "#!/usr/bin/env bash\n\necho \"Post-build git status check...\"\necho \"Ensuring no changes visible to git have been made to '$"
  },
  {
    "path": "tools/node",
    "chars": 42,
    "preview": "#!/usr/bin/env bash\n\n/usr/bin/env node $@\n"
  },
  {
    "path": "tools/npm",
    "chars": 840,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "tools/python",
    "chars": 44,
    "preview": "#!/usr/bin/env bash\n\n/usr/bin/env python $@\n"
  },
  {
    "path": "tools/python-dev",
    "chars": 372,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "tools/python-dev3",
    "chars": 370,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "tools/python-rel",
    "chars": 372,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\nPROJECT_DIR=\"`( "
  },
  {
    "path": "tools/release-all.sh",
    "chars": 3990,
    "preview": "#!/usr/bin/env bash\n\nREL_SCRIPT_DIR=\"`dirname \\\"$0\\\"`\"\nSCRIPT_DIR=\"`( cd \\\"$REL_SCRIPT_DIR\\\" && pwd )`\"\n\ncase \"$OSTYPE\" "
  },
  {
    "path": "tools/template/beautify-css.wrapper.js",
    "chars": 3455,
    "preview": "/* AUTO-GENERATED. DO NOT MODIFY. */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman"
  },
  {
    "path": "tools/template/beautify-html.wrapper.js",
    "chars": 4995,
    "preview": "/* AUTO-GENERATED. DO NOT MODIFY. */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman"
  },
  {
    "path": "tools/template/beautify.wrapper.js",
    "chars": 4655,
    "preview": "/* AUTO-GENERATED. DO NOT MODIFY. */\n/*\n\n  The MIT License (MIT)\n\n  Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman"
  },
  {
    "path": "web/common-function.js",
    "chars": 13870,
    "preview": "/*jshint strict:false, node:false */\n/*exported run_tests, read_settings_from_cookie, beautify, submitIssue, copyText, s"
  },
  {
    "path": "web/common-style.css",
    "chars": 3819,
    "preview": "body {\n  background: #eee;\n  color: #333;\n  height: 95vh;\n  margin: 8px;\n  max-width: 100%;\n  font: 13px/1.231 arial, sa"
  },
  {
    "path": "web/google-analytics.js",
    "chars": 475,
    "preview": "(function(i, s, o, g, r, a, m) {\n  i['GoogleAnalyticsObject'] = r;\n  i[r] = i[r] || function() {\n    (i[r].q = i[r].q ||"
  },
  {
    "path": "web/onload.js",
    "chars": 1558,
    "preview": "/*jshint node:false, jquery:true, strict:false */\n$(function() {\n\n  read_settings_from_cookie();\n  $.getJSON(\"./package."
  },
  {
    "path": "webpack.config.js",
    "chars": 1569,
    "preview": "var path = require('path');\n\nvar legacy = {\n  mode: 'none',\n  entry: {\n    beautify_js: './js/src/javascript/index.js',\n"
  }
]

About this extraction

This page contains the full source code of the einars/js-beautify GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 182 files (2.5 MB), approximately 660.2k tokens, and a symbol index with 794 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!