Skip to content

Commit

Permalink
feat: make BaseControls::namespace() public
Browse files Browse the repository at this point in the history
  • Loading branch information
thislooksfun committed Oct 14, 2022
1 parent c3aa9e9 commit f13d40b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reddit/base-controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ export abstract class BaseControls {
}

/**
* Namespace an id with the prefix.
* Namespace an id with the proper prefix for its type.
*
* @param id The ID of the item.
* @param id The ID to namespace.
*
* @returns The namespaced version of the id.
*/
protected namespace(id: string): string {
public namespace(id: string): string {
return id.startsWith(this.prefix) ? id : this.prefix + id;
}
}

0 comments on commit f13d40b

Please sign in to comment.