403Webshell
Server IP : 159.203.156.69  /  Your IP : 216.73.216.37
Web Server : nginx/1.24.0
System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/tanviranik.com/node_modules/camelize/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/tanviranik.com/node_modules/camelize/index.js
'use strict';

module.exports = function (obj) {
	if (typeof obj === 'string') { return camelCase(obj); }
	return walk(obj);
};

function walk(obj) {
	if (!obj || typeof obj !== 'object') { return obj; }
	if (isDate(obj) || isRegex(obj)) { return obj; }
	if (isArray(obj)) { return map(obj, walk); }
	return reduce(objectKeys(obj), function (acc, key) {
		var camel = camelCase(key);
		acc[camel] = walk(obj[key]);
		return acc;
	}, {});
}

function camelCase(str) {
	return str.replace(/[_.-](\w|$)/g, function (_, x) {
		return x.toUpperCase();
	});
}

var isArray = Array.isArray || function (obj) {
	return Object.prototype.toString.call(obj) === '[object Array]';
};

var isDate = function (obj) {
	return Object.prototype.toString.call(obj) === '[object Date]';
};

var isRegex = function (obj) {
	return Object.prototype.toString.call(obj) === '[object RegExp]';
};

var has = Object.prototype.hasOwnProperty;
var objectKeys = Object.keys || function (obj) {
	var keys = [];
	for (var key in obj) {
		if (has.call(obj, key)) { keys.push(key); }
	}
	return keys;
};

function map(xs, f) {
	if (xs.map) { return xs.map(f); }
	var res = [];
	for (var i = 0; i < xs.length; i++) {
		res.push(f(xs[i], i));
	}
	return res;
}

function reduce(xs, f, acc) {
	if (xs.reduce) { return xs.reduce(f, acc); }
	for (var i = 0; i < xs.length; i++) {
		acc = f(acc, xs[i], i);
	}
	return acc;
}

Youez - 2016 - github.com/yon3zu
LinuXploit