# ifn-survey-tools

> Typescript library with tools to work with Influenzanet survey definition

Latest version **0.2.0** (published 2025-01-31) · 0 weekly downloads

## Install

```sh
npm install ifn-survey-tools
pnpm add ifn-survey-tools
yarn add ifn-survey-tools
bun add ifn-survey-tools
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2025-01-31 |
| First published | 2023-11-01 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 106 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | cturbelin |

## Links

- npm: https://www.npmjs.com/package/ifn-survey-tools
- Repository: https://github.com/influenzanet/survey-tools.ts
- Issues: https://github.com/influenzanet/survey-tools.ts
- npm.io page: https://npm.io/package/ifn-survey-tools

## Dependencies (3)

- [date-fns](https://npm.io/package/date-fns.md) ^2.30.0
- [static-jsx](https://npm.io/package/static-jsx.md) ^1.0.1
- [survey-engine](https://npm.io/package/survey-engine.md) ^1.2.1

## Recent versions

- 0.2.0 (latest) — 2025-01-31
- 0.1.0 — 2024-11-11
- 0.0.2 — 2024-01-29
- 0.0.1 — 2023-11-01

## README

# Influenzanet Survey Tools Typescript Library

This library contains some post-processig tools to work with Survey Definition (from [Survey Engine](https://github.com/influenzanet/survey-engine.ts)). It's not tools to create and manipulate survey definition, for this look at [case-editor-tools](https://github.com/coneno/case-editor-tools))

It provides :
- Survey renderer : render survey as static document (html)
- Survey checker  : check survey consistency, common bugs and conformance (WIP) 

# Installation

To use this library, add it a dependency 

```
yarn add ifn-survey-tools
```

To work on this library
```
yarn install
```

## Usage

### Survey Renderer


```ts
import { HtmlRenderer, HtmlRendererContext, BootstrapTheme   } from "ifn-survey-tools"

// Create a survey context, to tell the renderer how to render (languages to show and css theme)
const context = new HtmlRendererContext(['fr'], new BootstrapTheme());
const renderer = new HtmlRenderer();

// Considering `survey` contains your survey definition
const doc = renderer.render(survey, context);

```

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