You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lodash often get reported as vulnerable for some of its functions, even if this package doesn't internally use the reported function. This vulnerability "propagation" feeds us up. 😫
Then, I think this package has better have alternative and seperated dependencies (for each functions like camelcase, kebabCas, chunk).
Survey: Case-Conversion Libraries Compatible with lodash
Survey date: 2026-05-22
A survey of libraries that claim compatibility with lodash’s -Case helpers (camelCase, snakeCase, etc.) and packages focused on case conversion. From a supply chain security perspective, narrow-scope options (fewer dependencies, smaller attack surface) are preferred.
Recommended import: import camelCase from 'lodash/camelCase' or named imports from lodash-es
Supply chain: Same implementation as core lodash. Per-method packages are effectively unmaintained (last published 8–10 years ago), so for new projects, lodash / lodash-es + path imports are more practical.
2. Case-conversion focused, with “lodash-aligned” claims or mentions
Dependencies: 0 dependencies (the just project policy)
lodash compatibility: README does not say “lodash compatible”, but in Issue #111 the maintainer states that from v4.0.2 onward behavior is very close to lodash and passes the reporter’s tests
Compatibility: “very similar” — not a guarantee of bit-for-bit identity
Supply chain: Single-purpose, zero-dependency, proven just family fits requirements well. Multiple -Case helpers mean more packages, but each tarball stays small.
Examples: camelCase, snakeCase, kebabCase, startCase, lowerCase, upperCase, capitalize, etc.
PR #517 and CHANGELOG entries document fixes to match lodash behavior
Separately, es-toolkit/string offers a “modern, faster” API whose behavior can differ from compat
Supply chain: Strong lodash alignment, but the compat layer is a wide lodash substitute, so the attack surface is larger than “string case only” unless you import only what you need.
4. Not lodash-compatible / does not claim to be
Library
Notes
change-case
Intentionally differs from lodash for reversibility (Issue #351)
case-anything
Lightweight, many cases; no lodash compatibility claim
scule (UnJS)
Case conversion focused; no explicit lodash compatibility
Around numbers, change-case inserts _ by default (mergeAmbiguousCharacters: false).
Input
lodash expected
change-case actual
too legit 2 quit
tooLegit2Quit
tooLegit_2Quit
walk 500 miles
walk500Miles
walk_500Miles
enable 6h format
enable6HFormat
enable_6hFormat
Reason: Round-trip conversion (e.g. xhr2Request → xhr2 request). Setting mergeAmbiguousCharacters: true moves some cases closer to lodash.
Comparison table
Option
lodash compatible
Narrow scope
Supply chain
lodash/camelCase, etc. (lodash-es)
◎ Same implementation
△ Large repo; import one function
◎ Most audited; tree-shake required
lodash.camelcase, etc.
◎
◎ One function/pkg
△ Discouraged, stale updates, duplication if many
just-*-case
○ Mostly (tests cited)
◎ One function/pkg, 0 deps
◎ Small, split packages
tiny-case
△ “most”
◎ Multiple cases in one pkg, 0 deps
△ Low visibility, infrequent updates
camelcase
△ camelCase only
◎
◎ sindresorhus ecosystem
es-toolkit/compat
◎ Documented Lodash compatibility
✗ Broad compat layer
△ Mitigate by importing only needed APIs
change-case
✗ Intentionally incompatible
○ Case conversion focused
○ Popular, actively maintained
Practical recommendations
lodash compatibility is the top priority
Use lodash-es:
import{camelCase,snakeCase}from'lodash-es';
Or:
importcamelCasefrom'lodash/camelCase';
Avoid adopting per-method lodash.camelcase packages for new work.
Minimize dependency count (supply chain focus)
Use just just-camel-case / just-snake-case, etc. (0 deps, single responsibility). Multiple case helpers mean more packages, but each tarball stays small.
Bundle multiple case helpers in one package
tiny-case is a candidate, but it is safer if you pin lodash’s official test vectors in your own CI (because it only “mimics most” behavior).
Case-only libraries that say “lodash compatible” in the README
Within this survey, almost none exist. Options are mainly lodash per-method extractions, lodash-aligned reimplementations, or es-toolkit/compat.
Supply chain operations notes
Do not rely on a single README sentence — pin lodash’s test cases in your project for evidence of compatibility
Lock pnpm-lock.yaml, run npm audit; zero-dependency single-purpose packages (just family) often reduce attack surface versus one large utility library
Packages like tiny-case with few stars and infrequent updates carry maintenance risk even when dependency count is zero
es-toolkit is a utility library similar to lodash that is designed to replace lodash by offering a seamless compat layer. It supports tree shaking out of the box and offers better performances for modern JavaScript runtimes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lodashoften get reported as vulnerable for some of its functions, even if this package doesn't internally use the reported function. This vulnerability "propagation" feeds us up. 😫Then, I think this package has better have alternative and seperated dependencies (for each functions like camelcase, kebabCas, chunk).
(2026-05-25: I'm inspired by "e18e" movement. https://e18e.dev/learn/cleanup.html)
I found
justfamily seems to be nice in terms of compatibility(not 100% though), maintenance activeness, and good seperation.https://github.com/angus-c/just
preliminary investigation by AI Agent
Survey: Case-Conversion Libraries Compatible with lodash
Survey date: 2026-05-22
A survey of libraries that claim compatibility with lodash’s
-Casehelpers (camelCase,snakeCase, etc.) and packages focused on case conversion. From a supply chain security perspective, narrow-scope options (fewer dependencies, smaller attack surface) are preferred.Related: change-case Issue #351 (change-case is intentionally incompatible with lodash)
Summary
-Casehelpers” in their README.lodash.camelcase, etc., orimportfromlodash/camelCase)_separators at ambiguous boundaries)1. Full compatibility (the lodash implementation itself)
lodash.*case(per-method packages)Packages that export only case-conversion methods, discoverable via the
lodash-modularizedkeyword on npm.lodash.camelcase_.camelCaselodash.snakecase_.snakeCaselodash.kebabcase_.kebabCaselodash.startcase_.startCasenode_modules)import camelCase from 'lodash/camelCase'or named imports fromlodash-esSupply chain: Same implementation as core lodash. Per-method packages are effectively unmaintained (last published 8–10 years ago), so for new projects,
lodash/lodash-es+ path imports are more practical.2. Case-conversion focused, with “lodash-aligned” claims or mentions
tiny-case
camelCase,snakeCase,kebabCase,pascalCase,titleCase,sentenceCase,words,upperFirstin one packagepackage.jsonNarrow scope is good for supply chain, but it is closer to “a small implementation modeled on lodash” than “advertised lodash compatibility”.
camelcase (sindresorhus)
camelCaseonly (related:decamelize,camelcase-keys)capitalizeAfterNumber: true(default), docs state it aligns with many utilities such as Lodash-Casesuite; no drop-in guaranteeSupply chain: Good as a single-purpose, popular, low-dependency package, but not suitable when you need the full set of
-Casehelpers.just-camel-case / just-snake-case, etc. (angus-c/just)
just-camel-case,just-snake-case, etc.Supply chain: Single-purpose, zero-dependency, proven just family fits requirements well. Multiple
-Casehelpers mean more packages, but each tarball stays small.3. Explicit lodash compatibility, but broad scope
es-toolkit
es-toolkit/compatcamelCase,snakeCase,kebabCase,startCase,lowerCase,upperCase,capitalize, etc.es-toolkit/stringoffers a “modern, faster” API whose behavior can differ from compatSupply chain: Strong lodash alignment, but the compat layer is a wide lodash substitute, so the attack surface is larger than “string case only” unless you import only what you need.
4. Not lodash-compatible / does not claim to be
change-case vs lodash (from Issue #351)
Around numbers, change-case inserts
_by default (mergeAmbiguousCharacters: false).too legit 2 quittooLegit2QuittooLegit_2Quitwalk 500 mileswalk500Mileswalk_500Milesenable 6h formatenable6HFormatenable_6hFormatReason: Round-trip conversion (e.g.
xhr2Request→xhr2 request). SettingmergeAmbiguousCharacters: truemoves some cases closer to lodash.Comparison table
lodash/camelCase, etc. (lodash-es)lodash.camelcase, etc.Practical recommendations
lodash compatibility is the top priority
Use
lodash-es:Or:
Avoid adopting per-method
lodash.camelcasepackages for new work.Minimize dependency count (supply chain focus)
Use just
just-camel-case/just-snake-case, etc. (0 deps, single responsibility). Multiple case helpers mean more packages, but each tarball stays small.Bundle multiple case helpers in one package
tiny-case is a candidate, but it is safer if you pin lodash’s official test vectors in your own CI (because it only “mimics most” behavior).
Case-only libraries that say “lodash compatible” in the README
Within this survey, almost none exist. Options are mainly lodash per-method extractions, lodash-aligned reimplementations, or es-toolkit/compat.
Supply chain operations notes
pnpm-lock.yaml, runnpm audit; zero-dependency single-purpose packages (just family) often reduce attack surface versus one large utility libraryReferences
camelCasefunction appears incorrect