MCPcopy Index your code
hub / github.com/hey-api/hey-api / join

Method join

packages/json-schema-ref-parser/src/pointer.ts:251–266  ·  view source on GitHub ↗

* Creates a JSON pointer path, by joining one or more tokens to a base path. * * @param base - The base path (e.g., "schema.json#/definitions/person") * @param tokens - The token(s) to append (e.g., ["name", "first"]) * @returns

(base: string, tokens: string | string[])

Source from the content-addressed store, hash-verified

249 * @returns
250 */
251 static join(base: string, tokens: string | string[]) {
252 // Ensure that the base path contains a hash
253 if (base.indexOf('#') === -1) {
254 base += '#';
255 }
256
257 // Append each token to the base path
258 tokens = Array.isArray(tokens) ? tokens : [tokens];
259 for (let i = 0; i < tokens.length; i++) {
260 const token = tokens[i]!;
261 // Encode the token, according to RFC 6901
262 base += '/' + encodeURIComponent(token.replace(tildes, '~0').replace(slashes, '~1'));
263 }
264
265 return base;
266 }
267}
268
269/**

Callers 15

rollup.config.mjsFile · 0.80
querySerializerFunction · 0.80
serializeArrayParamFunction · 0.80
serializeObjectParamFunction · 0.80
setupFunction · 0.80
getFilePathsFunction · 0.80
getSpecsPathFunction · 0.80
opencode.test.tsFile · 0.80
createPydanticConfigFunction · 0.80
getSnapshotsPathFunction · 0.80
getTempSnapshotsPathFunction · 0.80
opencode.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 15

getSpecsPathFunction · 0.64
outputHeaderToPrefixFunction · 0.64
createConfigFunction · 0.64
createConfigFunction · 0.64
createConfigFunction · 0.64
createConfigFunction · 0.64
createConfigFunction · 0.64
createConfigFunction · 0.64
getSpecsPathFunction · 0.64
getSnapshotsPathFunction · 0.64
getTempSnapshotsPathFunction · 0.64