faces.js is a JavaScript library that allows you to generate and display cartoon faces using scalable vector graphics (SVG). The library’s options for facial features are somewhat limited and crude, but you can easily add new options by forking the project on GitHub. To use faces.js, you can install it from npm or yarn and then display a randomly-generated face in your webpage. You can also store and draw the same face later by using small JavaScript objects. Check out the faces.js editor to see all available facial features, and consult the GitHub README for more documentation and information.
https://zengm.com/facesjs/