UNPKG

telesignenterprisesdk

Version:

This SDK enhances the functionality of the Telesign Self-service Node SDK, providing access to a broader range of Telesign APIs. See our source code on GitHub (https://github.com/TeleSign/node_telesign_enterprise) for installation instructions and other d

28 lines (24 loc) 691 B
const fs = require('fs'); const path = require('path'); function getVersionDependency(packageName) { try { const pkg = require(`${packageName}/package.json`); return pkg.version; } catch (err) { console.error(`Error getting version for package "${packageName}":`, err.message); return 'unknown'; } } function getInstalledVersion() { try { const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../package.json'), 'utf-8')); return pkg.version; } catch (error) { console.error(`Error getting version of telesignenterprisesdk:`, error.message); return 'unknown'; } } module.exports = { getInstalledVersion, getVersionDependency, }