UNPKG

dce-expresskit

Version:

Shared functions, helpers, and tools for Harvard DCE Express-based servers

124 lines (120 loc) 2.33 kB
// Import dce-reactkit import { abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, getLocalTimeInfo, genCommaList, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, ErrorWithCode, ParamType, } from 'dce-reactkit'; // Import helpers import initServer from './helpers/initServer'; import genRouteHandler from './helpers/genRouteHandler'; import handleError from './helpers/handleError'; import handleSuccess from './helpers/handleSuccess'; import addDBEditorEndpoints from './helpers/addDBEditorEndpoints'; import visitEndpointOnAnotherServer from './helpers/visitEndpointOnAnotherServer'; import initExpressKitCollections from './helpers/initExpressKitCollections'; // Import types import CrossServerCredential from './types/CrossServerCredential'; // Export each item export { // Errors ErrorWithCode, // Constants MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, // Helpers abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, extractProp, compareArraysByProp, genCommaList, getLocalTimeInfo, prefixWithAOrAn, everyAsync, filterAsync, forEachAsync, mapAsync, someAsync, capitalize, shuffleArray, // Server helpers initServer, genRouteHandler, handleError, handleSuccess, initExpressKitCollections, addDBEditorEndpoints, visitEndpointOnAnotherServer, // Types DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, LogFunction, CrossServerCredential, // Server types ParamType, };