source:
trip-planner-front/node_modules/webpack-dev-server/lib/utils/tryParseInt.js@
571e0df
Last change on this file since 571e0df 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.