Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

155
Vistas
why doesn't NodeJS support String.prototype.replaceAll?

This string method exists in browserland, but not in Node. Why not? It's neither brand-new nor exotic.

  • replaceAll is part of ECMA-262 src
  • replaceAll is described in detail on the V8 blog (added in v8.1) src
  • NodeJS upgraded to V8 v8.1 with NodeJS v14.0 src

And yet:

$ node
Welcome to Node.js v14.13.1.
Type ".help" for more information.
> 'asdf'.replaceAll
undefined

I'm not asking for polyfills; I can do a regex or loop over single-instance replace. I'm trying to figure out why this seemingly unremarkable feature doesn't exist in NodeJS, even though it seems to be available in just about every other JS environment, and even though all the docs suggest to me that it should exist.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Nodejs v14 has V8 8.4 But, replaceAll was added to V8 8.5. Nodejs v15 has V8 8.6 and thus that's the first nodejs version where you can use .replaceAll(). You can see this all described in the nodejs v15 release notes or in this specific change report.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda