Skip to content

Commit c523cee

Browse files
committed
feat(NODE-7334): remove ByteUtils and NumberUtils from the onDemand ns
1 parent a23e788 commit c523cee

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

src/parser/on_demand/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { ByteUtils } from '../../utils/byte_utils';
2-
import { NumberUtils } from '../../utils/number_utils';
31
import { type BSONElement, parseToElements } from './parse_to_elements';
42
/**
53
* @experimental
@@ -11,10 +9,6 @@ export type OnDemand = {
119
parseToElements: (this: void, bytes: Uint8Array, startOffset?: number) => Iterable<BSONElement>;
1210
// Types
1311
BSONElement: BSONElement;
14-
15-
// Utils
16-
ByteUtils: ByteUtils;
17-
NumberUtils: NumberUtils;
1812
};
1913

2014
/**
@@ -24,8 +18,6 @@ export type OnDemand = {
2418
const onDemand: OnDemand = Object.create(null);
2519

2620
onDemand.parseToElements = parseToElements;
27-
onDemand.ByteUtils = ByteUtils;
28-
onDemand.NumberUtils = NumberUtils;
2921

3022
Object.freeze(onDemand);
3123

test/node/bson_binary_vector.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as path from 'path';
44
import { BSON, BSONError, Binary, EJSON } from '../register-bson';
55
import { expect } from 'chai';
66

7-
const { toHex, fromHex } = BSON.onDemand.ByteUtils;
7+
const { toHex, fromHex } = BSON.ByteUtils;
88

99
type VectorHexType = '0x03' | '0x27' | '0x10';
1010
type VectorTest = {

0 commit comments

Comments
 (0)