Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isBinding.js 743B

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isBinding;
  6. var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers");
  7. function isBinding(node, parent, grandparent) {
  8. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  9. return false;
  10. }
  11. const keys = _getBindingIdentifiers.default.keys[parent.type];
  12. if (keys) {
  13. for (let i = 0; i < keys.length; i++) {
  14. const key = keys[i];
  15. const val = parent[key];
  16. if (Array.isArray(val)) {
  17. if (val.indexOf(node) >= 0) return true;
  18. } else {
  19. if (val === node) return true;
  20. }
  21. }
  22. }
  23. return false;
  24. }