Skip to content

Replace string manipulations (split(..).pop(), etc) with real URL helpers #21

@julrich

Description

@julrich

Instead of doing stuff like:

const schemaPointer = subSchema.$ref.split('#').pop();
const schemaId = subSchema.$ref.split('#').shift();

we could do stuff like this, in more places:

const targetSchemaURL = new URL(targetSchemaId);
const layeringSchemaURL = new URL(schemaId);

const targetSchemaURLPathParts = targetSchemaURL.pathname.split('/');
const layeringSchemaURLPathParts = layeringSchemaURL.pathname.split('/');

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions