UNPKG

pricing4ts

Version:

![NPM Version](https://img.shields.io/npm/v/pricing4ts) Pricing4TS is a TypeScript-based toolkit designed to enhance the server-side functionality of a pricing-driven SaaS by enabling the seamless integration of pricing plans into the application logic. T

36 lines (35 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNumberOfFeatures = getNumberOfFeatures; exports.getFeatureNames = getFeatureNames; exports.isIntegrationType = isIntegrationType; exports.isAutomationType = isAutomationType; exports.isPaymentType = isPaymentType; function getNumberOfFeatures(features) { return Object.keys(features).length; } function getFeatureNames(features) { return Object.values(features).map(function (feature) { return feature.name; }); } function isIntegrationType(string) { return (string === 'API' || string === 'EXTENSION' || string === 'IDENTITY_PROVIDER' || string === 'WEB_SAAS' || string === 'MARKETPLACE' || string === 'EXTERNAL_DEVICE'); } function isAutomationType(string) { return (string === 'BOT' || string === 'FILTERING' || string === 'TRACKING' || string === 'TASK_AUTOMATION'); } function isPaymentType(string) { return (string === 'CARD' || string === 'GATEWAY' || string === 'INVOICE' || string === 'ACH' || string === 'WIRE_TRANSFER' || string === 'OTHER'); }