
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@locustjs/extensions-options
Advanced tools
This library provides a helper ExtensionsOptionsHelper class that is used in other locustjs-extensions libraries
This library provides a helper ExtensionHelper class that is used in other @locustjs/extensions-... libraries.
ExtensionHelper constructor has two parameters:
ExtensionHelper(options, logger)
| Parameter | Type | Required |
|---|---|---|
options | object, string, array | yes |
logger | object | no |
Structure of options as an object is as follows:
{
"include": [...],
"exclude": [...]
}
include specifies list of function names that are going to be extended on a target object. The default value is *. It says all functions should be extended.
exclude specifies list of function names that should be skipped or ignored and should be extended on the target obejct.
If a string or array is passed as options parameter to ExtensionHelper constructor, it is used as a value for includes property.
| method | description |
|---|---|
configure(options) | gets an options argument in the form of object, string or array, validate it and returns an options object |
shouldExtend(fnName) | Based on an options passed to current ExtensionHelper instance, checks whether given fnName should be extended or not and returns true or false. |
extend(obj, fnName, fn) | Checks whether fnName function could be extended or not and if so, extends fn function with the name fnName on given obj object. |
const eh = new ExtensionHelper('min, max')
eh.extend(Array, 'min', function () {
...
})
FAQs
This library provides a helper ExtensionsOptionsHelper class that is used in other locustjs-extensions libraries
We found that @locustjs/extensions-options demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.