# @the-/code

> Code formatter of the-frameworks

Latest version **15.18.2** (published 2021-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @the-/code
pnpm add @the-/code
yarn add @the-/code
bun add @the-/code
```

Provides the command `the-code`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 15.18.2 |
| Published | 2021-05-06 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 17 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | lib, the |

## Links

- npm: https://www.npmjs.com/package/@the-/code
- Repository: https://github.com/the-labo/the
- Homepage: https://github.com/the-labo/the/tree/master/packages/code#readme
- Issues: https://github.com/the-labo/the#issues
- npm.io page: https://npm.io/package/@the-/code

## Dependencies (17)

- [asfs](https://npm.io/package/asfs.md) ^2.3.0
- [yaml](https://npm.io/package/yaml.md) ^1.10.0
- [aglob](https://npm.io/package/aglob.md) ^3.0.2
- [debug](https://npm.io/package/debug.md) ^4.2.0
- [ignore](https://npm.io/package/ignore.md) ^5.1.8
- [fmtjson](https://npm.io/package/fmtjson.md) ^5.0.2
- [postcss](https://npm.io/package/postcss.md) ^8.1.1
- [prettier](https://npm.io/package/prettier.md) ^2.1.2
- [writeout](https://npm.io/package/writeout.md) ^2.3.4
- [@the-/ast](https://npm.io/package/@the-/ast.md) ^16.2.6
- [commander](https://npm.io/package/commander.md) ^6.1.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [colorprint](https://npm.io/package/colorprint.md) ^6.1.1
- [comment-parser](https://npm.io/package/comment-parser.md) ^0.7.6
- [@the-/util-file](https://npm.io/package/@the-/util-file.md) ^15.7.7
- [@the-/util-path](https://npm.io/package/@the-/util-path.md) ^15.4.4
- [@the-/const-code](https://npm.io/package/@the-/const-code.md) ^15.5.2

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 15.18.2 (latest) — 2021-05-06
- 15.18.1 — 2021-04-13
- 15.18.0 — 2020-10-09
- 15.17.5 — 2020-10-03
- 15.17.4 — 2020-10-01
- 15.17.3 — 2020-10-01
- 15.17.2 — 2020-07-23
- 15.17.1 — 2020-06-05
- 15.17.0 — 2020-05-26
- 15.16.6 — 2020-05-21
- 15.16.5 — 2020-05-16
- 15.16.2 — 2020-03-26
- 15.16.1 — 2020-03-24
- 15.16.0 — 2020-03-23
- 15.15.24 — 2020-02-22
- … 170 more at https://npm.io/package/@the-/code/versions

## README

@the-/code
==========

<!---
This file is generated by @the-/templates. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![npm Version][bd_npm_shield_url]][bd_npm_url]

[bd_repo_url]: https://github.com/the-labo/the
[bd_npm_url]: http://www.npmjs.org/package/@the-/code
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/code.svg?style=flat

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Code formatter of the-frameworks

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>




<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/readme/01.Installation.md.hbs" Start -->

<a name="section-doc-readme-01-installation-md"></a>

Installation
-----

```bash
$ npm install @the-/code --save
```


<!-- Section from "doc/readme/01.Installation.md.hbs" End -->

<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->

<a name="section-doc-readme-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

const { TheCode } = require('@the-/code')

async function tryExample() {
  const theCode = new TheCode()
  await theCode.format('src/**/*.js')
}

tryExample().catch((err) => console.error(err))

```


<!-- Section from "doc/readme/02.Usage.md.hbs" End -->


<!-- Sections Start -->

<a name="api"></a>

## API Guide


- astHelper
  - [.isAssignmentPattern()](./doc/api/api.md#astHelper.isAssignmentPattern)
  - [.isEmptyObjectPattern()](./doc/api/api.md#astHelper.isEmptyObjectPattern)
  - [.isImportDefaultSpecifier()](./doc/api/api.md#astHelper.isImportDefaultSpecifier)
  - [.isImportSpecifier()](./doc/api/api.md#astHelper.isImportSpecifier)
  - [.isObjectPattern()](./doc/api/api.md#astHelper.isObjectPattern)
  - [.isRequireExpression()](./doc/api/api.md#astHelper.isRequireExpression)
- module:@the-/code
  - [.applyConverter(content,convert,options&#x3D;)](./doc/api/api.md#module_@the-/code.applyConverter)
  - [.astHelper](./doc/api/api.md#module_@the-/code.astHelper)
  - [.constants](./doc/api/api.md#module_@the-/code.constants)
  - [.contentAccess(content)](./doc/api/api.md#module_@the-/code.contentAccess)
  - [.create(args)](./doc/api/api.md#module_@the-/code.create)
  - [.FormatCache](./doc/api/api.md#module_@the-/code.FormatCache)
  - [.helpers](./doc/api/api.md#module_@the-/code.helpers)
  - [.parsers](./doc/api/api.md#module_@the-/code.parsers)
  - [.processors](./doc/api/api.md#module_@the-/code.processors)
  - [.run(pattern,options&#x3D;)](./doc/api/api.md#module_@the-/code.run)
  - [.TheCode](./doc/api/api.md#module_@the-/code.TheCode)
- module:@the-/code.ast
  - [.nodes](./doc/api/api.md#module_@the-/code.ast.nodes)
- module:@the-/code.ast.nodes
  - [.addExtOnRequireDeclarationArgumentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.addExtOnRequireDeclarationArgumentNode)
  - [.calcNumericOperationOnBinaryExpressionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.calcNumericOperationOnBinaryExpressionNode)
  - [.cleanupEmptyArrayPatternParamsOnFunctionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupEmptyArrayPatternParamsOnFunctionNode)
  - [.cleanupEmptyLineBetweenPropertiesOnObjectExpressionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupEmptyLineBetweenPropertiesOnObjectExpressionNode)
  - [.cleanupEmptyObjectPatternParamsOnFunctionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupEmptyObjectPatternParamsOnFunctionNode)
  - [.cleanupExtOnImportDeclarationNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupExtOnImportDeclarationNode)
  - [.cleanupExtOnRequireDeclarationArgumentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupExtOnRequireDeclarationArgumentNode)
  - [.cleanupRedundantAliasOnObjectPatternNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupRedundantAliasOnObjectPatternNode)
  - [.cleanupRedundantAliasOnObjectPatternNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupRedundantAliasOnObjectPatternNode)
  - [.cleanupRedundantArrayPatternOnArrayExpression()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupRedundantArrayPatternOnArrayExpression)
  - [.cleanupRedundantObjectPatternOnObjectExpression()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupRedundantObjectPatternOnObjectExpression)
  - [.cleanupReturnAwaitOnFunctionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupReturnAwaitOnFunctionNode)
  - [.cleanupUnusedOnArrayPatternNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupUnusedOnArrayPatternNode)
  - [.cleanupUnusedOnFunctionArgumentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupUnusedOnFunctionArgumentNode)
  - [.cleanupUnusedOnImportNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupUnusedOnImportNode)
  - [.cleanupUnusedOnObjectPatternNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupUnusedOnObjectPatternNode)
  - [.cleanupUnusedOnVariableNode()](./doc/api/api.md#module_@the-/code.ast.nodes.cleanupUnusedOnVariableNode)
  - [.combineObjectPatternOnStatementNode()](./doc/api/api.md#module_@the-/code.ast.nodes.combineObjectPatternOnStatementNode)
  - [.combinePropertiesOnObjectPattern()](./doc/api/api.md#module_@the-/code.ast.nodes.combinePropertiesOnObjectPattern)
  - [.commentModuleOnProgramNode()](./doc/api/api.md#module_@the-/code.ast.nodes.commentModuleOnProgramNode)
  - [.completeJSDocAnnotationsOnCommentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.completeJSDocAnnotationsOnCommentNode)
  - [.findJSDocAnnotationsInCommendNode(CommentNode)](./doc/api/api.md#module_@the-/code.ast.nodes.findJSDocAnnotationsInCommendNode)
  - [.findRequireDeclarationOnProgramNode(ProgramNode)](./doc/api/api.md#module_@the-/code.ast.nodes.findRequireDeclarationOnProgramNode)
  - [.formatJSDocCommentOnCommentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.formatJSDocCommentOnCommentNode)
  - [.mergeDuplicateImportOnProgramNode()](./doc/api/api.md#module_@the-/code.ast.nodes.mergeDuplicateImportOnProgramNode)
  - [.mergeStringConcatenateOnBinaryExpressionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.mergeStringConcatenateOnBinaryExpressionNode)
  - [.modifyNodeDeprecatedOnRequireDeclaration(Declaration,options&#x3D;)](./doc/api/api.md#module_@the-/code.ast.nodes.modifyNodeDeprecatedOnRequireDeclaration)
  - [.modifyToDestructorOnDeclarationNode()](./doc/api/api.md#module_@the-/code.ast.nodes.modifyToDestructorOnDeclarationNode)
  - [.normalizeAssignmentOnVariableDeclarationNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeAssignmentOnVariableDeclarationNode)
  - [.normalizeBinaryExpressionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeBinaryExpressionNode)
  - [.normalizeFunctionReturnOnFunctionNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeFunctionReturnOnFunctionNode)
  - [.normalizeJSDocAnnotationsOnCommentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeJSDocAnnotationsOnCommentNode)
  - [.normalizeKindOnVariableDeclarationNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeKindOnVariableDeclarationNode)
  - [.normalizeSrcPathOnImportDeclarationNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeSrcPathOnImportDeclarationNode)
  - [.normalizeSrcPathOnRequireArgumentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeSrcPathOnRequireArgumentNode)
  - [.normalizeVariableDeclaratorOnStatementNode()](./doc/api/api.md#module_@the-/code.ast.nodes.normalizeVariableDeclaratorOnStatementNode)
  - [.sortAnnotationsOnCommentNode()](./doc/api/api.md#module_@the-/code.ast.nodes.sortAnnotationsOnCommentNode)
  - [.sortCasesOnSwitchStatementNode()](./doc/api/api.md#module_@the-/code.ast.nodes.sortCasesOnSwitchStatementNode)
  - [.sortExportNamedDeclarationsOnProgramNode()](./doc/api/api.md#module_@the-/code.ast.nodes.sortExportNamedDeclarationsOnProgramNode)
  - [.sortMethodsOnClassNode()](./doc/api/api.md#module_@the-/code.ast.nodes.sortMethodsOnClassNode)
  - [.sortPropertiesOnObjectNode()](./doc/api/api.md#module_@the-/code.ast.nodes.sortPropertiesOnObjectNode)
  - [.sortSpecifiersOnImportDeclarationNode()](./doc/api/api.md#module_@the-/code.ast.nodes.sortSpecifiersOnImportDeclarationNode)
  - [.spaceOnCommentNode(CommentNode,options&#x3D;)](./doc/api/api.md#module_@the-/code.ast.nodes.spaceOnCommentNode)
- module:@the-/code.constants
  - [.TypeNamings](./doc/api/api.md#module_@the-/code.constants.TypeNamings)
  - [.Types](./doc/api/api.md#module_@the-/code.constants.Types)
- module:@the-/code.parsers
  - [.parseCSS(content,options&#x3D;)](./doc/api/api.md#module_@the-/code.parsers.parseCSS)
- module:@the-/code.processors
  - [.processComment(content)](./doc/api/api.md#module_@the-/code.processors.processComment)
  - [.processCSSProp(content)](./doc/api/api.md#module_@the-/code.processors.processCSSProp)
  - [.processCSSRule(content)](./doc/api/api.md#module_@the-/code.processors.processCSSRule)
  - [.processFileEnd(content)](./doc/api/api.md#module_@the-/code.processors.processFileEnd)
  - [.processJSArray(content)](./doc/api/api.md#module_@the-/code.processors.processJSArray)
  - [.processJSBinaryExpression(content)](./doc/api/api.md#module_@the-/code.processors.processJSBinaryExpression)
  - [.processJSBlock(content)](./doc/api/api.md#module_@the-/code.processors.processJSBlock)
  - [.processJSChaining(content,options&#x3D;)](./doc/api/api.md#module_@the-/code.processors.processJSChaining)
  - [.processJSClass(content)](./doc/api/api.md#module_@the-/code.processors.processJSClass)
  - [.processJSDeclaration(content,options&#x3D;)](./doc/api/api.md#module_@the-/code.processors.processJSDeclaration)
  - [.processJSDoc(options,content)](./doc/api/api.md#module_@the-/code.processors.processJSDoc)
  - [.processJSExport(content)](./doc/api/api.md#module_@the-/code.processors.processJSExport)
  - [.processJSFunction(content)](./doc/api/api.md#module_@the-/code.processors.processJSFunction)
  - [.processJSIf(content)](./doc/api/api.md#module_@the-/code.processors.processJSIf)
  - [.processJSImport(content)](./doc/api/api.md#module_@the-/code.processors.processJSImport)
  - [.processJSObject(content)](./doc/api/api.md#module_@the-/code.processors.processJSObject)
  - [.processJSON(content,options&#x3D;)](./doc/api/api.md#module_@the-/code.processors.processJSON)
  - [.processJSPrettier(content)](./doc/api/api.md#module_@the-/code.processors.processJSPrettier)
  - [.processJSRedundant(content)](./doc/api/api.md#module_@the-/code.processors.processJSRedundant)
  - [.processJSRequire(content,options)](./doc/api/api.md#module_@the-/code.processors.processJSRequire)
  - [.processJSStrict(content,options)](./doc/api/api.md#module_@the-/code.processors.processJSStrict)
  - [.processJSString(content)](./doc/api/api.md#module_@the-/code.processors.processJSString)
  - [.processJSSwitch(content)](./doc/api/api.md#module_@the-/code.processors.processJSSwitch)
  - [.processJSUnused(content)](./doc/api/api.md#module_@the-/code.processors.processJSUnused)
  - [.processJSXAttribute(content)](./doc/api/api.md#module_@the-/code.processors.processJSXAttribute)
  - [.processJSXExpression(content)](./doc/api/api.md#module_@the-/code.processors.processJSXExpression)
  - [.processPackageJSON(content,options&#x3D;)](./doc/api/api.md#module_@the-/code.processors.processPackageJSON)
  - [.processPackageLockJSON(content,options&#x3D;)](./doc/api/api.md#module_@the-/code.processors.processPackageLockJSON)
  - [.processYAML(content,options)](./doc/api/api.md#module_@the-/code.processors.processYAML)
- TheCode
  - [#format(pattern,options)](./doc/api/api.md#TheCode#format)
  - [#formatFile(filename,options)](./doc/api/api.md#TheCode#formatFile)

See [API Guide](./doc/api/api.md) for more detail


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

[the_labo_url]: https://github.com/the-labo

<!-- Links End -->

---
_Source: https://npm.io/package/@the-/code · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
