4.1.1 • Published 8 months ago
picosanity v4.1.1
picosanity
Tiny Sanity client alternative, if you only need to do queries and only need to support modern browsers.
Targets
- Node.js >= 10
- Modern browsers (Edge >= 14, Chrome, Safari, Firefox etc)
Installation
npm install --save picosanity
Usage
import PicoSanity from 'picosanity'
const client = new PicoSanity({
projectId: 'myProjectId',
dataset: 'myDataset',
apiVersion: '2021-03-25', // use a UTC date string
useCdn: true,
})
client
.fetch('*[_type == $someType]', {someType: 'article'})
.then((articles) => console.log(articles))
.catch((err) => console.error('Oh noes: %s', err.message))
UMD bundle
You can load this module as a UMD-bundle from unpkg - https://unpkg.com/picosanity
If used in a global browser context, it will be available as window.PicoSanity
License
MIT © Espen Hovlandsdal
4.1.1
8 months ago
4.1.0
9 months ago
3.0.3
2 years ago
4.0.0
2 years ago
3.0.2
2 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.3.0
3 years ago
2.2.0
3 years ago
2.1.1-canary.0
4 years ago
2.1.2
4 years ago
2.1.1
4 years ago
2.0.3
4 years ago
2.1.0
4 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago