Skip to content

Function: splitKeyPredicate() ​

splitKeyPredicate(segment): object

Defined in: utils/canonical-key-url.ts:51

Split a resource path segment into its name and key predicate: Products(1) gives { name: 'Products', key: '1' }, Products gives { name: 'Products' }. Plain string scanning (the segment is untrusted input).

Parameters ​

segment ​

string

Returns ​

object

key? ​

optional key?: string

name ​

name: string