source:
trip-planner-front/node_modules/webpack-dev-server/lib/utils/tryParseInt.js@
6c1585f
Last change on this file since 6c1585f was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 186 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 1 | 'use strict'; |
2 | ||
3 | function tryParseInt(input) { | |
4 | const output = parseInt(input, 10); | |
5 | ||
6 | if (Number.isNaN(output)) { | |
7 | return null; | |
8 | } | |
9 | ||
10 | return output; | |
11 | } | |
12 | ||
13 | module.exports = tryParseInt; |
Note:
See TracBrowser
for help on using the repository browser.