aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/config.ts4
-rw-r--r--server/helpers/activitypub.ts3
-rw-r--r--server/helpers/custom-validators/activitypub/activity.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/actor.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/misc.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/playlist.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/video-comments.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts2
-rw-r--r--server/helpers/custom-validators/misc.ts2
-rw-r--r--server/helpers/custom-validators/plugins.ts2
-rw-r--r--server/helpers/custom-validators/search.ts2
-rw-r--r--server/helpers/custom-validators/servers.ts2
-rw-r--r--server/helpers/custom-validators/user-notifications.ts2
-rw-r--r--server/helpers/custom-validators/users.ts2
-rw-r--r--server/helpers/custom-validators/video-abuses.ts2
-rw-r--r--server/helpers/custom-validators/video-blacklist.ts2
-rw-r--r--server/helpers/custom-validators/video-channels.ts2
-rw-r--r--server/helpers/custom-validators/video-comments.ts2
-rw-r--r--server/helpers/custom-validators/video-imports.ts2
-rw-r--r--server/helpers/custom-validators/video-playlists.ts2
-rw-r--r--server/helpers/custom-validators/videos.ts2
-rw-r--r--server/lib/client-html.ts2
-rw-r--r--server/models/utils.ts2
-rw-r--r--server/models/video/video-playlist-element.ts2
-rw-r--r--server/models/video/video.ts2
-rw-r--r--server/tests/helpers/core-utils.ts4
26 files changed, 28 insertions, 29 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index b2f23c1b0..6fad82408 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -12,7 +12,7 @@ import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '..
12import { remove, writeJSON } from 'fs-extra' 12import { remove, writeJSON } from 'fs-extra'
13import { getServerCommit } from '../../helpers/utils' 13import { getServerCommit } from '../../helpers/utils'
14import { Emailer } from '../../lib/emailer' 14import { Emailer } from '../../lib/emailer'
15import { isNumeric } from 'validator' 15import validator from 'validator'
16import { objectConverter } from '../../helpers/core-utils' 16import { objectConverter } from '../../helpers/core-utils'
17import { CONFIG, reloadConfig } from '../../initializers/config' 17import { CONFIG, reloadConfig } from '../../initializers/config'
18import { PluginManager } from '../../lib/plugins/plugin-manager' 18import { PluginManager } from '../../lib/plugins/plugin-manager'
@@ -393,7 +393,7 @@ function convertCustomConfigBody (body: CustomConfig) {
393 } 393 }
394 394
395 function valueConverter (v: any) { 395 function valueConverter (v: any) {
396 if (isNumeric(v + '')) return parseInt('' + v, 10) 396 if (validator.isNumeric(v + '')) return parseInt('' + v, 10)
397 397
398 return v 398 return v
399 } 399 }
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index 97c809a0c..735f2d73a 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -1,9 +1,8 @@
1import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
2import * as validator from 'validator' 2import validator from 'validator'
3import { ResultList } from '../../shared/models' 3import { ResultList } from '../../shared/models'
4import { Activity } from '../../shared/models/activitypub' 4import { Activity } from '../../shared/models/activitypub'
5import { ACTIVITY_PUB } from '../initializers/constants' 5import { ACTIVITY_PUB } from '../initializers/constants'
6import { ActorModel } from '../models/activitypub/actor'
7import { signJsonLDObject } from './peertube-crypto' 6import { signJsonLDObject } from './peertube-crypto'
8import { pageToStartAndCount } from './core-utils' 7import { pageToStartAndCount } from './core-utils'
9import { parse } from 'url' 8import { parse } from 'url'
diff --git a/server/helpers/custom-validators/activitypub/activity.ts b/server/helpers/custom-validators/activitypub/activity.ts
index f68c76cdc..8b8c0685f 100644
--- a/server/helpers/custom-validators/activitypub/activity.ts
+++ b/server/helpers/custom-validators/activitypub/activity.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { Activity, ActivityType } from '../../../../shared/models/activitypub' 2import { Activity, ActivityType } from '../../../../shared/models/activitypub'
3import { sanitizeAndCheckActorObject } from './actor' 3import { sanitizeAndCheckActorObject } from './actor'
4import { isActivityPubUrlValid, isBaseActivityValid, isObjectValid } from './misc' 4import { isActivityPubUrlValid, isBaseActivityValid, isObjectValid } from './misc'
diff --git a/server/helpers/custom-validators/activitypub/actor.ts b/server/helpers/custom-validators/activitypub/actor.ts
index ec4dd6f96..fa58e163f 100644
--- a/server/helpers/custom-validators/activitypub/actor.ts
+++ b/server/helpers/custom-validators/activitypub/actor.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' 2import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
3import { exists, isArray } from '../misc' 3import { exists, isArray } from '../misc'
4import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc' 4import { isActivityPubUrlValid, isBaseActivityValid, setValidAttributedTo } from './misc'
diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts
index 5afcfbedc..4ee8e6fee 100644
--- a/server/helpers/custom-validators/activitypub/misc.ts
+++ b/server/helpers/custom-validators/activitypub/misc.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' 2import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
3import { isTestInstance } from '../../core-utils' 3import { isTestInstance } from '../../core-utils'
4import { exists } from '../misc' 4import { exists } from '../misc'
diff --git a/server/helpers/custom-validators/activitypub/playlist.ts b/server/helpers/custom-validators/activitypub/playlist.ts
index 6c7bdb193..bd0d16a4a 100644
--- a/server/helpers/custom-validators/activitypub/playlist.ts
+++ b/server/helpers/custom-validators/activitypub/playlist.ts
@@ -1,6 +1,6 @@
1import { exists, isDateValid } from '../misc' 1import { exists, isDateValid } from '../misc'
2import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' 2import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object'
3import * as validator from 'validator' 3import validator from 'validator'
4import { PlaylistElementObject } from '../../../../shared/models/activitypub/objects/playlist-element-object' 4import { PlaylistElementObject } from '../../../../shared/models/activitypub/objects/playlist-element-object'
5import { isActivityPubUrlValid } from './misc' 5import { isActivityPubUrlValid } from './misc'
6 6
diff --git a/server/helpers/custom-validators/activitypub/video-comments.ts b/server/helpers/custom-validators/activitypub/video-comments.ts
index ea780ca46..aa3c246b5 100644
--- a/server/helpers/custom-validators/activitypub/video-comments.ts
+++ b/server/helpers/custom-validators/activitypub/video-comments.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { ACTIVITY_PUB } from '../../../initializers/constants' 2import { ACTIVITY_PUB } from '../../../initializers/constants'
3import { exists, isArray, isDateValid } from '../misc' 3import { exists, isArray, isDateValid } from '../misc'
4import { isActivityPubUrlValid } from './misc' 4import { isActivityPubUrlValid } from './misc'
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index a28bebf2d..fe94bd58a 100644
--- a/server/helpers/custom-validators/activitypub/videos.ts
+++ b/server/helpers/custom-validators/activitypub/videos.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { ACTIVITY_PUB, CONSTRAINTS_FIELDS } from '../../../initializers/constants' 2import { ACTIVITY_PUB, CONSTRAINTS_FIELDS } from '../../../initializers/constants'
3import { peertubeTruncate } from '../../core-utils' 3import { peertubeTruncate } from '../../core-utils'
4import { exists, isArray, isBooleanValid, isDateValid, isUUIDValid } from '../misc' 4import { exists, isArray, isBooleanValid, isDateValid, isUUIDValid } from '../misc'
diff --git a/server/helpers/custom-validators/misc.ts b/server/helpers/custom-validators/misc.ts
index 0c3df1cd0..89149b3e0 100644
--- a/server/helpers/custom-validators/misc.ts
+++ b/server/helpers/custom-validators/misc.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as validator from 'validator' 2import validator from 'validator'
3import { sep } from 'path' 3import { sep } from 'path'
4 4
5function exists (value: any) { 5function exists (value: any) {
diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts
index 332418b49..3af72547b 100644
--- a/server/helpers/custom-validators/plugins.ts
+++ b/server/helpers/custom-validators/plugins.ts
@@ -1,5 +1,5 @@
1import { exists, isArray, isSafePath } from './misc' 1import { exists, isArray, isSafePath } from './misc'
2import * as validator from 'validator' 2import validator from 'validator'
3import { PluginType } from '../../../shared/models/plugins/plugin.type' 3import { PluginType } from '../../../shared/models/plugins/plugin.type'
4import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 4import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
5import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model' 5import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model'
diff --git a/server/helpers/custom-validators/search.ts b/server/helpers/custom-validators/search.ts
index ee732b15a..bb17134c3 100644
--- a/server/helpers/custom-validators/search.ts
+++ b/server/helpers/custom-validators/search.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { isArray } from './misc' 2import { isArray } from './misc'
3 3
4function isNumberArray (value: any) { 4function isNumberArray (value: any) {
diff --git a/server/helpers/custom-validators/servers.ts b/server/helpers/custom-validators/servers.ts
index 7ced36fd3..adf1ea497 100644
--- a/server/helpers/custom-validators/servers.ts
+++ b/server/helpers/custom-validators/servers.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { exists, isArray } from './misc' 2import { exists, isArray } from './misc'
3import { isTestInstance } from '../core-utils' 3import { isTestInstance } from '../core-utils'
4import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 4import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
diff --git a/server/helpers/custom-validators/user-notifications.ts b/server/helpers/custom-validators/user-notifications.ts
index 02ea3bbc2..5a4d10504 100644
--- a/server/helpers/custom-validators/user-notifications.ts
+++ b/server/helpers/custom-validators/user-notifications.ts
@@ -1,5 +1,5 @@
1import { exists } from './misc' 1import { exists } from './misc'
2import * as validator from 'validator' 2import validator from 'validator'
3import { UserNotificationType } from '../../../shared/models/users' 3import { UserNotificationType } from '../../../shared/models/users'
4import { UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model' 4import { UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model'
5 5
diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts
index 008916a04..b4d5751e7 100644
--- a/server/helpers/custom-validators/users.ts
+++ b/server/helpers/custom-validators/users.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { UserRole } from '../../../shared' 2import { UserRole } from '../../../shared'
3import { CONSTRAINTS_FIELDS, NSFW_POLICY_TYPES } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS, NSFW_POLICY_TYPES } from '../../initializers/constants'
4import { exists, isArray, isBooleanValid, isFileValid } from './misc' 4import { exists, isArray, isBooleanValid, isFileValid } from './misc'
diff --git a/server/helpers/custom-validators/video-abuses.ts b/server/helpers/custom-validators/video-abuses.ts
index e43d12be8..a9478c76a 100644
--- a/server/helpers/custom-validators/video-abuses.ts
+++ b/server/helpers/custom-validators/video-abuses.ts
@@ -1,5 +1,5 @@
1import { Response } from 'express' 1import { Response } from 'express'
2import * as validator from 'validator' 2import validator from 'validator'
3import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants'
4import { exists } from './misc' 4import { exists } from './misc'
5import { VideoAbuseModel } from '../../models/video/video-abuse' 5import { VideoAbuseModel } from '../../models/video/video-abuse'
diff --git a/server/helpers/custom-validators/video-blacklist.ts b/server/helpers/custom-validators/video-blacklist.ts
index 9a44332ef..17cb3b00b 100644
--- a/server/helpers/custom-validators/video-blacklist.ts
+++ b/server/helpers/custom-validators/video-blacklist.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { exists } from './misc' 2import { exists } from './misc'
3import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
4import { VideoBlacklistType } from '../../../shared/models/videos' 4import { VideoBlacklistType } from '../../../shared/models/videos'
diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts
index 6c52dc093..ded5d5171 100644
--- a/server/helpers/custom-validators/video-channels.ts
+++ b/server/helpers/custom-validators/video-channels.ts
@@ -1,4 +1,4 @@
1import * as validator from 'validator' 1import validator from 'validator'
2import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 2import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
3import { exists } from './misc' 3import { exists } from './misc'
4 4
diff --git a/server/helpers/custom-validators/video-comments.ts b/server/helpers/custom-validators/video-comments.ts
index 8a7cd7105..846f28b17 100644
--- a/server/helpers/custom-validators/video-comments.ts
+++ b/server/helpers/custom-validators/video-comments.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as validator from 'validator' 2import validator from 'validator'
3import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
4 4
5const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS 5const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS
diff --git a/server/helpers/custom-validators/video-imports.ts b/server/helpers/custom-validators/video-imports.ts
index 8820c4c0a..ffad482b4 100644
--- a/server/helpers/custom-validators/video-imports.ts
+++ b/server/helpers/custom-validators/video-imports.ts
@@ -1,5 +1,5 @@
1import 'multer' 1import 'multer'
2import * as validator from 'validator' 2import validator from 'validator'
3import { CONSTRAINTS_FIELDS, MIMETYPES, VIDEO_IMPORT_STATES } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS, MIMETYPES, VIDEO_IMPORT_STATES } from '../../initializers/constants'
4import { exists, isFileValid } from './misc' 4import { exists, isFileValid } from './misc'
5import * as express from 'express' 5import * as express from 'express'
diff --git a/server/helpers/custom-validators/video-playlists.ts b/server/helpers/custom-validators/video-playlists.ts
index 60125dcda..4bb8384ab 100644
--- a/server/helpers/custom-validators/video-playlists.ts
+++ b/server/helpers/custom-validators/video-playlists.ts
@@ -1,5 +1,5 @@
1import { exists } from './misc' 1import { exists } from './misc'
2import * as validator from 'validator' 2import validator from 'validator'
3import { CONSTRAINTS_FIELDS, VIDEO_PLAYLIST_PRIVACIES, VIDEO_PLAYLIST_TYPES } from '../../initializers/constants' 3import { CONSTRAINTS_FIELDS, VIDEO_PLAYLIST_PRIVACIES, VIDEO_PLAYLIST_TYPES } from '../../initializers/constants'
4import * as express from 'express' 4import * as express from 'express'
5import { VideoPlaylistModel } from '../../models/video/video-playlist' 5import { VideoPlaylistModel } from '../../models/video/video-playlist'
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index ff93f2e99..a9e859e54 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -1,5 +1,5 @@
1import { values } from 'lodash' 1import { values } from 'lodash'
2import * as validator from 'validator' 2import validator from 'validator'
3import { VideoFilter, VideoPrivacy, VideoRateType } from '../../../shared' 3import { VideoFilter, VideoPrivacy, VideoRateType } from '../../../shared'
4import { 4import {
5 CONSTRAINTS_FIELDS, 5 CONSTRAINTS_FIELDS,
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 42a30f84f..2fcf0c4ea 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -4,7 +4,7 @@ import { CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE, PLUGIN_GLOBAL_CSS_PATH, WEBSERVER
4import { join } from 'path' 4import { join } from 'path'
5import { escapeHTML, sha256 } from '../helpers/core-utils' 5import { escapeHTML, sha256 } from '../helpers/core-utils'
6import { VideoModel } from '../models/video/video' 6import { VideoModel } from '../models/video/video'
7import * as validator from 'validator' 7import validator from 'validator'
8import { VideoPrivacy } from '../../shared/models/videos' 8import { VideoPrivacy } from '../../shared/models/videos'
9import { readFile } from 'fs-extra' 9import { readFile } from 'fs-extra'
10import { getActivityStreamDuration } from '../models/video/video-format-utils' 10import { getActivityStreamDuration } from '../models/video/video-format-utils'
diff --git a/server/models/utils.ts b/server/models/utils.ts
index 4199cc443..f89b80011 100644
--- a/server/models/utils.ts
+++ b/server/models/utils.ts
@@ -1,5 +1,5 @@
1import { Model, Sequelize } from 'sequelize-typescript' 1import { Model, Sequelize } from 'sequelize-typescript'
2import * as validator from 'validator' 2import validator from 'validator'
3import { Col } from 'sequelize/types/lib/utils' 3import { Col } from 'sequelize/types/lib/utils'
4import { literal, OrderItem } from 'sequelize' 4import { literal, OrderItem } from 'sequelize'
5 5
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts
index 9d2ea710e..f2d71357f 100644
--- a/server/models/video/video-playlist-element.ts
+++ b/server/models/video/video-playlist-element.ts
@@ -19,7 +19,7 @@ import { getSort, throwIfNotValid } from '../utils'
19import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 19import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
20import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 20import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
21import { PlaylistElementObject } from '../../../shared/models/activitypub/objects/playlist-element-object' 21import { PlaylistElementObject } from '../../../shared/models/activitypub/objects/playlist-element-object'
22import * as validator from 'validator' 22import validator from 'validator'
23import { AggregateOptions, Op, ScopeOptions, Sequelize, Transaction } from 'sequelize' 23import { AggregateOptions, Op, ScopeOptions, Sequelize, Transaction } from 'sequelize'
24import { VideoPlaylistElement, VideoPlaylistElementType } from '../../../shared/models/videos/playlist/video-playlist-element.model' 24import { VideoPlaylistElement, VideoPlaylistElementType } from '../../../shared/models/videos/playlist/video-playlist-element.model'
25import { AccountModel } from '../account/account' 25import { AccountModel } from '../account/account'
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 1f3c25ecb..fec3dcc20 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -142,7 +142,7 @@ import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../typings/mode
142import { MThumbnail } from '../../typings/models/video/thumbnail' 142import { MThumbnail } from '../../typings/models/video/thumbnail'
143import { VideoFile } from '@shared/models/videos/video-file.model' 143import { VideoFile } from '@shared/models/videos/video-file.model'
144import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths' 144import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths'
145import * as validator from 'validator' 145import validator from 'validator'
146 146
147// FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation 147// FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation
148const indexes: (ModelIndexesOptions & { where?: WhereOptions })[] = [ 148const indexes: (ModelIndexesOptions & { where?: WhereOptions })[] = [
diff --git a/server/tests/helpers/core-utils.ts b/server/tests/helpers/core-utils.ts
index 2dbe8d635..31fc6dd7c 100644
--- a/server/tests/helpers/core-utils.ts
+++ b/server/tests/helpers/core-utils.ts
@@ -4,7 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { snakeCase } from 'lodash' 5import { snakeCase } from 'lodash'
6import { objectConverter, parseBytes } from '../../helpers/core-utils' 6import { objectConverter, parseBytes } from '../../helpers/core-utils'
7import { isNumeric } from 'validator' 7import validator from 'validator'
8 8
9const expect = chai.expect 9const expect = chai.expect
10 10
@@ -53,7 +53,7 @@ describe('Parse Bytes', function () {
53 } 53 }
54 54
55 function valueConverter (v: any) { 55 function valueConverter (v: any) {
56 if (isNumeric(v + '')) return parseInt('' + v, 10) 56 if (validator.isNumeric(v + '')) return parseInt('' + v, 10)
57 57
58 return v 58 return v
59 } 59 }