Sort:  

For example:

const BitShares = require("btsdex");

async function start() {
  BitShares.init("wss://bitshares.openledger.info/ws");
  await BitShares.connect();

  let bot = new BitShares("jjb777", "yourPrivateActiveKey")

  await bot.transfer("scientistnik","BTS", 10)
  console.log("Transfer sent")
}

start()

Hey.
I had nearly the same code but it failed due to an old npm version dependency problems. But I got it to work.
Thanks J

Hey .... I did not get 10 BTS!!!

I'm kidding))