1- import isArray from './lib/es-utils/is-array'
21import includes from './lib/es-utils/includes'
32import intRange from './lib/validators/int-range'
43import stringWithLength from './lib/validators/string-with-length'
@@ -210,7 +209,7 @@ const schema: Schema = {
210209 enabledReleaseStages : {
211210 defaultValue : ( ) => null ,
212211 message : 'should be an array of strings' ,
213- validate : ( value : unknown ) => value === null || ( isArray ( value ) && value . filter ( f => typeof f === 'string' ) . length === value . length )
212+ validate : ( value : unknown ) => value === null || ( Array . isArray ( value ) && value . filter ( f => typeof f === 'string' ) . length === value . length )
214213 } ,
215214 releaseStage : {
216215 defaultValue : ( ) => 'production' ,
@@ -225,7 +224,7 @@ const schema: Schema = {
225224 enabledBreadcrumbTypes : {
226225 defaultValue : ( ) => BREADCRUMB_TYPES ,
227226 message : `should be null or a list of available breadcrumb types (${ BREADCRUMB_TYPES . join ( ',' ) } )` ,
228- validate : ( value : unknown ) => value === null || ( isArray ( value ) && value . reduce ( ( accum , maybeType ) => {
227+ validate : ( value : unknown ) => value === null || ( Array . isArray ( value ) && value . reduce ( ( accum , maybeType ) => {
229228 if ( accum === false ) return accum
230229 // TS doesn't like passing a readonly to a function that might mutate an array
231230 return includes ( BREADCRUMB_TYPES as unknown as any [ ] , maybeType )
@@ -266,23 +265,23 @@ const schema: Schema = {
266265 defaultValue : ( ) => [ 'password' ] ,
267266 message : 'should be an array of strings|regexes' ,
268267 validate : ( value : unknown ) =>
269- isArray ( value ) && value . length === value . filter ( s =>
268+ Array . isArray ( value ) && value . length === value . filter ( s =>
270269 ( typeof s === 'string' || ( s && typeof s . test === 'function' ) )
271270 ) . length
272271 } ,
273272 plugins : {
274273 defaultValue : ( ) => ( [ ] ) ,
275274 message : 'should be an array of plugin objects' ,
276275 validate : ( value : unknown ) =>
277- isArray ( value ) && value . length === value . filter ( p =>
276+ Array . isArray ( value ) && value . length === value . filter ( p =>
278277 ( p && typeof p === 'object' && typeof p . load === 'function' )
279278 ) . length
280279 } ,
281280 featureFlags : {
282281 defaultValue : ( ) => [ ] ,
283282 message : 'should be an array of objects that have a "name" property' ,
284283 validate : ( value : unknown ) =>
285- isArray ( value ) && value . length === value . filter ( feature =>
284+ Array . isArray ( value ) && value . length === value . filter ( feature =>
286285 feature && typeof feature === 'object' && typeof feature . name === 'string'
287286 ) . length
288287 } ,
0 commit comments