How can I do following in Node js/Javascript?

Eg. Say original occurence = "xyz-abc-def"
I wanted to replace whole occurrences of above string by "123-abc-456". xyz and def are constant in above string while abc can be any string in original occurence. Eg. 

```
"xyz-asd-def" -> "123-asd-456"
"xyz-ghj-def" -> "123-ghj-456"

```

How can I do that in node js?