Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@f5devcentral/atg-shared-utilities-dev

Package Overview
Dependencies
Maintainers
19
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@f5devcentral/atg-shared-utilities-dev

This project holds a number of generic utility functions that can be shared across the F5 Automation Toolchain projects.

  • 0.2.15
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-68.06%
Maintainers
19
Weekly downloads
 
Created
Source

atg-shared-utilities-dev

This project holds a number of developer utility functions that can be shared across the F5 Automation Toolchain projects.

CONTRIBUTIONS

Read through the contributing/README.md for information on how to contribute to this project.

checkAndDelete

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.

property(objectArray, propertyToCheck, expectedPropertyType, options)

This takes in 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.

Note: propertyToCheck is handled as a literal, and so paths do not work.

options

These are optional values that do NOT need to be included in the method call.

options.skipUndefinedProperties

This option accepts one of the following strings.

  • "MIN0": Skips check if an object[propertyToCheck] is undefined. Formerly the isMissingProp.
  • "MIN1": Skips check if an object[propertyToCheck] is undefined, but Errors if ALL object[propertyToCheck] are undefined.

SCRIPTS

scripts/write-copyright.js

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

CICD Mode

This script can be run as a CICD pipeline check by enabling the CICD mode (-c argument).

  • Process will abort pipeline if an outdated copyright is found.
  • Process will exit gracefully if no outdated copyrights are found.

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.

License

Apache License 2.0

Copyright 2014-2021 F5 Networks Inc.

FAQs

Package last updated on 11 Oct 2023

Did you know?

Socket

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.

Install

Related posts

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