New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/utils

Package Overview
Dependencies
Maintainers
4
Versions
1342
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/utils - npm Package Compare versions

Comparing version 10.7.2 to 10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f

8

cjs/helpers.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asArray = void 0;
exports.isUrl = isUrl;
exports.isDocumentString = isDocumentString;

@@ -12,3 +13,6 @@ exports.isValidPath = isValidPath;

const graphql_1 = require("graphql");
function isURL(str) {
function isUrl(str) {
if (URL.canParse) {
return URL.canParse(str);
}
try {

@@ -34,3 +38,3 @@ const url = new URL(str);

// if the string is a SDL
if (invalidDocRegex.test(str) || isURL(str)) {
if (invalidDocRegex.test(str) || isUrl(str)) {
return false;

@@ -37,0 +41,0 @@ }

import { parse } from 'graphql';
function isURL(str) {
export function isUrl(str) {
if (URL.canParse) {
return URL.canParse(str);
}
try {

@@ -22,3 +25,3 @@ const url = new URL(str);

// if the string is a SDL
if (invalidDocRegex.test(str) || isURL(str)) {
if (invalidDocRegex.test(str) || isUrl(str)) {
return false;

@@ -25,0 +28,0 @@ }

{
"name": "@graphql-tools/utils",
"version": "10.7.2",
"version": "10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f",
"description": "Common package containing utils and types for GraphQL tools",

@@ -5,0 +5,0 @@ "sideEffects": false,

import { ASTNode } from 'graphql';
export declare function isUrl(str: string): boolean;
export declare const asArray: <T>(fns: T | T[]) => T[];

@@ -3,0 +4,0 @@ export declare function isDocumentString(str: any): boolean;

Sorry, the diff of this file is not supported yet

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