New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

putout

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

putout

find and remove unused variables


Version published
Weekly downloads
15K
increased by7.42%
Maintainers
1
Weekly downloads
 
Created

Putout NPM version Dependency Status Build Status Coverage Status

Find and remove unused variables.

Why?

Because eslint does not remove unused variables.

Install

npm i putout -g

Usage

To see unused variables use:

putout your-js-file.js

To remove unused variables use:

putout --fix your-js-file.js

API

putout(source)

const {readFileSync} = require('fs');
const source = readFileSync('./1.js', 'utf8');
console.log(source);
// outputs
`
const t = 'hello';
const m = t + '!';
`

const result = putout(source);
// returns
`
const t = 'hello';
`

const result2 = putout(result);
// returns
``

License

MIT

FAQs

Package last updated on 04 Dec 2018

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