Directed acyclic graph for JavaScript