0.8.16 • Published 10 months ago

@node-wot/td-tools v0.8.16

Weekly downloads
54
License
EPL-2.0 OR W3C-20...
Repository
github
Last release
10 months ago

!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 @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/

0.8.14

1 year ago

0.8.16

10 months ago

0.8.15

11 months ago

0.8.13

1 year ago

0.8.12

1 year ago

0.8.11

2 years ago

0.8.9

2 years ago

0.8.8

2 years ago

0.8.10

2 years ago

0.8.7

2 years ago

0.8.6

2 years ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.7.0-SNAPSHOT.6

5 years ago

0.7.0-SNAPSHOT.5

5 years ago

0.7.0-SNAPSHOT.4

6 years ago

0.7.0-SNAPSHOT.3

6 years ago

0.7.0-SNAPSHOT.2

6 years ago

0.6.3-SNAPSHOT.2

6 years ago

0.7.0-SNAPSHOT.1

6 years ago

0.6.2

6 years ago

0.6.2-SNAPSHOT.1

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.3.0-RC.1

7 years ago