Skip to content

EmilioBarradas/nabo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nabo

🧵 It's just string interpolation.

npm badge License badge

Features • Install • Usage

Showcases package's TypeScript inference on string literals

Features

  • TypeScript inference for string literals
  • Supports nested objects
  • Supports CJS and ESM
  • No dependencies
  • 2 kb in size

Install

npm install nabo

Usage

import { nabo } from "nabo";

nabo(
    `There are {personCount} people.
     The first person is called {firstPerson.name}.
     The second person is called {secondPerson.name}.`,
    {
        personCount: "two",
        firstPerson: { name: "John Doe" },
        secondPerson: { name: "Jane Doe" },
    }
);