Socket
Socket
Sign inDemoInstall

net-promoter-score

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

example/index.js

13

package.json
{
"name": "net-promoter-score",
"version": "0.0.1",
"version": "0.0.2",
"description": "Calculate a Net Promoter Score (NPS)",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node test/.",
"example": "node example/."
},

@@ -26,3 +27,9 @@ "repository": {

},
"homepage": "https://github.com/samcus/net-promoter-score#readme"
"homepage": "https://github.com/samcus/net-promoter-score#readme",
"devDependencies": {
"tape": "^4.6.3"
},
"dependencies": {
"bluebird": "^3.4.7"
}
}

@@ -1,1 +0,34 @@

# In Progress
### Net Promoter Score - Samuel Custer
# Installation
```bash
npm install net-promoter-score --save
```
# Usage
```js
'use strict';
const NPS = require('net-promoter-score');
// Create from Scores
var firstScores = new NPS([9,9,10,6,8,9,9,10,6,8,9,9,10,6,8,9,9,10,6,8,9,9,10,6,8,9,9,10,6,8,9,9,10,6,8,9,9,10,6,8,9,9,10,6,8]);
var secondScores = new NPS([1,9,10]);
var thirdScores = new NPS([1,5,5,6,7,3,9,10,10]);
// JSON Object
console.log(firstScores);
console.log(secondScores);
console.log(thirdScores);
// Object Details
console.log(thirdScores.detractors);
console.log(thirdScores.passives);
console.log(thirdScores.promoters);
console.log(thirdScores.detractorsPercentage);
console.log(thirdScores.passivesPercentage);
console.log(thirdScores.promotersPercentage);
console.log(thirdScores.summary);
console.log(thirdScores.score);
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc