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

@theconcurrent/utility

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theconcurrent/utility - npm Package Compare versions

Comparing version 0.0.28 to 0.0.29

dist/simpleTemplateEngine.d.ts

2

./dist/index.umd.js

@@ -1,2 +0,2 @@

(function(r,f){typeof exports=="object"&&typeof module!="undefined"?f(exports,require("graphql")):typeof define=="function"&&define.amd?define(["exports","graphql"],f):(r=typeof globalThis!="undefined"?globalThis:r||self,f(r["@theconcurrent/utility"]={},r.graphql))})(this,function(r,f){"use strict";function l(e,t,i){return e.find(n=>n[t]===i)}function d(e,t){return e.filter(i=>t in i)}function p(e,t,i){return e.sort((n,u)=>{const o=t.indexOf(String(n[i])),y=t.indexOf(String(u[i]));return o===-1?1:y===-1?-1:o-y})}function T(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.displayColumns}function g(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="label"))==null?void 0:t.args)==null?void 0:i.name)||void 0}function B(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.representative}function N(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="specifiedBy"))==null?void 0:t.args)==null?void 0:i.url)||void 0}function a(e,t){return l(e,"typeName",t)}function m(e,t,i){var c;const n=a(e,t);if(!n||n.kind!=="Object"||!n.fields)return;if(i.length===0)return n;const[u,...o]=i,y=(c=n.fields.find(O=>O.name===u))==null?void 0:c.typeName;if(y)return m(e,y,o)}function s(e,t,i,n=[],u){if(u<0)return;const o=a(e,t);if(!(!o||n.includes(t))&&(n.push(t),!(o.kind!=="Object"||!o.fields)))for(const y of o.fields){if(y.typeName===i)return y.name;const c=s(e,y.typeName,i,n,u-1);if(c)return`${y.name}.${c}`}}function h(e,t,i,n){const u=s(e,t,i,[],0);if(u)return`${n}${u}`}function F(e,t){return e.find(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})}function v(e,t){return e.filter(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})||[]}function E(e,t){const i=t.split(".");if(i[0]!==e.name)return null;let n=e;for(const u of i.slice(1)){if(!n||!n.fields)return null;const o=n.fields.find(y=>y.name===u);if(!o)return null;n=o}return n}function P(e,t){const i=t.split(".");let n=e;return i.forEach(u=>{typeof n=="object"&&n!==null&&u in n?n=n[u]:n=null}),n}function S(e){return f.isEnumType(e.type)||f.isNonNullType(e.type)&&f.isEnumType(e.type.ofType)}function I(e){return f.isListType(e.type)||f.isNonNullType(e.type)&&f.isListType(e.type.ofType)}function L(e){return!!(f.isScalarType(e.type)||f.isNonNullType(e.type)&&(f.isScalarType(e.type.ofType)||f.isListType(e.type.ofType)&&(f.isScalarType(e.type.ofType.ofType)||f.isNonNullType(e.type.ofType.ofType)&&f.isScalarType(e.type.ofType.ofType.ofType))))}function b(e){return e.charAt(0).toLowerCase()+e.slice(1)}r.checkIsEnum=S,r.checkIsList=I,r.checkIsScalar=L,r.filterEntitiesByDirectiveName=v,r.findEntityByDirectiveName=F,r.findEntityFromPath=m,r.findPathToEntity=s,r.findValue=P,r.generatePath=h,r.getDisplayColumnsFromDirectives=T,r.getEntityByName=a,r.getField=E,r.getItemByKeyAndValue=l,r.getItemsByHavingKey=d,r.getLabelFromDirectives=g,r.getRepresentativeFromDirectives=B,r.getSpecifiedByFromDirectives=N,r.lowercaseFirstLetter=b,r.sortDataByOrder=p,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
(function(r,f){typeof exports=="object"&&typeof module!="undefined"?f(exports,require("graphql")):typeof define=="function"&&define.amd?define(["exports","graphql"],f):(r=typeof globalThis!="undefined"?globalThis:r||self,f(r["@theconcurrent/utility"]={},r.graphql))})(this,function(r,f){"use strict";function s(e,t,i){return e.find(n=>n[t]===i)}function d(e,t){return e.filter(i=>t in i)}function p(e,t,i){return e.sort((n,u)=>{const o=t.indexOf(String(n[i])),y=t.indexOf(String(u[i]));return o===-1?1:y===-1?-1:o-y})}function T(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.displayColumns}function g(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="label"))==null?void 0:t.args)==null?void 0:i.name)||void 0}function B(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.representative}function N(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="specifiedBy"))==null?void 0:t.args)==null?void 0:i.url)||void 0}function a(e,t){return s(e,"typeName",t)}function m(e,t,i){var c;const n=a(e,t);if(!n||n.kind!=="Object"||!n.fields)return;if(i.length===0)return n;const[u,...o]=i,y=(c=n.fields.find(j=>j.name===u))==null?void 0:c.typeName;if(y)return m(e,y,o)}function l(e,t,i,n=[],u){if(u<0)return;const o=a(e,t);if(!(!o||n.includes(t))&&(n.push(t),!(o.kind!=="Object"||!o.fields)))for(const y of o.fields){if(y.typeName===i)return y.name;const c=l(e,y.typeName,i,n,u-1);if(c)return`${y.name}.${c}`}}function h(e,t,i,n){const u=l(e,t,i,[],0);if(u)return`${n}${u}`}function E(e,t){return e.find(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})}function F(e,t){return e.filter(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})||[]}function v(e,t){const i=t.split(".");if(i[0]!==e.name)return null;let n=e;for(const u of i.slice(1)){if(!n||!n.fields)return null;const o=n.fields.find(y=>y.name===u);if(!o)return null;n=o}return n}function P(e,t){const i=t.split(".");let n=e;return i.forEach(u=>{typeof n=="object"&&n!==null&&u in n?n=n[u]:n=null}),n}function S(e){return f.isEnumType(e.type)||f.isNonNullType(e.type)&&f.isEnumType(e.type.ofType)}function I(e){return f.isListType(e.type)||f.isNonNullType(e.type)&&f.isListType(e.type.ofType)}function L(e){return!!(f.isScalarType(e.type)||f.isNonNullType(e.type)&&(f.isScalarType(e.type.ofType)||f.isListType(e.type.ofType)&&(f.isScalarType(e.type.ofType.ofType)||f.isNonNullType(e.type.ofType.ofType)&&f.isScalarType(e.type.ofType.ofType.ofType))))}function b(e){return e.charAt(0).toLowerCase()+e.slice(1)}function O(e,t){return e.replace(/\${(.*?)}/g,(i,n)=>n.split(".").reduce((u,o)=>typeof u=="object"&&u!==null&&o in u?u[o]:i,t))}r.checkIsEnum=S,r.checkIsList=I,r.checkIsScalar=L,r.filterEntitiesByDirectiveName=F,r.findEntityByDirectiveName=E,r.findEntityFromPath=m,r.findPathToEntity=l,r.findValue=P,r.generatePath=h,r.getDisplayColumnsFromDirectives=T,r.getEntityByName=a,r.getField=v,r.getItemByKeyAndValue=s,r.getItemsByHavingKey=d,r.getLabelFromDirectives=g,r.getRepresentativeFromDirectives=B,r.getSpecifiedByFromDirectives=N,r.lowercaseFirstLetter=b,r.simpleTemplateEngine=O,r.sortDataByOrder=p,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
//# sourceMappingURL=index.umd.js.map

@@ -8,2 +8,3 @@ import { getItemByKeyAndValue, getItemsByHavingKey, sortDataByOrder } from './dictionaryArray';

import lowercaseFirstLetter from './lowercaseFirstLetter';
import simpleTemplateEngine from './simpleTemplateEngine';
export { getItemByKeyAndValue, getItemsByHavingKey, sortDataByOrder };

@@ -16,2 +17,3 @@ export { getDisplayColumnsFromDirectives, getLabelFromDirectives, getRepresentativeFromDirectives, getSpecifiedByFromDirectives, };

export { lowercaseFirstLetter };
export { simpleTemplateEngine };
//# sourceMappingURL=index.d.ts.map

@@ -1,2 +0,2 @@

import { isEnumType as p, isNonNullType as y, isListType as c, isScalarType as a } from "graphql";
import { isEnumType as y, isNonNullType as p, isListType as c, isScalarType as a } from "graphql";
function d(n, e, r) {

@@ -9,5 +9,5 @@ return n.find((t) => t[e] === r);

function B(n, e, r) {
return n.sort((t, o) => {
const i = e.indexOf(String(t[r])), u = e.indexOf(String(o[r]));
return i === -1 ? 1 : u === -1 ? -1 : i - u;
return n.sort((t, i) => {
const o = e.indexOf(String(t[r])), u = e.indexOf(String(i[r]));
return o === -1 ? 1 : u === -1 ? -1 : o - u;
});

@@ -24,3 +24,3 @@ }

}
function N(n) {
function E(n) {
const e = n == null ? void 0 : n.find((r) => r.name === "model");

@@ -30,3 +30,3 @@ if (e)

}
function x(n) {
function N(n) {
var e, r;

@@ -45,14 +45,14 @@ return ((r = (e = n == null ? void 0 : n.find((t) => t.name === "specifiedBy")) == null ? void 0 : e.args) == null ? void 0 : r.url) || void 0;

return t;
const [o, ...i] = r, u = (f = t.fields.find(
(m) => m.name === o
const [i, ...o] = r, u = (f = t.fields.find(
(m) => m.name === i
)) == null ? void 0 : f.typeName;
if (u)
return g(n, u, i);
return g(n, u, o);
}
function s(n, e, r, t = [], o) {
if (o < 0)
function s(n, e, r, t = [], i) {
if (i < 0)
return;
const i = l(n, e);
if (!(!i || t.includes(e)) && (t.push(e), !(i.kind !== "Object" || !i.fields)))
for (const u of i.fields) {
const o = l(n, e);
if (!(!o || t.includes(e)) && (t.push(e), !(o.kind !== "Object" || !o.fields)))
for (const u of o.fields) {
if (u.typeName === r)

@@ -65,3 +65,3 @@ return u.name;

t,
o - 1
i - 1
);

@@ -72,11 +72,11 @@ if (f)

}
function E(n, e, r, t) {
const o = s(n, e, r, [], 0);
if (o)
return `${t}${o}`;
function b(n, e, r, t) {
const i = s(n, e, r, [], 0);
if (i)
return `${t}${i}`;
}
function b(n, e) {
function x(n, e) {
return n.find((r) => {
var t;
return (t = r.directives) == null ? void 0 : t.find((o) => o.name === e);
return (t = r.directives) == null ? void 0 : t.find((i) => i.name === e);
});

@@ -87,3 +87,3 @@ }

var t;
return (t = r.directives) == null ? void 0 : t.find((o) => o.name === e);
return (t = r.directives) == null ? void 0 : t.find((i) => i.name === e);
}) || [];

@@ -96,9 +96,9 @@ }

let t = n;
for (const o of r.slice(1)) {
for (const i of r.slice(1)) {
if (!t || !t.fields)
return null;
const i = t.fields.find((u) => u.name === o);
if (!i)
const o = t.fields.find((u) => u.name === i);
if (!o)
return null;
t = i;
t = o;
}

@@ -110,28 +110,38 @@ return t;

let t = n;
return r.forEach((o) => {
typeof t == "object" && t !== null && o in t ? t = t[o] : t = null;
return r.forEach((i) => {
typeof t == "object" && t !== null && i in t ? t = t[i] : t = null;
}), t;
}
function O(n) {
return p(n.type) || y(n.type) && p(n.type.ofType);
return y(n.type) || p(n.type) && y(n.type.ofType);
}
function S(n) {
return c(n.type) || y(n.type) && c(n.type.ofType);
return c(n.type) || p(n.type) && c(n.type.ofType);
}
function v(n) {
return !!(a(n.type) || y(n.type) && (a(n.type.ofType) || c(n.type.ofType) && (a(n.type.ofType.ofType) || y(n.type.ofType.ofType) && a(n.type.ofType.ofType.ofType))));
function $(n) {
return !!(a(n.type) || p(n.type) && (a(n.type.ofType) || c(n.type.ofType) && (a(n.type.ofType.ofType) || p(n.type.ofType.ofType) && a(n.type.ofType.ofType.ofType))));
}
function $(n) {
function j(n) {
return n.charAt(0).toLowerCase() + n.slice(1);
}
function v(n, e) {
return n.replace(
/\${(.*?)}/g,
(r, t) => (
// eslint-disable-next-line
t.split(".").reduce((i, o) => typeof i == "object" && i !== null && o in i ? i[o] : r, e)
)
// 'as any'は、dataγ«ι©εˆ‡γͺεž‹γ‚’δΈŽγˆγ‚‹γ“γ¨γ§ι™€εŽ»γ™γ‚‹γ“γ¨γŒγ§γγΎγ™γ€‚
);
}
export {
O as checkIsEnum,
S as checkIsList,
v as checkIsScalar,
$ as checkIsScalar,
A as filterEntitiesByDirectiveName,
b as findEntityByDirectiveName,
x as findEntityByDirectiveName,
g as findEntityFromPath,
s as findPathToEntity,
L as findValue,
E as generatePath,
b as generatePath,
F as getDisplayColumnsFromDirectives,

@@ -143,7 +153,8 @@ l as getEntityByName,

P as getLabelFromDirectives,
N as getRepresentativeFromDirectives,
x as getSpecifiedByFromDirectives,
$ as lowercaseFirstLetter,
E as getRepresentativeFromDirectives,
N as getSpecifiedByFromDirectives,
j as lowercaseFirstLetter,
v as simpleTemplateEngine,
B as sortDataByOrder
};
//# sourceMappingURL=index.es.js.map

@@ -1,2 +0,2 @@

(function(r,f){typeof exports=="object"&&typeof module!="undefined"?f(exports,require("graphql")):typeof define=="function"&&define.amd?define(["exports","graphql"],f):(r=typeof globalThis!="undefined"?globalThis:r||self,f(r["@theconcurrent/utility"]={},r.graphql))})(this,function(r,f){"use strict";function l(e,t,i){return e.find(n=>n[t]===i)}function d(e,t){return e.filter(i=>t in i)}function p(e,t,i){return e.sort((n,u)=>{const o=t.indexOf(String(n[i])),y=t.indexOf(String(u[i]));return o===-1?1:y===-1?-1:o-y})}function T(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.displayColumns}function g(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="label"))==null?void 0:t.args)==null?void 0:i.name)||void 0}function B(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.representative}function N(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="specifiedBy"))==null?void 0:t.args)==null?void 0:i.url)||void 0}function a(e,t){return l(e,"typeName",t)}function m(e,t,i){var c;const n=a(e,t);if(!n||n.kind!=="Object"||!n.fields)return;if(i.length===0)return n;const[u,...o]=i,y=(c=n.fields.find(O=>O.name===u))==null?void 0:c.typeName;if(y)return m(e,y,o)}function s(e,t,i,n=[],u){if(u<0)return;const o=a(e,t);if(!(!o||n.includes(t))&&(n.push(t),!(o.kind!=="Object"||!o.fields)))for(const y of o.fields){if(y.typeName===i)return y.name;const c=s(e,y.typeName,i,n,u-1);if(c)return`${y.name}.${c}`}}function h(e,t,i,n){const u=s(e,t,i,[],0);if(u)return`${n}${u}`}function F(e,t){return e.find(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})}function v(e,t){return e.filter(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})||[]}function E(e,t){const i=t.split(".");if(i[0]!==e.name)return null;let n=e;for(const u of i.slice(1)){if(!n||!n.fields)return null;const o=n.fields.find(y=>y.name===u);if(!o)return null;n=o}return n}function P(e,t){const i=t.split(".");let n=e;return i.forEach(u=>{typeof n=="object"&&n!==null&&u in n?n=n[u]:n=null}),n}function S(e){return f.isEnumType(e.type)||f.isNonNullType(e.type)&&f.isEnumType(e.type.ofType)}function I(e){return f.isListType(e.type)||f.isNonNullType(e.type)&&f.isListType(e.type.ofType)}function L(e){return!!(f.isScalarType(e.type)||f.isNonNullType(e.type)&&(f.isScalarType(e.type.ofType)||f.isListType(e.type.ofType)&&(f.isScalarType(e.type.ofType.ofType)||f.isNonNullType(e.type.ofType.ofType)&&f.isScalarType(e.type.ofType.ofType.ofType))))}function b(e){return e.charAt(0).toLowerCase()+e.slice(1)}r.checkIsEnum=S,r.checkIsList=I,r.checkIsScalar=L,r.filterEntitiesByDirectiveName=v,r.findEntityByDirectiveName=F,r.findEntityFromPath=m,r.findPathToEntity=s,r.findValue=P,r.generatePath=h,r.getDisplayColumnsFromDirectives=T,r.getEntityByName=a,r.getField=E,r.getItemByKeyAndValue=l,r.getItemsByHavingKey=d,r.getLabelFromDirectives=g,r.getRepresentativeFromDirectives=B,r.getSpecifiedByFromDirectives=N,r.lowercaseFirstLetter=b,r.sortDataByOrder=p,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
(function(r,f){typeof exports=="object"&&typeof module!="undefined"?f(exports,require("graphql")):typeof define=="function"&&define.amd?define(["exports","graphql"],f):(r=typeof globalThis!="undefined"?globalThis:r||self,f(r["@theconcurrent/utility"]={},r.graphql))})(this,function(r,f){"use strict";function s(e,t,i){return e.find(n=>n[t]===i)}function d(e,t){return e.filter(i=>t in i)}function p(e,t,i){return e.sort((n,u)=>{const o=t.indexOf(String(n[i])),y=t.indexOf(String(u[i]));return o===-1?1:y===-1?-1:o-y})}function T(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.displayColumns}function g(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="label"))==null?void 0:t.args)==null?void 0:i.name)||void 0}function B(e){const t=e==null?void 0:e.find(i=>i.name==="model");if(t)return t.args.representative}function N(e){var t,i;return((i=(t=e==null?void 0:e.find(n=>n.name==="specifiedBy"))==null?void 0:t.args)==null?void 0:i.url)||void 0}function a(e,t){return s(e,"typeName",t)}function m(e,t,i){var c;const n=a(e,t);if(!n||n.kind!=="Object"||!n.fields)return;if(i.length===0)return n;const[u,...o]=i,y=(c=n.fields.find(j=>j.name===u))==null?void 0:c.typeName;if(y)return m(e,y,o)}function l(e,t,i,n=[],u){if(u<0)return;const o=a(e,t);if(!(!o||n.includes(t))&&(n.push(t),!(o.kind!=="Object"||!o.fields)))for(const y of o.fields){if(y.typeName===i)return y.name;const c=l(e,y.typeName,i,n,u-1);if(c)return`${y.name}.${c}`}}function h(e,t,i,n){const u=l(e,t,i,[],0);if(u)return`${n}${u}`}function E(e,t){return e.find(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})}function F(e,t){return e.filter(i=>{var n;return(n=i.directives)==null?void 0:n.find(u=>u.name===t)})||[]}function v(e,t){const i=t.split(".");if(i[0]!==e.name)return null;let n=e;for(const u of i.slice(1)){if(!n||!n.fields)return null;const o=n.fields.find(y=>y.name===u);if(!o)return null;n=o}return n}function P(e,t){const i=t.split(".");let n=e;return i.forEach(u=>{typeof n=="object"&&n!==null&&u in n?n=n[u]:n=null}),n}function S(e){return f.isEnumType(e.type)||f.isNonNullType(e.type)&&f.isEnumType(e.type.ofType)}function I(e){return f.isListType(e.type)||f.isNonNullType(e.type)&&f.isListType(e.type.ofType)}function L(e){return!!(f.isScalarType(e.type)||f.isNonNullType(e.type)&&(f.isScalarType(e.type.ofType)||f.isListType(e.type.ofType)&&(f.isScalarType(e.type.ofType.ofType)||f.isNonNullType(e.type.ofType.ofType)&&f.isScalarType(e.type.ofType.ofType.ofType))))}function b(e){return e.charAt(0).toLowerCase()+e.slice(1)}function O(e,t){return e.replace(/\${(.*?)}/g,(i,n)=>n.split(".").reduce((u,o)=>typeof u=="object"&&u!==null&&o in u?u[o]:i,t))}r.checkIsEnum=S,r.checkIsList=I,r.checkIsScalar=L,r.filterEntitiesByDirectiveName=F,r.findEntityByDirectiveName=E,r.findEntityFromPath=m,r.findPathToEntity=l,r.findValue=P,r.generatePath=h,r.getDisplayColumnsFromDirectives=T,r.getEntityByName=a,r.getField=v,r.getItemByKeyAndValue=s,r.getItemsByHavingKey=d,r.getLabelFromDirectives=g,r.getRepresentativeFromDirectives=B,r.getSpecifiedByFromDirectives=N,r.lowercaseFirstLetter=b,r.simpleTemplateEngine=O,r.sortDataByOrder=p,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
//# sourceMappingURL=index.umd.js.map

@@ -111,3 +111,3 @@ import type { DocumentNode } from 'graphql';

};
type Relation = {
export type Relation = {
name: string;

@@ -119,2 +119,5 @@ label: string;

isCollection: boolean;
filter?: {
[k: string]: any;
};
};

@@ -162,2 +165,3 @@ export type FinalResource = {

path: string;
removingTabs?: string[];
};

@@ -164,0 +168,0 @@ delete?: {

{
"name": "@theconcurrent/utility",
"version": "0.0.28",
"version": "0.0.29",
"main": "./dist/index.umd.js",

@@ -29,3 +29,3 @@ "module": "./dist/index.es.js",

},
"gitHead": "8bba0da91e098154ee722a9bef4132caecd8fbdd"
"gitHead": "20a0ac17e76087beeab1c2808f709a412b4060e6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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