
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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
The npm package @alice-health/ky-hooks-change-case receives a total of 275 weekly downloads. As such, @alice-health/ky-hooks-change-case popularity was classified as not popular.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.