Skip to content
tasogarepgPublic

About

A here-document utility for Node.js.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hdoc

A here-document utility for Node.js.

Installation

$ npm install hdoc

Usage

var hdoc = require('hdoc').h;

var str = eval(hdoc)(function() {/*
  aa
    bb
  cc
*/});

console.log(str); // '  aa\n    bb\n  cc'

cut indents

var hdoci = require('hdoc').i;

var str = eval(hdoci)(function() {/*
  aa
    bb
  cc
*/});

console.log(str); // 'aa\n  bb\ncc'

embed vals

var hdoc = require('hdoc').h;

var v1 = 'str1';
var v2 = 20;

var str = eval(hdoc)(function() {/*
  aa
  ${v1}
  ${v2}
  bb
*/});

console.log(str); // '  aa\n  str1\n  20\n  bb'

License

The MIT License

About

A here-document utility for Node.js.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages