How to use the dbus-next.Variant function in dbus-next

To help you get started, we’ve selected a few dbus-next examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dbusjs / mpris-service / src / interfaces / types.js View on Github external
function metadataToDbus(metadataPlain) {
  let metadataVariant = {};
  for (let k of Object.keys(metadataPlain)) {
    let value = metadataPlain[k];
    let signature = guessMetadataSignature(k, value);
    if (signature) {
      metadataVariant[k] = new Variant(signature, value);
    }
  }
  return metadataVariant;
}