Skip to content

Commit e5f596d

Browse files
authored
refactor: remove dead code (#2998)
1 parent 79f307c commit e5f596d

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/utils.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,6 @@ export const MAX_JS_INT = Number.MAX_SAFE_INTEGER + 1;
4141

4242
export type AnyOptions = Document;
4343

44-
/**
45-
* Add a readonly enumerable property.
46-
* @internal
47-
*/
48-
export function getSingleProperty(
49-
obj: AnyOptions,
50-
name: string | number | symbol,
51-
value: unknown
52-
): void {
53-
Object.defineProperty(obj, name, {
54-
enumerable: true,
55-
get() {
56-
return value;
57-
}
58-
});
59-
}
60-
6144
/**
6245
* Throws if collectionName is not a valid mongodb collection namespace.
6346
* @internal
@@ -185,17 +168,6 @@ export function isObject(arg: unknown): arg is object {
185168
return '[object Object]' === Object.prototype.toString.call(arg);
186169
}
187170

188-
/** @internal */
189-
export function decorateCommand(command: Document, options: Document, exclude: string[]): Document {
190-
for (const name in options) {
191-
if (!exclude.includes(name)) {
192-
command[name] = options[name];
193-
}
194-
}
195-
196-
return command;
197-
}
198-
199171
/** @internal */
200172
export function mergeOptions<T, S>(target: T, source: S): T & S {
201173
return { ...target, ...source };
@@ -657,11 +629,6 @@ export function databaseNamespace(ns: string): string {
657629
return ns.split('.')[0];
658630
}
659631

660-
/** @internal */
661-
export function collectionNamespace(ns: string): string {
662-
return ns.split('.').slice(1).join('.');
663-
}
664-
665632
/**
666633
* Synchronously Generate a UUIDv4
667634
* @internal

0 commit comments

Comments
 (0)