move isObject into utils
Signed-off-by: Paul Cowan <paul.cowan@cutting.scot>
This commit is contained in:
@@ -15,15 +15,12 @@
|
||||
*/
|
||||
|
||||
import { FieldValidation } from '@rjsf/utils';
|
||||
import type { JsonObject, JsonValue } from '@backstage/types';
|
||||
import type { JsonObject } from '@backstage/types';
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { Draft07 as JSONSchema } from 'json-schema-library';
|
||||
import { createFieldValidation } from '../../lib';
|
||||
import { NextCustomFieldValidator } from '../../extensions';
|
||||
|
||||
function isObject(value: JsonValue | undefined): value is JsonObject {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
||||
}
|
||||
import { isObject } from './utils';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import type { JsonObject, JsonValue } from '@backstage/types';
|
||||
import type { FieldValidation } from '@rjsf/utils';
|
||||
import { FormValidation } from './createAsyncValidators';
|
||||
|
||||
@@ -35,3 +36,7 @@ export function hasErrors(errors?: FormValidation): boolean {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isObject(value: JsonValue | undefined): value is JsonObject {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user