Please put `filename.lastIndexOf('.') !== -1` in brackets so it's a little clearer it's a boolean expression.