I think your question is related to an extension of a continuous function to limit points of its domain. This problem is investigated, for different topological spaces, see the references. A general problem is the following. Given a continuous function $f$ from a subspace $D$ of a topological space $X$ to a topological space $Y$, whether $f$ can be extended to a continuous function from $X$ to $Y$.
From now we shall consider a particular interesting case when $D$ is dense in $X$. In this case each point of $X\setminus D$ is a limit point of $X$. If $Y$ is Hausdorff, then is well-known (see, for instance [Eng, Theorem 1.5.4]) and easy to show that if an extension $\bar f$ of $f$ exists then it is unique. It follows that $f’(X)\subset f(X)$ for any extension $f’$ of $f$ iff $\bar f(X)\subset f(X)$ for some extension $\bar f$ of $f$.
A characterization of extendable maps $f$ is provided in lemmas in this my answer. They follows that when both spaces $X$ and $Y$ are metric (for instance, when they are subspaces of the real line or the plane), $f$ can be extended from $D$ to $X$ is iff for each sequence $\{x_n\}$ of points of the set $D$ convergent in $X$, a sequence $\{f(x_n)\}$ is also convergent in $Y$. If $Y$ is a complete metric space then the latter condition is equivalent to $\{f(x_n)\}$ is a Cauchy sequence. In particular, if $f$ is uniformly continuous then it is extendable. The completeness of $Y$ is essential here. Indeed, if $X=[0,1]$ and $D=Y=(0,1)$ then although the identity function $f$ from $D$ to $Y$ keeps Cauchy sequences but it cannot be extended to $X$.
An other important case takes place when $D$ is Tychonoff, $Y=[0,1]$ and each continuous map from $D$ to $Y$ can be extended to $X$. Then $X$ is equivalent to a Stone-Čech compactification of $D$, see [Eng, Corollary 3.6.3]. This follows that each continuous map from $D$ to any compact space $Y$ can be extended to $X$.
References
[Ano] Anonymous et al., An extension of a continuous function onto the closure.
[Eng] Ryszard Engelking, General Topology, 2nd ed., Heldermann, Berlin, 1989.
[Pau] Paul et al., Extending continuous function $D\to I$, where $D$ is a dense subspace of a separable Tychonoff space.