Gathering detailed insights and metrics for @bitchcraft/ocake
Gathering detailed insights and metrics for @bitchcraft/ocake
Gathering detailed insights and metrics for @bitchcraft/ocake
Gathering detailed insights and metrics for @bitchcraft/ocake
A fancy wrapper for debug with and chaining support for full Console Web API.
npm install @bitchcraft/ocake
Typescript
Module System
TypeScript (59.69%)
JavaScript (39.71%)
Shell (0.6%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
4 Stars
262 Commits
1 Forks
3 Watchers
45 Branches
5 Contributors
Updated on Jul 12, 2025
Latest Version
1.0.2
Package Id
@bitchcraft/ocake@1.0.2
Unpacked Size
300.57 kB
Size
88.20 kB
File Count
46
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
23
,.·——–——·.¸
,° ≡OCAKE≡ °,
| ,––––––––––.\
\¸| (OMNOMNOM)'/
``----------´
Convert the case of keys in an object (e. g. to camelCase), or simply convert the case of a string to another case.
1{ camelCased: 'some value' } => { snake_cased: 'some value' }
1$ yarn add @bitchcraft/ocake 2$ npm install -P @bitchcraft/ocake
1convertKeys(haystack: Object, replacer: (key: string) => string): Object
Creates an identical object where the keys have been converted to the desired case.
(key: string) => string
. You can use one of the supplied StringConverters.1import { convertKeys, StringConverters } from '@bitchcraft/ocake'; 2 3const payload = convertKeys({ 4 userName: 'Sam Axe', 5 userId: 5462, 6 clientId: 17, 7}, StringConverters.toKebabCase); 8 9const requestBody = JSON.stringify(payload);
1var convertKeys = require('@bitchcraft/ocake').convertKeys; 2var toKebabCase = require('@bitchcraft/ocake').StringConverters.toKebabCase; 3 4var payload = convertKeys({ 5 userName: 'Sam Axe', 6 userId: 5462, 7 clientId: 17 8}, StringConverters.toKebabCase); 9 10const requestBody = JSON.stringify(payload);
Convert the case in a string to another case, e. g.
1'sentence case' => 'sentenceCase'
All string converters provided by OCake currently use no-case, which converts using a common intermediary. There are no source-target-pair specific replacers. Meaning that every conversion in fact first converts to sentence case before converting to the target case, e. g. when converting to snake case: 'unknownCase' -> 'unknown case' -> 'unknown_case'
. This has to be kept in mind when designing your app for roundtrip conversion. In that case you either have to be aware of the limitations or provide your own source-target specific replacers.
Known limitations are:
'someTALLMANCASEkey' -> 'some tallmancase ekey' -> 'someTallmancaseEkey' -> 'some tallmancase ekey' -> 'someTALLMANCASekey' -> …
)'XMLHttpRequest' -> 'xml http request' -> 'XmlHttpRequest'
)'snake_case_1' -> 'snakeCase1' -> 'snake_case1'
)List of provided StringReplacers
Replacer | Description |
---|---|
toCamelCase() | alias for toLowerCamelCase |
toLowerCamelCase() | e. g. 'theCakeIsFake' |
toUpperCamelCase() | e. g. 'TheCakeIsFake' |
toKebabCase() | e. g. 'the-cake-is-fake' |
toAngryKebabCase() | e. g. 'THE-CAKE-IS-FAKE' |
toSnakeCase() | e. g. 'the_cake_is_fake' |
toAngrySnakeCase() | e. g. 'THE_CAKE_IS_FAKE' |
toSentenceCase() | e. g. the cake is fake |
toTitleCase() | e. g. 'The Cake Is Fake' |
toShoutCase() | e. g. 'THE CAKE IS FAKE' |
toTallManCase() | e. g. 'theCAKEisFAKE' |
1// babel: env, stage-0, flow 2import { convertKeys, StringConverters } from '@bitchcraft/ocake/src/Ocake'; 3import convertKeys from '@bitchcraft/ocake/src/convertKeys'; 4import StringConverters, { toCamelCase, … } from '@bitchcraft/ocake/src/StringConverters';
Gzipped size (non-minified) is around 19KB, with 47% of that taken up by core-js. You can check out the bundle analytics for the non-minified bundle.
Please file issues in Github
We are open for PRs. Please respect to the linting rules.
Keyconst is free software und the BSD-3-Clause (see LICENSE.md).
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 1/9 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
20 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More