> For the complete documentation index, see [llms.txt](https://soufatn.gitbook.io/rxjs-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soufatn.gitbook.io/rxjs-book/summary/observable/observable_instance_methods/sharevalue.md).

# shareValue

Returns an observable sequence that shares a single subscription to the underlying sequence and starts with initialValue.

This operator is a specialization of `publishValue` which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.

## Returns

*(`Observable`)*: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.

## Example
