A module which reports defined, but unused variables in your code.
JavaScript
Latest commit 1114b24 Mar 17, 2017 @Kami committed on GitHub Merge pull request #13 from spratt/master
Add working, remove broken Travis node versions
Permalink
Failed to load latest commit information.
bin
lib
test
.gitignore
.travis.yml
LICENSE.txt
README.md
index.js
package.json

README.md

unused Build Status

Identify unused variables in your javascript code.

cli

$ unused /path/to/file.js

--ignore-params

Comma separated list of function parameters to ignore during unused checks. You often want to know when you forgot to handle err or other parameters, but sometimes you have placeholders (req, res, etc) which you might want to ignore

$ unused /path/to/file.js --ignore-params req,res,_

api

unused(src)

src is a javascript source string

Returns an array of objects specifying the name, location, and if the variable is a function parameter

{
    name: 'foo',
    loc: {
        line: 1,
        column: 1,
    },
    param: true || false
}

install

npm install unused

License

Library is distributed under the Apache license.