adapter.js