Socket
Socket
Sign inDemoInstall

picosanity

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

picosanity

Tiny Sanity client alternative should you only need to do queries


Version published
Weekly downloads
1.6K
decreased by-7.88%
Maintainers
1
Weekly downloads
 
Created
Source

picosanity

npm versionBuild Statusnpm bundle size

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',
  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

Keywords

FAQs

Package last updated on 21 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc