# jsxtsxscanner

> Scans your JS, JSx, TS, TSx files for duplication of code and helps you write non repetive code

Latest version **0.2.2** (published 2021-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsxtsxscanner
pnpm add jsxtsxscanner
yarn add jsxtsxscanner
bun add jsxtsxscanner
```

Provides the command `jsxtsxscanner`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2021-01-02 |
| First published | 2020-12-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 39.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Rakesh Purohit |
| Maintainers | therakeshpurohit |
| Keywords | inspect, detect, code, duplicate, structure, copy, paste, JS, TS, JSx, TSx |

## Links

- npm: https://www.npmjs.com/package/jsxtsxscanner
- Repository: https://github.com/therakeshpurohit/JSxTSxScanner
- Issues: https://github.com/therakeshpurohit/JSxTSxScanner/issues
- npm.io page: https://npm.io/package/jsxtsxscanner

## Dependencies (7)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [stable](https://npm.io/package/stable.md) ^0.1.8
- [babylon](https://npm.io/package/babylon.md) 6.18.0
- [commander](https://npm.io/package/commander.md) ^6.2.1
- [filepaths](https://npm.io/package/filepaths.md) 0.3.0
- [strip-indent](https://npm.io/package/strip-indent.md) ^3.0.0
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) 3.1.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.2.2 (latest) — 2021-01-02
- 0.2.1 — 2021-01-02
- 0.2.0 — 2021-01-01
- 0.1.1 — 2020-12-31
- 0.1.0 — 2020-12-30

## README

# JSxTSxScanner

Scans similar block of code in your JS, JSX, TS & TSX files. Requires Node.js
6.0+. It supports ES6 & JSX

[![Build Status](https://travis-ci.org/TheRakeshPurohit/jsxtsxscanner.svg?branch=main)](https://travis-ci.org/TheRakeshPurohit/jsxtsxscanner)

* [Overview](#overview)
* [Installation](#installation)
* [Usage](#usage)

## Overview

While Working on a project, we might have done copy pasting the code or may be unknowingly repeating the same structural code in our project. Here

It might be a block of code or may be single lines of codes being repeated cross the files.

This package is inspired by true post-production bug. It leads us to the unique, well structured code with nonrepetitive LOC or blocks.

Here we have used ASTs. AST stands for Abstract Syntax Tree. Each compiler or parser generates your source code into ASTs before , e.g. BlockStatement, VariableDeclaration,
ObjectExpression, etc. By default, it searches nodes with matching identifiers
and literals for copy-paste code of block.

The tool accepts a list of paths to parse and prints any found matches. Any
directories among the paths are walked recursively, and only `.js`, `.jsx`, `.ts` , `.tsx`
files are analyzed. Any `node_modules` folders are also
ignored.

## Installation

It can be installed via `npm` using:

``` bash
npm install -g jsxtsxscanner
```

## Usage

``` bash
jsxtsxscanner <paths ...>
```

Scans similar block of code in your JS, JSX, TS & TSX files
Example use: jsxtsxscanner ./path/to/src

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