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.1 to 1.5.0

src/logger.js

2

package.json

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

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

@@ -11,0 +11,0 @@ "main": "src/index.js",

@@ -25,5 +25,10 @@ const { hasProperty, isEmpty } = require("./object");

const directiveOptions = getCustomDirectiveOptions(
schemaDirectiveName,
customDirectiveOptions,
);
customDirectives[schemaDirectiveName] = {
type: schemaDirectives[schemaDirectiveName],
descriptor: getDescriptor(schemaDirectiveName, customDirectiveOptions),
...directiveOptions,
};

@@ -35,12 +40,15 @@ }

function getDescriptor(schemaDirectiveName, customDirectiveOptions) {
function getCustomDirectiveOptions(
schemaDirectiveName,
customDirectiveOptions,
) {
if (hasProperty(customDirectiveOptions, schemaDirectiveName) === true) {
return customDirectiveOptions[schemaDirectiveName].descriptor;
return customDirectiveOptions[schemaDirectiveName];
}
if (hasProperty(customDirectiveOptions, WILDCARD_DIRECTIVE) === true) {
return customDirectiveOptions[WILDCARD_DIRECTIVE].descriptor;
return customDirectiveOptions[WILDCARD_DIRECTIVE];
}
return undefined;
return {};
}

@@ -55,2 +63,6 @@

module.exports = { getCustomDirectives, getDescriptor, isCustomDirective };
module.exports = {
getCustomDirectives,
getCustomDirectiveOptions,
isCustomDirective,
};

@@ -16,2 +16,9 @@ const { getTypeDirectiveValues } = require("./graphql");

module.exports = { directiveDescriptor };
function directiveTag(directiveType, type, classname = "badge--secondary") {
return {
text: `@${directiveType.name}`,
classname: classname,
};
}
module.exports = { directiveDescriptor, directiveTag };

@@ -12,2 +12,3 @@ module.exports = {

helper: require("./helper"),
logger: require("./logger"),
};

@@ -7,4 +7,6 @@ /**

return (
!!(obj && obj[prop]) ||
(obj instanceof Object && Object.prototype.hasOwnProperty.call(obj, prop))
typeof obj === "object" &&
(!!(obj && obj[prop]) ||
(obj instanceof Object &&
Object.prototype.hasOwnProperty.call(obj, prop)))
);

@@ -18,3 +20,3 @@ }

function isEmpty(obj) {
return typeof obj !== "object" || Object.keys(obj).length === 0;
return typeof obj !== "object" || !Object.keys(obj).length;
}

@@ -31,2 +33,7 @@

module.exports = { hasMethod, hasProperty, isEmpty, getObjPath };
module.exports = {
getObjPath,
hasMethod,
hasProperty,
isEmpty,
};
/* istanbul ignore file */
const logger = require("./logger").getInstance();
function prettify(content, parser) {

@@ -8,3 +10,3 @@ try {

} catch (error) {
console.debug("Prettier is not found");
logger.warn("Prettier is not found");
}

@@ -11,0 +13,0 @@ }

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