@robertsspaceindustries/sub
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

@robertsspaceindustries/sub

Template string substition

Usage

import formatString from "@robertsspaceindustries/sub";

formatString("Lorem {{ipsum}}", {
	ipsum: "Ipsum",
}); // Expected result: "Lorem Ipsum"

Custom delimiters

import formatString from "@robertsspaceindustries/sub";

formatString(
	"Lorem {ipsum}",
	{
		ipsum: "Ipsum",
	},
	{
		prefix: "{",
		suffix: "}",
	},
); // Expected result: "Lorem Ipsum"

Readme

Keywords

Package Sidebar

Install

npm i @robertsspaceindustries/sub

Weekly Downloads

1

Version

1.0.9

License

ISC

Unpacked Size

2.63 kB

Total Files

5

Last publish

Collaborators

  • robertsspaceindustries