just-snake-case

convert a string to snake case

MIT 12 个版本
安装
npm install just-snake-case
yarn add just-snake-case
pnpm add just-snake-case
bun add just-snake-case
README

just-snake-case

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-snake-case
yarn add just-snake-case

Convert a string to snake case

  import snakeCase from 'just-snake-case';

  snakeCase('the quick brown fox'); // 'the_quick_brown_fox'
  snakeCase('the-quick-brown-fox'); // 'the_quick_brown_fox'
  snakeCase('the_quick_brown_fox'); // 'the_quick_brown_fox'
  snakeCase('theQuickBrownFox'); // 'the_quick_brown_fox'
  snakeCase('thequickbrownfox'); // 'thequickbrownfox'
  snakeCase('the - quick * brown# fox'); // 'the_quick_brown_fox'
  snakeCase('theQUICKBrownFox'); // 'the_q_u_i_c_k_brown_fox'
版本列表
3.2.0 2022-12-17
3.1.1 2022-08-08
3.1.0 2022-08-07
3.0.1 2021-11-13
3.0.0 2021-11-09
2.1.1 2021-11-01
2.1.0 2021-10-31
2.0.0 2021-10-22
1.2.1 2021-04-04
1.2.0 2021-04-04
1.1.0 2018-08-09
1.0.0 2017-01-02