@tensorflow/tfjs-converter
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -12,2 +12,3 @@ import { tensorflow_json } from '../data/compiled_api_json'; | ||
private mapNode(node); | ||
private decodeBase64(text); | ||
private getStringParam(attrs, name, def, keepCase?); | ||
@@ -14,0 +15,0 @@ private getBoolParam(attrs, name, def); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var js_base64_1 = require("js-base64"); | ||
var compiled_api_json_1 = require("../data/compiled_api_json"); | ||
@@ -169,2 +168,14 @@ var utils_1 = require("./executors/utils"); | ||
}; | ||
OperationMapper.prototype.decodeBase64 = function (text) { | ||
if (typeof atob !== 'undefined') { | ||
return atob(text); | ||
} | ||
else if (typeof Buffer !== 'undefined') { | ||
return new Buffer(text, 'base64').toString(); | ||
} | ||
else { | ||
throw new Error('Unable to decode base64 in this environment. ' + | ||
'Missing built-in atob() or Buffer()'); | ||
} | ||
}; | ||
OperationMapper.prototype.getStringParam = function (attrs, name, def, keepCase) { | ||
@@ -176,3 +187,3 @@ if (keepCase === void 0) { keepCase = false; } | ||
String.fromCharCode.apply(null, param.s) : | ||
js_base64_1.Base64.decode(param.s); | ||
this.decodeBase64(param.s); | ||
return keepCase ? value : value.toLowerCase(); | ||
@@ -179,0 +190,0 @@ } |
@@ -1,2 +0,2 @@ | ||
declare const version = "0.8.2"; | ||
declare const version = "0.8.3"; | ||
export { version }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var version = '0.8.2'; | ||
var version = '0.8.3'; | ||
exports.version = version; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@tensorflow/tfjs-converter", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"description": "Tensorflow model converter for javascript", | ||
@@ -22,3 +22,2 @@ "main": "dist/src/index.js", | ||
"@types/jasmine": "~2.8.6", | ||
"@types/js-base64": "2.3.1", | ||
"@types/node-fetch": "1.6.9", | ||
@@ -68,5 +67,4 @@ "ajv": "~6.3.0", | ||
"@types/long": "~3.0.32", | ||
"js-base64": "2.4.9", | ||
"protobufjs": "~6.8.6" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
30
3
3194454
19447
- Removedjs-base64@2.4.9
- Removedjs-base64@2.4.9(transitive)