Does the starting point have to be Javascript?
If so, a good bet might be this HashLife Javascript implementation:
https://copy.sh/life/?gist=31aa52b9430970a28e4c199444e5a873
If not, well, Golly is open-source, cross-platform, supports custom rules via rule tables, and would welcome contributions to its editing-tool department:
There's even a lifeviewer.lua in the Scripts/Lua folder that duplicates some of LifeViewer's functionality, and is also obviously open source, though it's definitely also a work in progress.