ravendb
Version:
RavenDB client for Node.js
32 lines • 841 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.camelCaseReviver = camelCaseReviver;
exports.pascalCaseReviver = pascalCaseReviver;
function camelCaseReviver(key, value) {
if (key && !Array.isArray(this)) {
const newKey = key.charAt(0).toLowerCase() + key.slice(1);
if (key !== newKey) {
this[newKey] = value;
}
else {
return value;
}
}
else {
return value;
}
}
function pascalCaseReviver(key, value) {
if (key && !Array.isArray(this)) {
const newKey = key.charAt(0).toUpperCase() + key.slice(1);
if (key !== newKey) {
this[newKey] = value;
return;
}
else {
return value;
}
}
return value;
}
//# sourceMappingURL=Revivers.js.map