]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - apps/tidep0084.git/blobdiff - example/iot-gateway/node_modules/protocol-buffers/index.js
Updated Sensor To Cloud design to have an easy to use setup GUI on the
[apps/tidep0084.git] / example / iot-gateway / node_modules / protocol-buffers / index.js
diff --git a/example/iot-gateway/node_modules/protocol-buffers/index.js b/example/iot-gateway/node_modules/protocol-buffers/index.js
deleted file mode 100644 (file)
index e98e1a5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-var schema = require('protocol-buffers-schema')
-var compile = require('./compile')
-
-module.exports = function (proto, opts) {
-  if (!opts) opts = {}
-  if (!proto) throw new Error('Pass in a .proto string or a protobuf-schema parsed object')
-
-  var sch = (typeof proto === 'object' && !Buffer.isBuffer(proto)) ? proto : schema.parse(proto)
-
-  // to not make toString,toJSON enumarable we make a fire-and-forget prototype
-  var Messages = function () {
-    var self = this
-
-    compile(sch, opts.encodings || {}).forEach(function (m) {
-      self[m.name] = m.values || m
-    })
-  }
-
-  Messages.prototype.toString = function () {
-    return schema.stringify(sch)
-  }
-
-  Messages.prototype.toJSON = function () {
-    return sch
-  }
-
-  return new Messages()
-}