Skip to content

Instantly share code, notes, and snippets.

@simbathesailor
Last active April 23, 2020 09:40
Show Gist options
  • Save simbathesailor/9c232740ca150bef559b114507889734 to your computer and use it in GitHub Desktop.
Save simbathesailor/9c232740ca150bef559b114507889734 to your computer and use it in GitHub Desktop.
PROCESS ENV DYNAMIC INJECTION

INPUT

$$_INTERNAL_MATHRANDOMSTART${Math.random()}MATHRANDOMEND$$_INTERNAL__

OUTPUT without loose

"use strict";

"$$INTERNAL_MATHRANDOMSTART".concat(Math.random(), "MATHRANDOMEND$$INTERNAL");

OUTPUT with loose

"use strict";

"$$INTERNAL_MATHRANDOMSTART" + Math.random() + "MATHRANDOMEND$$INTERNAL";

No transformation will also work :

$$_INTERNAL_MATHRANDOMSTART${Math.random()}MATHRANDOMEND$$_INTERNAL__;

All the outputs will work above.

Will update if any change later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment