unused
A module which reports unused variables in your code.
Last updated 7 years ago by kami .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install unused 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.2.2                                ...           latest (7 years ago)

4 Versions

  • 0.2.2                                ...           7 years ago
  • 0.2.1                                ...           7 years ago
  • 0.2.0                                ...           8 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (2)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |