2.12.0
What's Changed
- Use cross platform service by @kbarbounakis in #14
@themost/[email protected]
implements a cross environment data service for using @themost/client
across different environments like node.js or browser.
import { BasicDataContext } from '@themost/client/common';
const context = new BasicDataContext("http://localhost:8080/api/", {
useResponseConversion: true
});
const items = await context
.model("Products")
.asQueryable()
.select(({ id, name, category, model, price }) => ({
id,
name,
category,
model,
price,
}))
.where((x: { price: number, category: string }) => {
return x.price > 500 && x.category === "Laptops";
})
.orderByDescending((x: { price: number, category: string }) => x.price)
.take(10).getItems();
Full Changelog: 2.11.0...2.12.0