Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-markdown/utils

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-markdown/utils - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

package.json

@@ -8,3 +8,3 @@ {

},
"version": "1.4.0",
"version": "1.4.1",
"license": "MIT",

@@ -26,3 +26,3 @@ "main": "src/index.js",

"dependencies": {
"@graphql-tools/load": "^7.8.14"
"@graphql-tools/load": "^8.0.0"
},

@@ -29,0 +29,0 @@ "peerDependencies": {

const { hasProperty, isEmpty } = require("./object");
const WILDCARD_DIRECTIVE = "*";
function getCustomDirectives(

@@ -18,4 +20,3 @@ { directives: schemaDirectives } = { directives: undefined },

if (
hasProperty(schemaDirectives, schemaDirectiveName) &&
hasProperty(customDirectiveOptions, schemaDirectiveName) === false
isCustomDirective(schemaDirectiveName, customDirectiveOptions) === false
) {

@@ -27,3 +28,3 @@ continue;

type: schemaDirectives[schemaDirectiveName],
descriptor: customDirectiveOptions[schemaDirectiveName].descriptor,
descriptor: getDescriptor(schemaDirectiveName, customDirectiveOptions),
};

@@ -35,2 +36,21 @@ }

module.exports = { getCustomDirectives };
function getDescriptor(schemaDirectiveName, customDirectiveOptions) {
if (hasProperty(customDirectiveOptions, schemaDirectiveName) === true) {
return customDirectiveOptions[schemaDirectiveName].descriptor;
}
if (hasProperty(customDirectiveOptions, WILDCARD_DIRECTIVE) === true) {
return customDirectiveOptions[WILDCARD_DIRECTIVE].descriptor;
}
return undefined;
}
function isCustomDirective(schemaDirectiveName, customDirectiveOptions) {
return (
hasProperty(customDirectiveOptions, schemaDirectiveName) === true ||
hasProperty(customDirectiveOptions, WILDCARD_DIRECTIVE) === true
);
}
module.exports = { getCustomDirectives, getDescriptor, isCustomDirective };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc