Skip to content

Commit

Permalink
improve compose method doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-koehler committed Jun 12, 2024
1 parent 80a0701 commit 0f7c99f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/util/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import range from 'lodash/range';
import { isScoped, Scopable } from '../models';

/**
* Composes two JSON pointer. Pointer1 is appended to pointer2.
* JSON pointer is seperated and start with '/' e.g: /foo/0
* Composes two JSON pointer. Pointer2 is appended to pointer1.
* Example: pointer1 `'/foo/0'` and pointer2 `'/bar'` results in `'/foo/0/bar'`.
*
* @param {string} pointer1 JSON pointer
* @param {string} pointer2 JSON pointer
* @param {string} pointer1 Initial JSON pointer
* @param {string} pointer2 JSON pointer to append to `pointer1`
* @returns {string} resulting JSON pointer
*/
export const compose = (pointer1: string, pointer2: string) => {
Expand Down

0 comments on commit 0f7c99f

Please sign in to comment.