TITLE: An extension of a continuous function onto the closure
QUESTION [5 upvotes]: Let $S$ be a proper subset (not closed) of a metric space $X$. Suppose that $f:S \to \Bbb R$ be continuous. I want to know the condition under which $f$ can be continuously extended to $\bar{S}$. 
I am only aware of one condition when $f$ is uniformly continuous. Is there any other ?

REPLY [6 votes]: This question was investigated in my joint with Misha Mitrofanov paper “Approximation of continuous functions on  Fréchet spaces” (at pages 794-796 of English version, which is downloadable in the source file). In particular, there I proved the following 
Lemma 2.  Let  $X$   be a Fréchet-Urysohn topological space, $Y$  be a regular topological space, and $D$  be a dense subset of the space $X$.  A continuous mapping   $f : D\to Y$  can be extended to a continuous mapping
$\hat f : X\to Y$ iff for each sequence $\{x_n\}$ of points of the set $D$ convergent in $X$, a sequence  $\{ f(x_n)\}$ is also convergent. 
which holds when both spaces $X$ and $Y$ are metric, because metric spaces are Fréchet-Urysohn and regular.