/
var
/
www
/
qr4y.kz
/
server
/
delivery
/
node_modules
/
proto3-json-serializer
/
build
/
src
/
/var/www/qr4y.kz/server/delivery/node_modules/proto3-json-serializer/build/src
mkdir
upload
Name
Size
Mode
Actions
any.d.ts
481
0644
edit
dl
rm
any.js
3945
0644
edit
dl
rm
any.js.map
2421
0644
edit
dl
rm
bytes.d.ts
175
0644
edit
dl
rm
bytes.js
1148
0644
edit
dl
rm
bytes.js.map
653
0644
edit
dl
rm
duration.d.ts
373
0644
edit
dl
rm
duration.js
2195
0644
edit
dl
rm
duration.js.map
1513
0644
edit
dl
rm
enum.d.ts
191
0644
edit
dl
rm
enum.js
1535
0644
edit
dl
rm
enum.js.map
691
0644
edit
dl
rm
fieldmask.d.ts
299
0644
edit
dl
rm
fieldmask.js
1168
0644
edit
dl
rm
fieldmask.js.map
510
0644
edit
dl
rm
fromproto3json.d.ts
345
0644
edit
dl
rm
fromproto3json.js
7612
0644
edit
dl
rm
fromproto3json.js.map
4803
0644
edit
dl
rm
index.d.ts
147
0644
edit
dl
rm
index.js
1115
0644
edit
dl
rm
index.js.map
347
0644
edit
dl
rm
timestamp.d.ts
377
0644
edit
dl
rm
timestamp.js
2692
0644
edit
dl
rm
timestamp.js.map
1650
0644
edit
dl
rm
toproto3json.d.ts
149
0644
edit
dl
rm
toproto3json.js
5238
0644
edit
dl
rm
toproto3json.js.map
3470
0644
edit
dl
rm
types.d.ts
423
0644
edit
dl
rm
types.js
697
0644
edit
dl
rm
types.js.map
275
0644
edit
dl
rm
util.d.ts
240
0644
edit
dl
rm
util.js
1645
0644
edit
dl
rm
util.js.map
827
0644
edit
dl
rm
value.d.ts
975
0644
edit
dl
rm
value.js
4254
0644
edit
dl
rm
value.js.map
2938
0644
edit
dl
rm
wrappers.d.ts
612
0644
edit
dl
rm
wrappers.js
2192
0644
edit
dl
rm
wrappers.js.map
1395
0644
edit
dl
rm
Edit:
/var/www/qr4y.kz/server/delivery/node_modules/proto3-json-serializer/build/src/value.js
(4254B)
"use strict"; // Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. Object.defineProperty(exports, "__esModule", { value: true }); exports.googleProtobufValueFromProto3JSON = exports.googleProtobufListValueFromProto3JSON = exports.googleProtobufStructFromProto3JSON = exports.googleProtobufValueToProto3JSON = exports.googleProtobufListValueToProto3JSON = exports.googleProtobufStructToProto3JSON = void 0; const util_1 = require("./util"); function googleProtobufStructToProto3JSON(obj) { const result = {}; const fields = obj.fields; for (const [key, value] of Object.entries(fields)) { result[key] = googleProtobufValueToProto3JSON(value); } return result; } exports.googleProtobufStructToProto3JSON = googleProtobufStructToProto3JSON; function googleProtobufListValueToProto3JSON(obj) { (0, util_1.assert)(Array.isArray(obj.values), 'ListValue internal representation must contain array of values'); return obj.values.map(googleProtobufValueToProto3JSON); } exports.googleProtobufListValueToProto3JSON = googleProtobufListValueToProto3JSON; function googleProtobufValueToProto3JSON(obj) { if (Object.prototype.hasOwnProperty.call(obj, 'nullValue')) { return null; } if (Object.prototype.hasOwnProperty.call(obj, 'numberValue') && typeof obj.numberValue === 'number') { if (!Number.isFinite(obj.numberValue)) { return obj.numberValue.toString(); } return obj.numberValue; } if (Object.prototype.hasOwnProperty.call(obj, 'stringValue') && typeof obj.stringValue === 'string') { return obj.stringValue; } if (Object.prototype.hasOwnProperty.call(obj, 'boolValue') && typeof obj.boolValue === 'boolean') { return obj.boolValue; } if (Object.prototype.hasOwnProperty.call(obj, 'structValue') && typeof obj.structValue === 'object') { return googleProtobufStructToProto3JSON(obj.structValue); } if (Object.prototype.hasOwnProperty.call(obj, 'listValue') && typeof obj === 'object' && typeof obj.listValue === 'object') { return googleProtobufListValueToProto3JSON(obj.listValue); } // Assuming empty Value to be null return null; } exports.googleProtobufValueToProto3JSON = googleProtobufValueToProto3JSON; function googleProtobufStructFromProto3JSON(json) { const fields = {}; for (const [key, value] of Object.entries(json)) { fields[key] = googleProtobufValueFromProto3JSON(value); } return { fields }; } exports.googleProtobufStructFromProto3JSON = googleProtobufStructFromProto3JSON; function googleProtobufListValueFromProto3JSON(json) { return { values: json.map(element => googleProtobufValueFromProto3JSON(element)), }; } exports.googleProtobufListValueFromProto3JSON = googleProtobufListValueFromProto3JSON; function googleProtobufValueFromProto3JSON(json) { if (json === null) { return { nullValue: 'NULL_VALUE' }; } if (typeof json === 'number') { return { numberValue: json }; } if (typeof json === 'string') { return { stringValue: json }; } if (typeof json === 'boolean') { return { boolValue: json }; } if (Array.isArray(json)) { return { listValue: googleProtobufListValueFromProto3JSON(json), }; } if (typeof json === 'object') { return { structValue: googleProtobufStructFromProto3JSON(json), }; } throw new Error(`googleProtobufValueFromProto3JSON: incorrect parameter type: ${typeof json}`); } exports.googleProtobufValueFromProto3JSON = googleProtobufValueFromProto3JSON; //# sourceMappingURL=value.js.map
Save
cmd:
run