Modify a [[Thing]], setting multiple properties in a single expresssion.
For example, you can initialise several properties of a given Thing as follows:
const me = buildThing(createThing({ name: "profile-vincent" }))
.addUrl(rdf.type, schema.Person)
.addStringNoLocale(schema.givenName, "Vincent")
.build();
Take note of the final call to .build()
to obtain the actual Thing.
A Thing to modify.
a [[ThingBuilder]], a Fluent API that allows you to set multiple properties in a single expression.
Modify a [[Thing]], setting multiple properties in a single expresssion.
For example, you can initialise several properties of a given Thing as follows:
const me = buildThing(createThing({ url: "https://example.pod/profile#vincent" }))
.addUrl(rdf.type, schema.Person)
.addStringNoLocale(schema.givenName, "Vincent")
.build();
Take note of the final call to .build()
to obtain the actual Thing.
A Thing to modify.
a [[ThingBuilder]], a Fluent API that allows you to set multiple properties in a single expression.
Create a [[Thing]], setting multiple properties in a single expresssion.
For example, you can create a new Thing and initialise several properties as follows:
const me = buildThing({ name: "profile-vincent" })
.addUrl(rdf.type, schema.Person)
.addStringNoLocale(schema.givenName, "Vincent")
.build();
Take note of the final call to .build()
to obtain the actual Thing.
Options used to initialise a new Thing.
a [[ThingBuilder]], a Fluent API that allows you to set multiple properties in a single expression.
Create a [[Thing]], setting multiple properties in a single expresssion.
For example, you can create a new Thing and initialise several properties as follows:
const me = buildThing({ url: "https://example.pod/profile#vincent" })
.addUrl(rdf.type, schema.Person)
.addStringNoLocale(schema.givenName, "Vincent")
.build();
Take note of the final call to .build()
to obtain the actual Thing.
Optionally pass an existing [[Thing]] to modify the properties of. If left empty, buildThing
will initialise a new Thing.
a [[ThingBuilder]], a Fluent API that allows you to set multiple properties in a single expression.
Create a [[Thing]], setting multiple properties in a single expresssion.
For example, you can create a new Thing and initialise several properties as follows:
const me = buildThing()
.addUrl(rdf.type, schema.Person)
.addStringNoLocale(schema.givenName, "Vincent")
.build();
Take note of the final call to .build()
to obtain the actual Thing.
a [[ThingBuilder]], a Fluent API that allows you to set multiple properties in a single expression.
Create or modify a [[Thing]], setting multiple properties in a single expresssion.
For example, you can create a new Thing and initialise several properties as follows:
Take note of the final call to
.build()
to obtain the actual Thing.Param: init
Optionally pass an existing [[Thing]] to modify the properties of. If left empty,
buildThing
will initialise a new Thing.Returns
a [[ThingBuilder]], a Fluent API that allows you to set multiple properties in a single expression.
Since
1.9.0