Shawty implementation in nodejs