JavaScript port of *nix's yes command