Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stidda

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stidda - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

18

lib/index.js
#!/usr/bin/env node
var _ = require('lodash');
var fullStar = '★';
var emptyStar = '☆';
var MAX_STARS = 5;
var stars = process.argv.slice(2)[0] || 0;
stars = stars > MAX_STARS ? MAX_STARS : stars;
var rating = '';
_.range(stars).forEach(function () {
rating += fullStar;
});
_.range(MAX_STARS - stars).forEach(function () {
rating += emptyStar;
});
console.log(rating);
var stars = Math.max(process.argv.slice(2)[0] || 0, 0);
console.log(
fullStar.repeat(Math.min(MAX_STARS, stars)) +
emptyStar.repeat(MAX_STARS - stars)
);
{
"name": "stidda",
"version": "1.0.0",
"version": "1.0.1",
"description": "a useless cli script to print star rating",

@@ -12,6 +12,3 @@ "author": "Vincenzo Ciaccio <vincenzo.ciaccio@gmail.com>",

"url": "https://github.com/vikkio88/stidda.git"
},
"dependencies": {
"lodash": "^4.17.4"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc