Skip to content

Instantly share code, notes, and snippets.

@w10t
Created February 20, 2019 10:00
Show Gist options
  • Select an option

  • Save w10t/2029ad7afde1f6cdcb11e6310edf85e9 to your computer and use it in GitHub Desktop.

Select an option

Save w10t/2029ad7afde1f6cdcb11e6310edf85e9 to your computer and use it in GitHub Desktop.

Revisions

  1. w10t created this gist Feb 20, 2019.
    4 changes: 4 additions & 0 deletions script.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    function decamelize(string) {
    return humps.decamelizeKeys(string, {
    process: string2 => string2.split(/(?=[A-Z])/).join('_').toLowerCase().replace(/(\d+)/g, '_$1') });
    }