add --check-leaks docs
add js api example
source