0.8.13 • Published 22 days ago
@node-wot/td-tools v0.8.13
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.
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
0.8.13
22 days ago
0.8.12
3 months ago
0.8.11
4 months ago
0.8.9
7 months ago
0.8.8
8 months ago
0.8.10
6 months ago
0.8.7
11 months ago
0.8.6
12 months ago
0.8.5
1 year ago
0.8.4
1 year ago
0.8.3
1 year ago
0.8.2
2 years ago
0.8.1
2 years ago
0.8.0
2 years ago
0.7.8
3 years ago
0.7.7
3 years ago
0.7.6
3 years ago
0.7.5
3 years ago
0.7.4
3 years ago
0.7.3
4 years ago
0.7.2
4 years ago
0.7.1
4 years ago
0.7.0
4 years ago
0.7.0-SNAPSHOT.6
4 years ago
0.7.0-SNAPSHOT.5
4 years ago
0.7.0-SNAPSHOT.4
4 years ago
0.7.0-SNAPSHOT.3
4 years ago
0.7.0-SNAPSHOT.2
4 years ago
0.6.3-SNAPSHOT.2
5 years ago
0.7.0-SNAPSHOT.1
5 years ago
0.6.2
5 years ago
0.6.2-SNAPSHOT.1
5 years ago
0.6.1
5 years ago
0.6.0
5 years ago
0.5.1
5 years ago
0.5.0
6 years ago
0.4.0
6 years ago
0.3.0
6 years ago
0.3.0-RC.1
6 years ago