Skip to content

Commit 5609741

Browse files
chore: add standard object and overriding function (#20)
* init standard object and override function * add comments and tests * remove duplicate strings from standard * add sonar project ignore file * revert back to standard object with prototype * refactor types and fix tests * configure sonarcloud * Remove sonar project config file * demo commit Co-authored-by: Maciej Urbańczyk <[email protected]>
1 parent 4c501ec commit 5609741

File tree

5 files changed

+733
-0
lines changed

5 files changed

+733
-0
lines changed

src/mergeStandard.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { StandardType } from './standard';
2+
import { OverrideObject } from './types';
3+
4+
/**
5+
* Merges two standard objects
6+
* @param standard The original standard object
7+
* @param overrides The object containing the overrides
8+
*/
9+
export function mergeStandard(
10+
standard: StandardType,
11+
overrides: OverrideObject
12+
): void {
13+
// modifies the passed standard object
14+
Object.assign(standard, overrides);
15+
}

0 commit comments

Comments
 (0)