api:js: support default