jennifer-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

jennifer-js

Jennifer is a code generator for typescript. Inspired by https://github.com/dave/jennifer.

import jen from "jennifer-js";
import format from "jennifer-js/format";

format(jen.id("console").dot("log").call(jen.lit("hello world")).toString())

# yields

console.log("hello world")

It is not necessary to format the output to be valid, but tokens are generously spaced out which make for visually displeasing code.

See the "stage-2" self-generator for a comprehensive example.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1

Package Sidebar

Install

npm i jennifer-js

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

45.9 kB

Total Files

13

Last publish

Collaborators

  • ssttevee