Files
meteor/packages/minimongo/constants.js
Edimar Cardoso a036066611 Refectory mongo packages
- Using isomorphy async methods with the suffix Async;
- Changing tests to use async methods on client and server
- Fix tests
2023-01-16 22:47:48 -03:00

21 lines
444 B
JavaScript

/** Exported values are also used in the mongo package. */
/** @param {string} method */
export function getAsyncMethodName(method) {
return `${method.replace('_', '')}Async`;
}
export const ASYNC_COLLECTION_METHODS = [
'_createCappedCollection',
'dropCollection',
'dropIndex',
'createIndex',
'findOne',
'insert',
'remove',
'update',
'upsert',
];
export const ASYNC_CURSOR_METHODS = ['count', 'fetch', 'forEach', 'map'];