Conversation
| @$(DUO) --development test/tests.js > build/tests.js | ||
| @$(DUO) --development test/snippet-tests.js > build/snippet-tests.js | ||
|
|
||
| docs: |
There was a problem hiding this comment.
I considered adding this to the default make command, but the html files are timestamped, so they would be modified with every make. Whenever someone updates the API, they need to remember to update the docs
| for (var i = 0; i < this._q.length; i++) { | ||
| var fn = this[this._q[i][0]]; | ||
| if (fn && type(fn) === 'function') { | ||
| if (type(fn) === 'function') { |
There was a problem hiding this comment.
can skip the null check since type(null) will return 'null' which fails the === 'function' test
|
Refactoring a bunch of stuff, adding lots of sanity checks and more type-checking around user-input, handle more failure cases gracefully.
|
| // utils.log(e); | ||
| } | ||
| var events = JSON.parse(savedUnsentEventsString); | ||
| if (type(events) === 'array') { // handle case where JSON dumping of unsent events is corrupted |
There was a problem hiding this comment.
It's supposed to deserialize into an array object, but if client's have broken JSON libraries, it deserializes into a string, which breaks the SDK
|
@paladin8 you can skip everything in the documentation folder |
src/amplitude.js
Outdated
| // verifies config value is defined, is the correct type, and some additional value verification | ||
| var parseValidateLoad = function parseValidateLoad(key, expectedType) { | ||
| var input_value = config[key]; | ||
| if(input_value === undefined || !utils.validateInput(input_value, key + ' option', expectedType)) { |
|
really solid changes, only worry is that it is pretty big so we just want to make sure we manually test enough and that upgrades work, etc. lgtm from a code perspective though! |
No description provided.