Variable HelpersConst

Helpers: {
    Comparison: {
        $ge: string;
        $gt: string;
        $le: string;
        $lt: string;
        $ne: string;
    };
    DeleteType: typeof DeleteType;
    SPARQL: {
        ensureFullURI: ((prefixedURIOrFullURI) => string);
        ensurePrefixedURI: ((prefixedURIOrFullURI) => null | string);
        getFullURI: ((prefixedURI) => string);
        getPredicate: ((internalKey) => string);
        getPrefixedURI: ((fullURI) => null | string);
        getSPARQLPrefixes: ((prefixes?) => string);
    };
    Types: {
        Boolean: BooleanConstructor;
        Date: DateConstructor;
        NamedIndividual: string;
        Number: NumberConstructor;
        String: StringConstructor;
    };
    deepAssign: ((target, source) => any);
    defaultOptions: {
        externalKey: undefined;
        internalKey: undefined;
        onDelete: DeleteType;
        prefix: string;
    };
    extractId: ((model, instanceUri) => Promise<string | undefined>);
    getIdFromIdentifier: ((identifier) => any);
    getModel: ((object) => any);
    graphDBValueToJsValue: ((val, type) => any);
    isModel: ((object) => any);
    objToPath: ((obj) => any[]);
    pathsToObj: ((paths) => object);
    regexBuilder: ((pattern, flags?) => string);
    sortObjectByKey: ((obj) => {});
    stringToSpaces: ((string) => string);
    valToGraphDBValue: ((val, type) => any);
} = ...

Type declaration

  • Comparison: {
        $ge: string;
        $gt: string;
        $le: string;
        $lt: string;
        $ne: string;
    }
    • $ge: string
    • $gt: string
    • $le: string
    • $lt: string
    • $ne: string
  • DeleteType: typeof DeleteType
  • SPARQL: {
        ensureFullURI: ((prefixedURIOrFullURI) => string);
        ensurePrefixedURI: ((prefixedURIOrFullURI) => null | string);
        getFullURI: ((prefixedURI) => string);
        getPredicate: ((internalKey) => string);
        getPrefixedURI: ((fullURI) => null | string);
        getSPARQLPrefixes: ((prefixes?) => string);
    }
    • ensureFullURI: ((prefixedURIOrFullURI) => string)
        • (prefixedURIOrFullURI): string
        • Ensure the uri is a full URI.

          Parameters

          • prefixedURIOrFullURI: string

            {string}

          Returns string

    • ensurePrefixedURI: ((prefixedURIOrFullURI) => null | string)
        • (prefixedURIOrFullURI): null | string
        • Ensure the uri is a prefixed URI.

          Parameters

          • prefixedURIOrFullURI: string

            {string}

          Returns null | string

    • getFullURI: ((prefixedURI) => string)
        • (prefixedURI): string
        • Get full URI of the prefixed URI.

          Parameters

          • prefixedURI: string

            {string}

          Returns string

    • getPredicate: ((internalKey) => string)
        • (internalKey): string
        • Parameters

          • internalKey: string

          Returns string

    • getPrefixedURI: ((fullURI) => null | string)
        • (fullURI): null | string
        • Get prefixed URI. i.e. cp:Client

          Parameters

          • fullURI: string

            {string}

          Returns null | string

          prefixed URI or null

    • getSPARQLPrefixes: ((prefixes?) => string)
        • (prefixes?): string
        • Parameters

          • Optional prefixes: string[]

            {string[]}

          Returns string

  • Types: {
        Boolean: BooleanConstructor;
        Date: DateConstructor;
        NamedIndividual: string;
        Number: NumberConstructor;
        String: StringConstructor;
    }
    • Boolean: BooleanConstructor
    • Date: DateConstructor
    • NamedIndividual: string
    • Number: NumberConstructor
    • String: StringConstructor
  • deepAssign: ((target, source) => any)
      • (target, source): any
      • Performs a deep merge of source into target.

        Parameters

        • target: any
        • source: any

        Returns any

  • defaultOptions: {
        externalKey: undefined;
        internalKey: undefined;
        onDelete: DeleteType;
        prefix: string;
    }
    • externalKey: undefined
    • internalKey: undefined
    • onDelete: DeleteType
    • prefix: string
  • extractId: ((model, instanceUri) => Promise<string | undefined>)
      • (model, instanceUri): Promise<string | undefined>
      • Parameters

        Returns Promise<string | undefined>

  • getIdFromIdentifier: ((identifier) => any)
      • (identifier): any
      • Parameters

        • identifier: any

        Returns any

  • getModel: ((object) => any)
      • (object): any
      • Parameters

        • object: any

        Returns any

  • graphDBValueToJsValue: ((val, type) => any)
      • (val, type): any
      • Parameters

        Returns any

  • isModel: ((object) => any)
      • (object): any
      • Parameters

        • object: any

        Returns any

  • objToPath: ((obj) => any[])
      • (obj): any[]
      • Convert populate object to paths.

        Example

        `{a: ['b', 'c']} => ['a', 'a.b', 'a.c']`
        

        Parameters

        • obj: object | string[]

        Returns any[]

  • pathsToObj: ((paths) => object)
      • (paths): object
      • Reverse of objToPath but not identical

        Example

        ['a', 'a.b', 'a.c'] => {a: {b: {}, c: {}}}
        

        Parameters

        • paths: string[]

        Returns object

  • regexBuilder: ((pattern, flags?) => string)
      • (pattern, flags?): string
      • Parameters

        • pattern: string
        • Optional flags: string

        Returns string

  • sortObjectByKey: ((obj) => {})
      • (obj): {}
      • (javascript) returns the given object with keys sorted alphanumerically.

        Parameters

        • obj: object

          the object to sort

        Returns {}

        the sorted object

    • stringToSpaces: ((string) => string)
        • (string): string
        • Parameters

          • string: string

          Returns string

    • valToGraphDBValue: ((val, type) => any)
        • (val, type): any
        • Parameters

          Returns any

    Generated using TypeDoc