PHP 8.2.30
Preview: index.js Size: 323 B
//usr/lib/node_modules/npm/node_modules/decamelize/index.js

'use strict';
module.exports = function (str, sep) {
	if (typeof str !== 'string') {
		throw new TypeError('Expected a string');
	}

	sep = typeof sep === 'undefined' ? '_' : sep;

	return str
		.replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
		.replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
		.toLowerCase();
};

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
323 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.09 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.65 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
781 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).