-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1314 from umbraco/chore/minor-naming-corrections
Chore: Correcting last naming todos from my list
- Loading branch information
Showing
93 changed files
with
239 additions
and
198 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
examples/workspace-context-counter/counter-workspace-context.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
examples/workspace-context-counter/incrementor-workspace-action.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/apps/backoffice/server-extension-registrator.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/libs/extension-api/initializers/bundle-extension-initializer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/libs/extension-api/initializers/entry-point-extension-initializer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
src/libs/observable-api/utils/default-memoization.function.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
import { naiveObjectComparison } from './naive-object-comparison.function.js'; | ||
import { jsonStringComparison } from './json-string-comparison.function.js'; | ||
|
||
/** | ||
* @export | ||
* @method defaultMemoization | ||
* @param {any} previousValue - The previous value to compare. | ||
* @param {any} currentValue - The current value to compare. | ||
* @returns {boolean} - Returns true if the values are identical. | ||
* @description - Default memoization function to compare two values. | ||
* This checks if the two values are of type 'object' (Array or Object) and compares them using a naive JSON string comparison. | ||
* If not then it compares the two values using strict equality. | ||
*/ | ||
export function defaultMemoization(previousValue: any, currentValue: any): boolean { | ||
if (typeof previousValue === 'object' && typeof currentValue === 'object') { | ||
return naiveObjectComparison(previousValue, currentValue); | ||
return jsonStringComparison(previousValue, currentValue); | ||
} | ||
return previousValue === currentValue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/libs/observable-api/utils/json-string-comparison.function.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @export | ||
* @method jsonStringComparison | ||
* @param {unknown} a - The first object to compare. | ||
* @param {unknown} b - The second object to compare. | ||
* @returns {boolean} - Returns true if the JSON strings are identical. | ||
* @description - Compares two objects by converting them to JSON strings. | ||
* This is a JSON comparison and should only be used for simple objects. | ||
* Meaning no class instances can take part in this data. | ||
*/ | ||
export function jsonStringComparison(a: unknown, b: unknown): boolean { | ||
return JSON.stringify(a) === JSON.stringify(b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
src/libs/observable-api/utils/naive-object-comparison.function.ts
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/libs/observable-api/utils/strict-equality-memoization.function.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @export | ||
* @method strictEqualityMemoization | ||
* @param {unknown} previousValue - The previous value to compare. | ||
* @param {unknown} currentValue - The current value to compare. | ||
* @returns {boolean} - Returns true if the values are identical. | ||
* @description - Compares the two values using strict equality. | ||
*/ | ||
export function strictEqualityMemoization(previousValue: unknown, currentValue: unknown): boolean { | ||
return previousValue === currentValue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.