TySheMo https://github.com/tangshuang/tyshemo
A javascript runtime data type checking system ...
I have been using this library for front-end api guarding
Sometimes back-end gives me a null
or an empty object {}
breaking down the page with ... cannot read property xxx of null ...
Write an interceptor
for api's responses using this, you can capture the dirty data no matter how deep the data structure of res
is
Personally, I have revised the source code of TySheMo
and it really is a great piece of work