Skip to content

Commit 8e346b1

Browse files
committed
minor tweaks
1 parent 0865044 commit 8e346b1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/data-api/ids.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class ObjectId {
300300
}
301301
}
302302

303-
const MACHINE_ID = ~~(Math.random() * 0xFFFFFF);
303+
const RAND_ID = ~~(Math.random() * 0xFFFFFF);
304304
const PID = ((typeof process === 'undefined' || typeof process.pid !== 'number') ? ~~(Math.random() * 100000) : process.pid) % 0xFFFF;
305305

306306
const hexTable = Array.from({ length: 256 }, (_, i) => {
@@ -321,9 +321,9 @@ function genObjectId(time?: number | null): string {
321321
hexString += hexTable[((time >> 16) & 0xFF)];
322322
hexString += hexTable[((time >> 8) & 0xFF)];
323323
hexString += hexTable[(time & 0xFF)];
324-
hexString += hexTable[((MACHINE_ID >> 16) & 0xFF)];
325-
hexString += hexTable[((MACHINE_ID >> 8) & 0xFF)];
326-
hexString += hexTable[(MACHINE_ID & 0xFF)];
324+
hexString += hexTable[((RAND_ID >> 16) & 0xFF)];
325+
hexString += hexTable[((RAND_ID >> 8) & 0xFF)];
326+
hexString += hexTable[(RAND_ID & 0xFF)];
327327
hexString += hexTable[((PID >> 8) & 0xFF)];
328328
hexString += hexTable[(PID & 0xFF)];
329329
hexString += hexTable[((index >> 16) & 0xFF)];

src/data-api/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414
// noinspection DuplicatedCode
1515

16-
export * from './collection';
17-
export * from './cursor';
16+
export { Collection } from './collection';
17+
export { FindCursor } from './cursor';
1818
export { Db } from './db';
1919
export {
2020
DataAPITimeoutError,

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
export { RawDataAPIResponse, CuratedAPIResponse, Fetcher, FetcherRequestInfo, FetcherResponseInfo } from './api';
15+
export { RawDataAPIResponse, CuratedAPIResponse, Fetcher, FetcherRequestInfo, FetcherResponseInfo, FetchNative, FetchH2, DEFAULT_KEYSPACE } from './api';
1616
export * from './data-api';
1717
export * from './client';
1818
export * from './devops';

0 commit comments

Comments
 (0)