# @node-wot/td-tools

> W3C Web of Things (WoT) Thing Description parser, serializer, and other tools

Latest version **0.9.0** (published 2025-03-10) · EPL-2.0 OR W3C-20150513 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @node-wot/td-tools
pnpm add @node-wot/td-tools
yarn add @node-wot/td-tools
bun add @node-wot/td-tools
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.9.0 |
| Published | 2025-03-10 |
| First published | 2018-02-07 |
| Weekly downloads | 0 |
| License | EPL-2.0 OR W3C-20150513 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 123.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 192 |
| Author | Eclipse Thingweb |
| Maintainers | cristiano.aguzzi, jkrhb, mkovatsc, danielpeintner, sebastiankb, h0ru5, egeko |

## Links

- npm: https://www.npmjs.com/package/@node-wot/td-tools
- Repository: https://github.com/eclipse-thingweb/node-wot.git#master
- Homepage: https://github.com/eclipse-thingweb/node-wot/tree/master/packages/td-tools#readme
- Issues: https://github.com/eclipse-thingweb/node-wot/issues
- npm.io page: https://npm.io/package/@node-wot/td-tools

## Dependencies (8)

- [ajv](https://npm.io/package/ajv.md) ^8.11.0
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [ajv-formats](https://npm.io/package/ajv-formats.md) ^2.1.1
- [url-toolkit](https://npm.io/package/url-toolkit.md) 2.1.6
- [is-absolute-url](https://npm.io/package/is-absolute-url.md) 3.0.3
- [wot-thing-model-types](https://npm.io/package/wot-thing-model-types.md) 1.1.0-09-November-2023
- [json-placeholder-replacer](https://npm.io/package/json-placeholder-replacer.md) ^1.0.35
- [wot-typescript-definitions](https://npm.io/package/wot-typescript-definitions.md) 0.8.0-SNAPSHOT.29

## Recent versions

- 0.9.0 (latest) — 2025-03-10
- 0.8.16 — 2024-08-21
- 0.8.15 — 2024-08-08
- 0.8.14 — 2024-06-11
- 0.8.13 — 2024-04-11
- 0.8.12 — 2024-01-29
- 0.8.11 — 2023-12-21
- 0.8.10 — 2023-11-13
- 0.8.9 — 2023-10-13
- 0.8.8 — 2023-09-12
- 0.8.7 — 2023-06-13
- 0.8.6 — 2023-05-05
- 0.8.5 — 2023-02-27
- 0.8.4 — 2023-01-20
- 0.8.3 — 2022-11-30
- … 28 more at https://npm.io/package/@node-wot/td-tools/versions

## README

> [!WARNING] > `@node-wot/td-tools` package will be removed in the future. Please use `@node-wot/core` / `@thingweb/thing-model` / `@thingweb/td-utils` package instead.

# TD (Thing Description) tools of node-wot

Current Maintainer(s): [@danielpeintner](https://github.com/danielpeintner) [@relu91](https://github.com/relu91)

## Getting Started

In the following example it is shown how td-tools of node-wot can be used.

Note: Some additional tooling (e.g., AAS AID, TD to AsyncAPI Converter) can be found in its own repository (see https://github.com/eclipse-thingweb/td-tools).

### Prerequisites

-   `npm install @node-wot/td-tools`

### Example

The example parses a TD and also serializes yet another newly created TD.

`node example.js`

```
// example.js
const TDTools = require("@node-wot/td-tools");
const { Thing } = require("@node-wot/td-tools");

// parse TD
const tdString = JSON.stringify({
    id : "123",
    title: "MyThing"
});
const dd = TDTools.parseTD(tdString);
console.log("**** PARSED TD ****");
console.log(dd);
console.log("****");


// init Thing and serialize to TD
const thing = new Thing();
thing.id = "789";
thing["@type"] = "Thing";
thing.support = "foo@example.com"
thing.properties = {
    "myProp" : {
        type: "integer"
    }
}
const tdString2 = TDTools.serializeTD(thing);
console.log("**** SERIALIZED TD ****");
console.log(tdString2);
console.log("****");
```

## More Details

See <https://github.com/eclipse-thingweb/node-wot/>

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