a tiny module to use in js's judgement