MCPcopy
hub / github.com/express-rate-limit/express-rate-limit / getOptionsFromConfig

Function getOptionsFromConfig

source/rate-limit.ts:138–145  ·  view source on GitHub ↗
(config: Configuration)

Source from the content-addressed store, hash-verified

136 * @returns {Partial<Options>} - The options derived from the configuration.
137 */
138const getOptionsFromConfig = (config: Configuration): Options => {
139 const { validations, ...directlyPassableEntries } = config
140
141 return {
142 ...directlyPassableEntries,
143 validate: validations.enabled as EnabledValidations,
144 }
145}
146
147/**
148 * Type-checks and adds the defaults for options the user has not specified.

Callers 1

rateLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…