unstar.js 614 B

12345678910111213141516171819202122232425262728
  1. const Star = require('./star.js')
  2. class Unstar extends Star {
  3. /* istanbul ignore next - see test/lib/load-all-commands.js */
  4. static get description () {
  5. return 'Remove an item from your favorite packages'
  6. }
  7. /* istanbul ignore next - see test/lib/load-all-commands.js */
  8. static get name () {
  9. return 'unstar'
  10. }
  11. /* istanbul ignore next - see test/lib/load-all-commands.js */
  12. static get params () {
  13. return [
  14. 'registry',
  15. 'unicode',
  16. 'otp',
  17. ]
  18. }
  19. exec (args, cb) {
  20. this.npm.config.set('star.unstar', true)
  21. super.exec(args, cb)
  22. }
  23. }
  24. module.exports = Unstar