adverb
almost; nearly; on the verge of
Used with verbs to indicate that something was about to happen or almost happened, often in past tense. Similar to もう少しで, but more literary or emphatic.
すんでに事故になるところだった。
It almost turned into an accident.
彼はすんでに遅刻するところだった。
He was on the verge of being late.
Derived from classical Japanese すでに (already), with an emphatic ん inserted. The exact historical development is uncertain.