Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/util/index.js')
-rw-r--r--js/src/util/index.js16
1 files changed, 1 insertions, 15 deletions
diff --git a/js/src/util/index.js b/js/src/util/index.js
index 0407100d8b..8bd614d40c 100644
--- a/js/src/util/index.js
+++ b/js/src/util/index.js
@@ -123,20 +123,6 @@ const getElement = object => {
return null
}
-const typeCheckConfig = (componentName, config, configTypes) => {
- for (const property of Object.keys(configTypes)) {
- const expectedTypes = configTypes[property]
- const value = config[property]
- const valueType = value && isElement(value) ? 'element' : toType(value)
-
- if (!new RegExp(expectedTypes).test(valueType)) {
- throw new TypeError(
- `${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`
- )
- }
- }
-}
-
const isVisible = element => {
if (!isElement(element) || element.getClientRects().length === 0) {
return false
@@ -327,5 +313,5 @@ export {
onDOMContentLoaded,
reflow,
triggerTransitionEnd,
- typeCheckConfig
+ toType
}