New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-zendesk

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-zendesk - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

package.json
{
"name": "node-zendesk",
"version": "4.0.0",
"version": "4.0.1",
"type": "commonjs",

@@ -5,0 +5,0 @@ "description": "zendesk API client wrapper",

@@ -85,2 +85,25 @@ const MODULES = {

module.exports = {MODULES, ENDPOINTS};
const MODULE_BASE_PATHS = {
core: './client/core/',
helpcenter: './client/helpcenter/',
nps: './client/nps/',
services: './client/services/',
voice: './client/voice/',
};
const MODULE_MAP = {};
for (const apiType in MODULES) {
if (Object.prototype.hasOwnProperty.call(MODULES, apiType)) {
MODULE_MAP[apiType] = {};
for (const moduleName of MODULES[apiType]) {
const modulePath = `${
MODULE_BASE_PATHS[apiType]
}${moduleName.toLowerCase()}`;
MODULE_MAP[apiType][moduleName.toLowerCase()] = require(modulePath);
}
}
}
module.exports = {MODULES, MODULE_BASE_PATHS, MODULE_MAP, ENDPOINTS};
// Index.js - node-zendesk client initialization
'use strict';
const {MODULES, ENDPOINTS} = require('./constants');
const {MODULES, MODULE_MAP, ENDPOINTS} = require('./constants');

@@ -76,3 +76,3 @@ /**

const moduleName = module.toLowerCase();
const ModuleClass = require(`./client/${type}/${moduleName}`)[module];
const ModuleClass = MODULE_MAP[type][moduleName][module];
this.client[moduleName] = new ModuleClass({

@@ -79,0 +79,0 @@ ...this.config,

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc