mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
26
backend/apis/nodejs/node_modules/knex/lib/util/security.js
generated
vendored
Normal file
26
backend/apis/nodejs/node_modules/knex/lib/util/security.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Sets a hidden (non-enumerable) property on the `target` object, copying it
|
||||
* from `source`.
|
||||
*
|
||||
* This is useful when we want to protect certain data from being accidentally
|
||||
* leaked through logs, also when the property is non-enumerable on the `source`
|
||||
* object and we want to ensure that it is properly copied.
|
||||
*
|
||||
* @param {object} target
|
||||
* @param {object} source - default: target
|
||||
* @param {string} propertyName - default: 'password'
|
||||
*/
|
||||
function setHiddenProperty(target, source, propertyName = 'password') {
|
||||
if (!source) {
|
||||
source = target;
|
||||
}
|
||||
|
||||
Object.defineProperty(target, propertyName, {
|
||||
enumerable: false,
|
||||
value: source[propertyName],
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
setHiddenProperty,
|
||||
};
|
Reference in New Issue
Block a user