Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yup-endpoints-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yup-endpoints-client

A set of utilities for sending and receiving data from a yup endpoints server.

  • 0.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

yup-endpoints-client

A set of utilities for sending and receiving data from a yup endpoints server.

Installation

npm install yup yup-endpoints-client

Or, if you prefer using Yarn:

yarn add yup yup-endpoints-client

Usage

Here's a quick example to get you started:

// Add your server url to the client
const client = new YupFetcherClient("http://your-domain.com")

// Define the endpoint
const createUserEndpoint = createYupEndpoint({
  path: "/create-user",
  in: yup.object({
    name: yup.string().required(),
    age: yup.number().required(),
  }),
})

// Create the endpoint fetcher function
const createUserFetcher = client.createYupEndpointFetcher(createUserEndpoint)

// Provide a TypeScript object
createUserFetcher({
  name: "John Smith",
  age: 45
})

// Or use FormData as the input
const formData = new FormData()
formData.set("name", "John Smith")
formData.set("age", "45")
createUserFetcher(formData)

Contributing

Contributions are always welcome!

License

This project is licensed under the MIT License.

Support

If you have any questions or issues, feel free to open an issue on the GitHub repository.

Acknowledgements

Special thanks to the contributors of this project and the Yup library for making input validation simpler and more efficient.

FAQs

Package last updated on 14 Nov 2023

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