[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/core](../README) / helpers

# helpers

Named helper exports — importable, tree-shakeable, never globals. Import from
`@zerotal/core/helpers`.

A grab-bag of small, dependency-free utilities used throughout an application:
path resolution ([basePath](functions/basePath)), environment-variable access
([env](functions/env), [requireEnv](functions/requireEnv), [setAppEnv](functions/setAppEnv)), value-flow combinators
([tap](functions/tap), [tapAsync](functions/tapAsync), [pipe](functions/pipe), [pipeAsync](functions/pipeAsync)), error
suppression ([rescue](functions/rescue), [rescueSync](functions/rescueSync)), safe nested lookups
([data\_get](functions/data_get)), the [Str](../index/variables/Str) string helper, and [markdownPage](functions/markdownPage)
for rendering standalone Markdown documents.

## Example

```ts
import { env, requireEnv, tap, data_get } from '@zerotal/core/helpers';

const debug   = env('APP_DEBUG', false);          // boolean, coerced
const appKey  = requireEnv('APP_KEY');            // throws if unset
const city    = data_get(payload, 'user.address.city', 'Unknown');
const user    = tap(await User.create(data), (u) => log(`created ${u.id}`));

@packageDocumentation
```

## Interfaces

- [BunMarkdownOptions](interfaces/BunMarkdownOptions)

## Functions

- [escapeHtml](functions/escapeHtml)
- [basePath](functions/basePath)
- [setAppEnv](functions/setAppEnv)
- [env](functions/env)
- [requireEnv](functions/requireEnv)
- [tap](functions/tap)
- [tapAsync](functions/tapAsync)
- [pipe](functions/pipe)
- [pipeAsync](functions/pipeAsync)
- [rescue](functions/rescue)
- [rescueSync](functions/rescueSync)
- [data\_get](functions/data_get)
- [markdownPage](functions/markdownPage)

## References

### Str

Re-exports [Str](../index/variables/Str)

***

### pluralize

Re-exports [pluralize](../index/functions/pluralize)

***

### singularize

Re-exports [singularize](../index/functions/singularize)

***

### tableNameFor

Re-exports [tableNameFor](../index/functions/tableNameFor)

***

### deepMerge

Re-exports [deepMerge](../index/functions/deepMerge)

***

### parseCookieHeader

Re-exports [parseCookieHeader](../index/functions/parseCookieHeader)
