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

    net-promoter-score

Calculate a Net Promoter Score (NPS)


Version published
Weekly downloads
45
increased by80%
Maintainers
1
Install size
624 kB
Created
Weekly downloads
 

Readme

Source

Net Promoter Score - Samuel Custer

Installation

npm install net-promoter-score --save

Usage

'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);

Keywords

FAQs

Last updated on 16 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc