eklem / espruino-stuff

Small Espruino projects. Nothing fancy.
MIT License
2 stars 0 forks source link

Safe: Rename main function from onKey to ...? #12

Open eklem opened 3 months ago

eklem commented 3 months ago

https://github.com/eklem/espruino-stuff/blob/trunk/safe/espruino.js#L57

onKey doesn't say much. Maybe safeInput or lockInput ?^ And clean up the code a little.

eklem commented 3 months ago

Part of the cleanup can be to make a separate lock/unlock function instead of the s.move(0/1);. It won't be shorter, but more readable.