mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- Using isomorphy async methods with the suffix Async; - Changing tests to use async methods on client and server - Fix tests
21 lines
444 B
JavaScript
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'];
|