Skip to content

Instantly share code, notes, and snippets.

@onigoetz
Created January 18, 2024 16:19
Show Gist options
  • Save onigoetz/3e276f412e7a11b1d199bb80b454e5ed to your computer and use it in GitHub Desktop.
Save onigoetz/3e276f412e7a11b1d199bb80b454e5ed to your computer and use it in GitHub Desktop.
Profiling article examples
// Simple substitution
render("Hello, {name}!", { name: "John" }); // Hello, John!
// More advanced, with plurals
const message = `You have {numBooks, number} {numBooks, plural, one {book} other {books}}.`;
const variables = { numBooks: 5 };
render(message, variables); // You have 5 books.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment