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 - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

index.js

11

CHANGELOG.md

@@ -15,2 +15,13 @@ # Changelog

## [0.2.7] = 2022-07-27
### Added
- checkAndDeleteProperty function for use in testing
### Fixed
### Changed
- Update packages
### Removed
## [0.2.6] - 2022-05-03

@@ -17,0 +28,0 @@ ### Changed

28

package.json
{
"name": "@f5devcentral/atg-shared-utilities-dev",
"version": "0.2.6",
"version": "0.2.7",
"scripts": {
"lint": "eslint ."
"lint": "eslint .",
"test": "mocha test/unit/ --recursive",
"coverage": "nyc npm test"
},
"devDependencies": {
"@f5devcentral/eslint-config-f5-atg": "^0.1.7",
"eslint": "^7.32.0"
"eslint": "^7.32.0",
"nyc": "^15.1.0",
"mocha": "^10.0.0"
},

@@ -17,5 +21,21 @@ "eslintConfig": {

},
"dependencies": {},
"nyc": {
"reporter": [
"html",
"text",
"json-summary"
],
"exclude": [
"gulpfile.js",
"coverage/**",
"test/**",
"**/node_modules/**",
"**/dist/**"
]
},
"description": "This project holds a number of generic utility functions that can be shared across the F5 Automation Toolchain projects.",
"main": "index.js",
"directories": {
"test": "test"
},
"repository": {

@@ -22,0 +42,0 @@ "type": "git",

@@ -9,2 +9,25 @@ # atg-shared-utilities-dev

## 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

@@ -11,0 +34,0 @@

2

scripts/dev/write-copyright.js
/**
* Copyright 2021 F5 Networks, Inc.
* Copyright 2022 F5 Networks, Inc.
*

@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License");

Sorry, the diff of this file is not supported yet

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