2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add simple type checker implementation

This commit is contained in:
fat
2015-05-13 14:46:50 -07:00
parent c2ced2292a
commit eaab1def7a
25 changed files with 258 additions and 28 deletions
+8
View File
@@ -32,6 +32,12 @@ var ScrollSpy = (function ($) {
target: ''
};
var DefaultType = {
offset: 'number',
method: 'string',
target: '(string|element)'
};
var Event = {
ACTIVATE: 'activate' + EVENT_KEY,
SCROLL: 'scroll' + EVENT_KEY,
@@ -155,6 +161,8 @@ var ScrollSpy = (function ($) {
config.target = '#' + id;
}
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
}
}, {