New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

retidy

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retidy

Extract, unminify, and beautify ("retidy") each file from a webpack/parcel bundle

latest
Source
npmnpm
Version
1.5.1
Version published
Weekly downloads
131
773.33%
Maintainers
1
Weekly downloads
 
Created
Source

Retidy

GitHub stars npm npm downloads license

Extract, unminify, and beautify ("retidy") each file from a webpack/parcel bundle

⚠️ No Unit Tests, may have unexpected side effects ⚠️

Installation

npm install -g retidy

Usage

CLI

retidy \
    -i <bundle_file> \
    -o <out_dir> \
    -t <bundle_type> \
    -b <bundle_ast_reference>

see

retidy --help

API

import retidy from "retidy"

retidy(bundleCode[, options])
retidy(bundleCode: string, options?: Options): Promise<string[]>

If set options.writeFiles = true (by default), retidy will write extracted code files into the file system (under options.outDir directory, ./retidy-out/ by default).

Options

see src/options.ts

Example

import retidy from "retidy"
import fs from "fs"

const code = fs.readFileSync("path/to/webpack-bundle.js", "utf-8")

retidy(code, { type: "webpack", outDir: "./out/", bundleAstReferenceKeys: ["body", 0, "expression", "right"] })

License

MIT

Some companies specify in their terms of service that their code cannot be "reverse engineered".
Hope you understand what you are doing so you don't break any agreements.

Keywords

ast

FAQs

Package last updated on 28 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts