Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@f5devcentral/atg-shared-utilities-dev
Advanced tools
This project holds a number of generic utility functions that can be shared across the F5 Automation Toolchain projects.
This project holds a number of developer utility functions that can be shared across the F5 Automation Toolchain projects.
Read through the contributing/README.md for information on how to contribute to this project.
These are quick functions, which checks to see if a property exists in an object, then if it is of the specified type, and finally deletes it. It was designed for use in testing properties with random values within arrays of objects.
By checking for their existance and then deleting them, the user can then use assert.strictDeepEquals(...)
more reliably.
This function is primarily useful in integration and unit testing. Where some of the values returned are randomized. This allows for the randomness to happen then it validates the return value is both present and of the expected type. Then by removing it, testing can then do a deep comparison of the expected values.
Example properties: automatically generated ids, runtimes, and dates.
This takes in an object or an array of objects, checks each object for the property, checks the property's type against the expected value, and then deletes the property from the object.
This does not check nested objects for the "propertyToCheck".
This throws an error if the propertyToCheck is not found, or the typeof the property does not match the expectedPropertyType.
WARNING: At the moment, due to the copying process in this function, objects with "undefined" property values will not appear in the returned object.
These are optional values that do NOT need to be included in the method call.
This option accepts one of the following strings.
isMissingProp
.const result = checkAndDeleteProperty({ foo: 'bar' }, 'foo', 'string'); // removes foo from the object const resultArray = checkAndDeleteProperty([{ foo: 'bar' }, { foo: 'bar' }], 'foo', 'string'); // removes foo from both objects
Adds the copyright template with current year to the top of every file in src/, scripts/, and test/.
To use: run from project root, after installing package:
node node_modules/@f5devcentral/atg-shared-utilities-dev/scripts/dev/write-copyright.js [-p <optional-path-to-copyright>]
You can provide your own copyright text as an argument in the call with the -p option. If you do not include one, the script will default to using its own located at: node_modules/@f5devcentral/atg-shared-utilities-dev/scripts/dev/copyright.txt
This script can be run as a CICD pipeline check by enabling the CICD mode (-c argument).
To use: run from project root, after installing package:
node node_modules/@f5devcentral/atg-shared-utilities-dev/scripts/dev/write-copyright.js -c
Note: This can be used with the -p option and vice versa.
Copyright 2014-2021 F5 Networks Inc.
FAQs
This project holds a number of generic utility functions that can be shared across the F5 Automation Toolchain projects.
The npm package @f5devcentral/atg-shared-utilities-dev receives a total of 1,069 weekly downloads. As such, @f5devcentral/atg-shared-utilities-dev popularity was classified as popular.
We found that @f5devcentral/atg-shared-utilities-dev demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.