@solucx/indicators
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

SoluCX Indicators

This is a TypeScript library for calculating various customer satisfaction indicators. It includes support for NPS, CES, CSAT, CSAT10, NSS, LD, and NONE indicators.

Installation

To install this package, use the following command:

npm install @solucx/indicators

This is a private repository. You should be logged in into a allowed npm account or keep this authorized .npmrc credentials file at project or usr root folder.

Usage

Here's how you can use the indicators in your TypeScript code:

import Indicators, { Type } from '@solucx/indicators';

// Create an instance of a specific indicator
const npsIndicator = Indicators.getIndicator(Type.NPS);

// Calculate the score
const score = npsIndicator.getScore(positives, negatives, neutrals);

// Calculate the sampling error
const error = npsIndicator.getSamplingError(total, positives, negatives, neutrals);

You can replace Type.NPS with any other indicator type like Type.CSAT, Type.CES, etc. the available indicators are:

  • CSAT
  • CSAT10
  • CES (depreciado)
  • CES2
  • LD
  • NONE
  • NSS
  • NPS

Test

To run the test suite use npm run test

Publish

To publish a new version of the SDK follow this steps:

  1. npm version (major|minor|patch)
    • major -> breaking changes
    • minor -> non-breaking changes
    • patch -> bugfixes
  2. npm publish
    • you have to logged in npm (npm login)
    • you should have access to the npm package (https://www.npmjs.com/package/@solucx/indicators)
  3. git push --tags

Readme

Keywords

Package Sidebar

Install

npm i @solucx/indicators

Weekly Downloads

69

Version

1.1.4

License

ISC

Unpacked Size

31.6 kB

Total Files

44

Last publish

Collaborators

  • guscx
  • daniel-solucx