New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cegal/ds-utils

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cegal/ds-utils

Cegal UI utilities

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

UI utils

UI utilities we can use for our projects

fetch

This is a fetch utility that can mock results, simulate different HTTP statues, and dispatches actions for request/success/failure events

How to use

import { fetch } from '@cegal/ds-utils'

and in your code, add this as an action:

const fetchSomething = (params) => {
  return fetch.call({
    url: YOUR_API_URL_HERE,
    expectedPayload: {
      'add here': 'your expected mocked response'
    },
    type: {
    request: 'YOUR_ACTION_FOR_REQUEST',
    success: 'YOUR_ACTION_FOR_SUCCESS',
    failure: 'YOUR_ACTION_FOR_FAILURE'
    }
  })
}

Note that this will return a Promise, so please use it in a Redux project with thunk middleware.

Change logs

Visit design.cegal.com/change-log

How to use it

install from npm.

npm install --save @cegal/ds-utils

See design.cegal.com on how to use the React components

License

Go to Licence

FAQs

Package last updated on 24 Apr 2024

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