
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
@webex/common
Advanced tools
Utility functions and helpers for the Cisco Webex JS SDK.
npm install --save @webex/common
This package provides essential utility functions used throughout the Webex SDK. While many exports are designed for internal SDK use, several utilities can be useful in general applications.
A debounce function that executes after a time delay OR after a maximum number of calls.
import {cappedDebounce} from '@webex/common';
const debouncedFn = cappedDebounce(
() => console.log('Executed!'),
1000, // Wait 1 second
{
maxWait: 5000, // Execute after 5 seconds maximum
maxCalls: 10 // Execute after 10 calls maximum
}
);
// Will execute after 1 second of inactivity, 10 calls, or 5 seconds total
debouncedFn();
Creates a deferred promise with exposed resolve/reject methods.
import {Defer} from '@webex/common';
const deferred = new Defer();
// Resolve later
setTimeout(() => {
deferred.resolve('Success!');
}, 1000);
deferred.promise.then(result => {
console.log(result); // 'Success!'
});
Decorator that ensures a method only runs one instance at a time, preventing duplicate calls.
import {oneFlight} from '@webex/common';
class MyClass {
@oneFlight
async fetchData() {
// This will only run one instance at a time
// Subsequent calls while running will return the same promise
return await fetch('/api/data');
}
}
Utility for creating custom error types.
import {Exception} from '@webex/common';
const MyError = Exception.extend('MyError');
throw new MyError('Something went wrong');
Utility for debugging promise chains without affecting the flow.
import {tap} from '@webex/common';
fetch('/api/data')
.then(tap(response => console.log('Response received:', response)))
.then(response => response.json())
.then(tap(data => console.log('Data parsed:', data)));
Decorator for marking methods as deprecated.
import {deprecated} from '@webex/common';
class MyClass {
@deprecated('Use newMethod() instead')
oldMethod() {
// Will log deprecation warning when called
}
}
These utilities are primarily designed for use within the Webex SDK ecosystem but can be useful in any JavaScript application requiring these common patterns.
This package is maintained by Cisco Webex for Developers.
Pull requests welcome. Please see CONTRIBUTING.md for more details.
© 2016-2025 Cisco and/or its affiliates. All Rights Reserved.
FAQs
Common utilities for Cisco Webex
The npm package @webex/common receives a total of 9,457 weekly downloads. As such, @webex/common popularity was classified as popular.
We found that @webex/common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.