File: underscore.js

package info (click to toggle)
node-csv-parse 6.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,532 kB
  • sloc: javascript: 27,592; makefile: 4
file content (7 lines) | stat: -rw-r--r-- 162 bytes parent folder | download
1
2
3
4
5
6
7
const underscore = function (str) {
  return str.replace(/([A-Z])/g, function (_, match) {
    return "_" + match.toLowerCase();
  });
};

export { underscore };