a little JS function lib.