@graphql-tools/webpack-loader-runtime
Advanced tools
Comparing version 6.2.1-alpha-1ce2f5c9.0 to 6.2.1-alpha-1dffcc60.0
@@ -5,10 +5,24 @@ 'use strict'; | ||
var uniqueCode = "\n var names = {};\n function unique(defs) {\n return defs.filter(function (def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value;\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n });\n };\n"; | ||
const uniqueCode = ` | ||
var names = {}; | ||
function unique(defs) { | ||
return defs.filter(function (def) { | ||
if (def.kind !== 'FragmentDefinition') return true; | ||
var name = def.name.value; | ||
if (names[name]) { | ||
return false; | ||
} else { | ||
names[name] = true; | ||
return true; | ||
} | ||
}); | ||
}; | ||
`; | ||
function useUnique() { | ||
var names = {}; | ||
const names = {}; | ||
return function unique(defs) { | ||
return defs.filter(function (def) { | ||
return defs.filter(def => { | ||
if (def.kind !== 'FragmentDefinition') | ||
return true; | ||
var name = def.name.value; | ||
const name = def.name.value; | ||
if (names[name]) { | ||
@@ -15,0 +29,0 @@ return false; |
@@ -1,9 +0,23 @@ | ||
var uniqueCode = "\n var names = {};\n function unique(defs) {\n return defs.filter(function (def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value;\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n });\n };\n"; | ||
const uniqueCode = ` | ||
var names = {}; | ||
function unique(defs) { | ||
return defs.filter(function (def) { | ||
if (def.kind !== 'FragmentDefinition') return true; | ||
var name = def.name.value; | ||
if (names[name]) { | ||
return false; | ||
} else { | ||
names[name] = true; | ||
return true; | ||
} | ||
}); | ||
}; | ||
`; | ||
function useUnique() { | ||
var names = {}; | ||
const names = {}; | ||
return function unique(defs) { | ||
return defs.filter(function (def) { | ||
return defs.filter(def => { | ||
if (def.kind !== 'FragmentDefinition') | ||
return true; | ||
var name = def.name.value; | ||
const name = def.name.value; | ||
if (names[name]) { | ||
@@ -10,0 +24,0 @@ return false; |
{ | ||
"name": "@graphql-tools/webpack-loader-runtime", | ||
"version": "6.2.1-alpha-1ce2f5c9.0", | ||
"version": "6.2.1-alpha-1dffcc60.0", | ||
"description": "A set of utils for GraphQL Webpack Loader", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11845
14
122