The biggest problem is that you never access the elements of input, just the array itself. Your if (input % 2 == 1) line checks if the array mod 2 is equal to 1. That doesn't make sense, as you can't really do math on an array.
You need to do this per-element, so the minimal change would be to use input[i] within the loop.
There are a number of other changes you can make, and some idiomatic patterns that can make the code nicer. If you're on a recent browser and have forEach or map, you can replace the loop with a construct like:
var output = input.map(function (it) {
if (it % 2 == 1) return it * 2;
if (it % 2 == 0) return it / 2;
});
That can still be cleaned up, as x % 2 can only ever return 0 or 1, so you can replace the second condition with an else or just assume it returned 0:
var output = input.map(function (it) {
if (it % 2 == 1) return it * 2;
return it / 2;
});
Because of how JS handles true and false, specifically converting numbers, you can omit the == 1 (1 is truthy), and swap the condition for a ternary:
var output = input.map(function (it) {
return (it % 2) ? it * 2 : it / 2;
});
Since you're wrapping this into a function, if you're using map then output isn't strictly necessary, so you can do:
module.exports.modify = function (input) {
return input.map(function (it) {
return (it % 2) ? it * 2 : it / 2;
});
};
If you have ES6 support (likely through the brilliant 6to5 project), you can replace the function declarations with arrow functions:
module.exports.modify = (input) => {
return input.map((it) => {
return (it % 2) ? it * 2 : it / 2;
});
};
And if you want to get really academic with it, you can remove the return statements (thanks to arrow functions):
module.exports.modify = input => input.map(it => it % 2 ? it * 2 : it / 2);