Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
b.createString();
// $ExpectError
b.createString(0);
b.createLong(1, 2);
// $ExpectError
b.createLong();
// $ExpectError
b.createLong("s", "t");
/**
* flatbuffers
*/
new fb.flatbuffers.Long(1, 2);
new fb.flatbuffers.ByteBuffer(arr);
new fb.flatbuffers.Builder();
b.createString(arr);
// $ExpectError
b.createString();
// $ExpectError
b.createString(0);
b.createLong(1, 2);
// $ExpectError
b.createLong();
// $ExpectError
b.createLong("s", "t");
/**
* flatbuffers
*/
new fb.flatbuffers.Long(1, 2);
new fb.flatbuffers.ByteBuffer(arr);
new fb.flatbuffers.Builder();
/* jshint esversion: 6 */
/* eslint "indent": [ "error", 4, { "SwitchCase": 1 } ] */
var armnn = armnn || {};
var base = base || require('./base');
var flatbuffers = flatbuffers || require('flatbuffers').flatbuffers;
var long = long || { Long: require('long') };
armnn.ModelFactory = class {
match(context) {
const extension = context.identifier.split('.').pop().toLowerCase();
if (extension == 'armnn') {
return true;
}
return false;
}
open(context, host) {
return host.require('./armnn-schema').then((armnn_schema) => {
const identifier = context.identifier;
let model = null;
/* jshint esversion: 6 */
/* eslint "indent": [ "error", 4, { "SwitchCase": 1 } ] */
var mnn = mnn || {};
var base = base || require('./base');
var flatbuffers = flatbuffers || require('flatbuffers').flatbuffers;
mnn.ModelFactory = class {
match(context) {
const extension = context.identifier.split('.').pop().toLowerCase();
if (extension == 'mnn') {
return true;
}
return false;
}
open(context, host) {
return host.require('./mnn-schema').then((mnn_schema) => {
const identifier = context.identifier;
let net = null;
try {
/* jshint esversion: 6 */
/* eslint "indent": [ "error", 4, { "SwitchCase": 1 } ] */
var tflite = tflite || {};
var base = base || require('./base');
var flatbuffers = flatbuffers || require('flatbuffers').flatbuffers;
var long = long || { Long: require('long') };
tflite.ModelFactory = class {
match(context) {
const extension = context.identifier.split('.').pop().toLowerCase();
if (extension == 'tflite' || extension == 'lite') {
return true;
}
if (extension == 'tfl' || extension == 'bin') {
const buffer = context.buffer;
const signature = [ 0x54, 0x46, 0x4c, 0x33 ]; // TFL3
if (buffer && buffer.length > 8 && signature.every((x, i) => x == buffer[i + 4])) {
return true;
}
}