
Product
Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies
A safer, faster way to eliminate vulnerabilities without updating dependencies
@alice-health/ky-hooks-change-case
Advanced tools
Allow modifications cases on requests and responses of the objects during the ky request
Allow modifications cases on requests and responses of the objects during the ky request
$ npm install @alice-health/ky-hooks-change-case
import ky from "ky";
import {
requestToSnakeCase,
responseToCamelCase,
} from "@alice-health/ky-hooks-change-case";
ky.post(`${server.url}/path`, {
json: { fooBar: true },
hooks: {
beforeRequest: [requestToSnakeCase],
afterResponse: [responseToCamelCase],
},
});
In the example above, the requestToSnakeCase method will convert the resquest body from {fooBar: true} to {foo_bar: true} and the response from {response_body: false} to {responseBody: false}. This way, the frontend and the backend API can each define their independent style guide.
Convert the request body keys objects to snake_case.
Convert the request body keys objects to camelCase.
Convert the request body keys objects to kebab-case.
Convert the response body keys objects to snake_case.
Convert the response body keys objects to camelCase.
Convert the response body keys objects to kebab-case.
The latest version of Chrome, Firefox, and Safari.
ky 🌳 Tiny & elegant HTTP client based on window.fetch
FAQs
Allow modifications cases on requests and responses of the objects during the ky request
We found that @alice-health/ky-hooks-change-case demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

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.

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.