fix banner for old node version

Summary:
The file is used to notify users when they are using a node version < 4. Therefore we should not allow arrow functions. This was pointed out at the time when the arrow function was introduced but merged anyways: db3a00d58c (commitcomment-16590379)

Trying to run the code with Node version 0.10.32

Before:
```
…/node_modules/react-native/local-cli/server/formatBanner.js:48
    chalkFunction: (fn) => fn,
                         ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (…/node_modules/react-native/local-cli/server/checkNodeVersion.js:12:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
Closes https://github.com/facebook/react-native/pull/8310

Differential Revision: D3469092

Pulled By: javache

fbshipit-source-id: 757e8b121f6cd6971dd7d73cda92fcb6fcbe5066
This commit is contained in:
Johannes Scharlach 2016-06-22 03:33:19 -07:00 committed by Facebook Github Bot 4
parent 5276db492a
commit 523d39ad92
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ var BOTTOM_RIGHT = '\u2518';
function formatBanner(message, options) {
options = options || {};
_.defaults(options, {
chalkFunction: (fn) => fn,
chalkFunction: _.identity,
width: 80,
marginLeft: 0,
marginRight: 0,