# here

> here-document on node.js

Latest version **0.0.2** (published 2012-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install here
pnpm add here
yarn add here
bun add here
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2012-08-28 |
| First published | 2012-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | cho45 |
| Maintainers | cho45 |
| Keywords | here, document, utility |

## Links

- npm: https://www.npmjs.com/package/here
- Repository: https://github.com/cho45/node-here.js
- npm.io page: https://npm.io/package/here

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2012-08-28
- 0.0.1 — 2012-08-27

## README

node-here.js
============

https://github.com/cho45/node-here.js

node-here.js is here-document feature for node.js.

SYNOPSYS
========

This is implemeneted with block comment syntax.

```
var here = require('here').here;

var string = here(/*
  foo
  bar
  baz
*/);

```

DESCRIPTION
===========

## `here(/* document */)`

`here` function returns block comment on argument as string like object.

### Escape character

Any characters can be escaped by backslash `\` like following:

```
here(/*
  /\* *\/
*/); //=> '/* */'

here(/* \\ */); //=> '\\'
```

### WYSIWYG

If a here document starts with `''/*`, it is wysiwyg mode which does not translate any escape characters.

```
here(''/*
  \foo\bar\baz
*/); //=> '\\fooo\\bar\\baz'
```

In this case, string `*/` can be apeared in here document.

### Returning value

`here()` returns not string but String object. That is like following:

```
var a = here(/* foobar */);
typeof a === 'object';

a.valueOf(); //=> 'foobar'
"Hello, " + a; //=> 'Hello, foobar';
```

### Method unindent();

Returning String object hav `unindent()` utility method which removes indent in a string.

```
here(/*
  foo
    bar
  baz
*/).unindent()
```

is convert to following:

```
foo
  bar
baz
```

---
_Source: https://npm.io/package/here · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
