Js proto snippet