This repository was archived by the owner on Aug 28, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork3
Opinionated HTTP snippets 🌐
License
NotificationsYou must be signed in to change notification settings
scalar/snippetz
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Warning
We moved@scalar/snippetz tohttps://github.com/scalar/scalar
A modern way to generate code examples for different languages.
npm install @scalar/snippetz
import{snippetz}from'@scalar/snippetz'constsnippet=snippetz().print('node','undici',{url:'https://example.com',})/* Output */// import { request } from 'undici'//// const { statusCode, body } = await request(// 'https://example.com',// )
import{snippetz}from'@scalar/snippetz'constsnippet=snippetz().plugins()/* Output */// [// {// target: 'node',// client: 'undici',// }// ]
import{snippetz}from'@scalar/snippetz'constsnippet=snippetz().hasPlugin('node','undici')/* Output */// true
You can also just use one specific plugin to keep your bundle size small.
import{undici}from'@scalar/snippetz/plugins/node/undici'constsource=undici({url:'https://example.com',})console.log(source.code)// import { request } from 'undici'// const { statusCode, body } = await request(// 'url': 'https://example.com',// )
We are API nerds. You too? Let’s chat on Discord:https://discord.gg/scalar
Contributions are welcome! ReadCONTRIBUTING.
hanspagel | marclave |
The source code in this repository is licensed underMIT.
About
Opinionated HTTP snippets 🌐
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Contributors4
Uh oh!
There was an error while loading.Please reload this page.