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

@gram-data/gram-builder

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gram-data/gram-builder - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

2

dist/gram-builder.cjs.development.js

@@ -133,3 +133,3 @@ 'use strict';

if (element.id) {
if (element.id || element.labels && element.labels.length > 0 || element.record) {
if (gramAst.isGramUnit(inner)) {

@@ -136,0 +136,0 @@ element.type = 'node';

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gram-data/gram-ast");function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function r(e){return Array.isArray(e)?e:e instanceof Function?r(e()):void 0===e?[]:[e]}var n=function(e){return e.toISOString().slice(0,10)},i=function(e,n,i,o){return t({type:"seq"},n&&{id:n},i&&{labels:i},o&&{record:o},{children:r(e)})},o=function(e,t){void 0===e&&(e="pair");var n=r(t);return n?n.length>1?[n.reduceRight((function(t,r){return a([r,t],{relation:e})}),u)]:[n[0]]:[]},a=function(r,n){void 0===n&&(n={});var i=t({type:"path",id:n.id},n.labels&&{labels:n.labels},n.record&&{record:n.record},{children:r.filter((function(t){return t&&!e.isGramUnit(t)}))});if(0===i.children.length)return i.id||i.labels&&i.labels.length>0||i.record?(i.type="node",i):u;if(1===i.children.length){var o=i.children[0];if(i.id)return e.isGramUnit(o)?(i.type="node",i.children=[],i):i;if(e.isGramUnit(o))return o;if(e.isGramNode(o))return o;if(e.isGramEdge(o))return o;if(e.isGramPath(o))return o}else if(2===i.children.length&&n.relation&&"pair"!==n.relation&&e.isGramNode(i.children[0])&&e.isGramNode(i.children[1]))return i.type="edge",i.relation=n.relation,i;return i.relation=n.relation||"pair",i},u={type:"unit",id:e.UNIT_ID,labels:void 0,record:void 0,children:[]},l=function(){return u},c=function(e,r,n){return t({type:"node",id:e},r&&{labels:r},n&&{record:n},{children:[]})},d=function(e,r,n,i,o){return void 0===r&&(r="right"),t({type:"edge",id:n},i&&{labels:i},o&&{record:o},{relation:r,children:e})},s=function(e,r,n,i){return t({type:"path"},r&&{id:r},n&&{labels:n},i&&{record:i},{children:e})},p=function(e){return e.reduce((function(e,t){return e[t.name]=t.value,e}),{})},f=function(e,t){return{type:"property",name:e,value:t}},g=function(e){return{type:"boolean",value:e?"true":"false"}},h=function(e){return{type:"string",value:e}},m=function(e,t){return{type:"tagged",value:t,tag:e}},y=function(e){return{type:"integer",value:String(e)}},x=function(e){return{type:"decimal",value:String(e)}},v=function(e){return{type:"hexadecimal",value:e}},b=function(e){return{type:"octal",value:e}},G=function(e,t){return{type:"measurement",value:String(t),unit:e}},O=function(e){return m(e instanceof Date?e.getFullYear().toString():e,"date")},S=function(e){return m(e instanceof Date?n(e):e,"date")},_=function(e){return m(e instanceof Date?"--"+e.toISOString().slice(5,10):e,"date")},I=function(e){return m(e instanceof Date?n(e):e,"time")},N=function(e,t){return void 0===t&&(t=1),e.flat(t).filter((function(e){return null!==e}))},U={__proto__:null,seq:i,reduce:o,cons:a,UNIT:u,unit:l,node:c,edge:d,path:s,record:p,property:f,boolean:g,string:h,tagged:m,integer:y,decimal:x,hexadecimal:v,octal:b,measurement:G,year:O,date:S,dayOfMonth:_,time:I,flatten:N,default:{seq:i,unit:l,cons:a,path:s,node:c,edge:d,record:p,property:f,boolean:g,string:h,tagged:m,integer:y,decimal:x,hexadecimal:v,octal:b,measurement:G,date:S,time:I,flatten:N}};exports.UNIT=u,exports.boolean=g,exports.cons=a,exports.date=S,exports.dayOfMonth=_,exports.decimal=x,exports.default=U,exports.edge=d,exports.flatten=N,exports.hexadecimal=v,exports.integer=y,exports.measurement=G,exports.node=c,exports.octal=b,exports.path=s,exports.property=f,exports.record=p,exports.reduce=o,exports.seq=i,exports.string=h,exports.tagged=m,exports.time=I,exports.unit=l,exports.year=O;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gram-data/gram-ast");function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function r(e){return Array.isArray(e)?e:e instanceof Function?r(e()):void 0===e?[]:[e]}var n=function(e){return e.toISOString().slice(0,10)},i=function(e,n,i,o){return t({type:"seq"},n&&{id:n},i&&{labels:i},o&&{record:o},{children:r(e)})},o=function(e,t){void 0===e&&(e="pair");var n=r(t);return n?n.length>1?[n.reduceRight((function(t,r){return a([r,t],{relation:e})}),l)]:[n[0]]:[]},a=function(r,n){void 0===n&&(n={});var i=t({type:"path",id:n.id},n.labels&&{labels:n.labels},n.record&&{record:n.record},{children:r.filter((function(t){return t&&!e.isGramUnit(t)}))});if(0===i.children.length)return i.id||i.labels&&i.labels.length>0||i.record?(i.type="node",i):l;if(1===i.children.length){var o=i.children[0];if(i.id||i.labels&&i.labels.length>0||i.record)return e.isGramUnit(o)?(i.type="node",i.children=[],i):i;if(e.isGramUnit(o))return o;if(e.isGramNode(o))return o;if(e.isGramEdge(o))return o;if(e.isGramPath(o))return o}else if(2===i.children.length&&n.relation&&"pair"!==n.relation&&e.isGramNode(i.children[0])&&e.isGramNode(i.children[1]))return i.type="edge",i.relation=n.relation,i;return i.relation=n.relation||"pair",i},l={type:"unit",id:e.UNIT_ID,labels:void 0,record:void 0,children:[]},u=function(){return l},c=function(e,r,n){return t({type:"node",id:e},r&&{labels:r},n&&{record:n},{children:[]})},d=function(e,r,n,i,o){return void 0===r&&(r="right"),t({type:"edge",id:n},i&&{labels:i},o&&{record:o},{relation:r,children:e})},s=function(e,r,n,i){return t({type:"path"},r&&{id:r},n&&{labels:n},i&&{record:i},{children:e})},p=function(e){return e.reduce((function(e,t){return e[t.name]=t.value,e}),{})},f=function(e,t){return{type:"property",name:e,value:t}},g=function(e){return{type:"boolean",value:e?"true":"false"}},h=function(e){return{type:"string",value:e}},m=function(e,t){return{type:"tagged",value:t,tag:e}},y=function(e){return{type:"integer",value:String(e)}},x=function(e){return{type:"decimal",value:String(e)}},v=function(e){return{type:"hexadecimal",value:e}},b=function(e){return{type:"octal",value:e}},G=function(e,t){return{type:"measurement",value:String(t),unit:e}},O=function(e){return m(e instanceof Date?e.getFullYear().toString():e,"date")},S=function(e){return m(e instanceof Date?n(e):e,"date")},_=function(e){return m(e instanceof Date?"--"+e.toISOString().slice(5,10):e,"date")},I=function(e){return m(e instanceof Date?n(e):e,"time")},N=function(e,t){return void 0===t&&(t=1),e.flat(t).filter((function(e){return null!==e}))},U={__proto__:null,seq:i,reduce:o,cons:a,UNIT:l,unit:u,node:c,edge:d,path:s,record:p,property:f,boolean:g,string:h,tagged:m,integer:y,decimal:x,hexadecimal:v,octal:b,measurement:G,year:O,date:S,dayOfMonth:_,time:I,flatten:N,default:{seq:i,unit:u,cons:a,path:s,node:c,edge:d,record:p,property:f,boolean:g,string:h,tagged:m,integer:y,decimal:x,hexadecimal:v,octal:b,measurement:G,date:S,time:I,flatten:N}};exports.UNIT=l,exports.boolean=g,exports.cons=a,exports.date=S,exports.dayOfMonth=_,exports.decimal=x,exports.default=U,exports.edge=d,exports.flatten=N,exports.hexadecimal=v,exports.integer=y,exports.measurement=G,exports.node=c,exports.octal=b,exports.path=s,exports.property=f,exports.record=p,exports.reduce=o,exports.seq=i,exports.string=h,exports.tagged=m,exports.time=I,exports.unit=u,exports.year=O;
//# sourceMappingURL=gram-builder.cjs.production.min.js.map

@@ -129,3 +129,3 @@ import { isGramUnit, isGramNode, isGramEdge, isGramPath, UNIT_ID } from '@gram-data/gram-ast';

if (element.id) {
if (element.id || element.labels && element.labels.length > 0 || element.record) {
if (isGramUnit(inner)) {

@@ -132,0 +132,0 @@ element.type = 'node';

@@ -192,3 +192,3 @@ (function (global, factory) {

if (element.id) {
if (element.id || element.labels && element.labels.length > 0 || element.record) {
if (isGramUnit(inner)) {

@@ -195,0 +195,0 @@ element.type = 'node';

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).gram=e.gram||{},e.gram.builder={}))}(this,(function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var n=function(e){return!!e.type&&"unit"===e.type},r=function(e){return!!e.type&&"node"===e.type};function i(e){return Array.isArray(e)?e:e instanceof Function?i(e()):void 0===e?[]:[e]}var o=function(e){return e.toISOString().slice(0,10)},a=function(e,n,r,o){return t({type:"seq"},n&&{id:n},r&&{labels:r},o&&{record:o},{children:i(e)})},u=function(e,t){void 0===e&&(e="pair");var n=i(t);return n?n.length>1?[n.reduceRight((function(t,n){return l([n,t],{relation:e})}),c)]:[n[0]]:[]},l=function(e,i){void 0===i&&(i={});var o,a=t({type:"path",id:i.id},i.labels&&{labels:i.labels},i.record&&{record:i.record},{children:e.filter((function(e){return e&&!n(e)}))});if(0===a.children.length)return a.id||a.labels&&a.labels.length>0||a.record?(a.type="node",a):c;if(1===a.children.length){var u=a.children[0];if(a.id)return n(u)?(a.type="node",a.children=[],a):a;if(n(u))return u;if(r(u))return u;if("type"in(o=u)&&"relation"in o&&"edge"===o.type)return u;if(function(e){return!!e.type&&"path"===e.type}(u))return u}else if(2===a.children.length&&i.relation&&"pair"!==i.relation&&r(a.children[0])&&r(a.children[1]))return a.type="edge",a.relation=i.relation,a;return a.relation=i.relation||"pair",a},c={type:"unit",id:"0",labels:void 0,record:void 0,children:[]},d=function(){return c},f=function(e,n,r){return t({type:"node",id:e},n&&{labels:n},r&&{record:r},{children:[]})},p=function(e,n,r,i,o){return void 0===n&&(n="right"),t({type:"edge",id:r},i&&{labels:i},o&&{record:o},{relation:n,children:e})},s=function(e,n,r,i){return t({type:"path"},n&&{id:n},r&&{labels:r},i&&{record:i},{children:e})},y=function(e){return e.reduce((function(e,t){return e[t.name]=t.value,e}),{})},g=function(e,t){return{type:"property",name:e,value:t}},h=function(e){return{type:"boolean",value:e?"true":"false"}},m=function(e){return{type:"string",value:e}},v=function(e,t){return{type:"tagged",value:t,tag:e}},b=function(e){return{type:"integer",value:String(e)}},O=function(e){return{type:"decimal",value:String(e)}},S=function(e){return{type:"hexadecimal",value:e}},x=function(e){return{type:"octal",value:e}},_=function(e,t){return{type:"measurement",value:String(t),unit:e}},j=function(e){return v(e instanceof Date?e.getFullYear().toString():e,"date")},q=function(e){return v(e instanceof Date?o(e):e,"date")},D=function(e){return v(e instanceof Date?"--"+e.toISOString().slice(5,10):e,"date")},I=function(e){return v(e instanceof Date?o(e):e,"time")},M=function(e,t){return void 0===t&&(t=1),e.flat(t).filter((function(e){return null!==e}))},A={__proto__:null,seq:a,reduce:u,cons:l,UNIT:c,unit:d,node:f,edge:p,path:s,record:y,property:g,boolean:h,string:m,tagged:v,integer:b,decimal:O,hexadecimal:S,octal:x,measurement:_,year:j,date:q,dayOfMonth:D,time:I,flatten:M,default:{seq:a,unit:d,cons:l,path:s,node:f,edge:p,record:y,property:g,boolean:h,string:m,tagged:v,integer:b,decimal:O,hexadecimal:S,octal:x,measurement:_,date:q,time:I,flatten:M}};e.UNIT=c,e.boolean=h,e.cons=l,e.date=q,e.dayOfMonth=D,e.decimal=O,e.default=A,e.edge=p,e.flatten=M,e.hexadecimal=S,e.integer=b,e.measurement=_,e.node=f,e.octal=x,e.path=s,e.property=g,e.record=y,e.reduce=u,e.seq=a,e.string=m,e.tagged=v,e.time=I,e.unit=d,e.year=j,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).gram=e.gram||{},e.gram.builder={}))}(this,(function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var n=function(e){return!!e.type&&"unit"===e.type},r=function(e){return!!e.type&&"node"===e.type};function i(e){return Array.isArray(e)?e:e instanceof Function?i(e()):void 0===e?[]:[e]}var o=function(e){return e.toISOString().slice(0,10)},a=function(e,n,r,o){return t({type:"seq"},n&&{id:n},r&&{labels:r},o&&{record:o},{children:i(e)})},u=function(e,t){void 0===e&&(e="pair");var n=i(t);return n?n.length>1?[n.reduceRight((function(t,n){return l([n,t],{relation:e})}),c)]:[n[0]]:[]},l=function(e,i){void 0===i&&(i={});var o,a=t({type:"path",id:i.id},i.labels&&{labels:i.labels},i.record&&{record:i.record},{children:e.filter((function(e){return e&&!n(e)}))});if(0===a.children.length)return a.id||a.labels&&a.labels.length>0||a.record?(a.type="node",a):c;if(1===a.children.length){var u=a.children[0];if(a.id||a.labels&&a.labels.length>0||a.record)return n(u)?(a.type="node",a.children=[],a):a;if(n(u))return u;if(r(u))return u;if("type"in(o=u)&&"relation"in o&&"edge"===o.type)return u;if(function(e){return!!e.type&&"path"===e.type}(u))return u}else if(2===a.children.length&&i.relation&&"pair"!==i.relation&&r(a.children[0])&&r(a.children[1]))return a.type="edge",a.relation=i.relation,a;return a.relation=i.relation||"pair",a},c={type:"unit",id:"0",labels:void 0,record:void 0,children:[]},d=function(){return c},f=function(e,n,r){return t({type:"node",id:e},n&&{labels:n},r&&{record:r},{children:[]})},p=function(e,n,r,i,o){return void 0===n&&(n="right"),t({type:"edge",id:r},i&&{labels:i},o&&{record:o},{relation:n,children:e})},s=function(e,n,r,i){return t({type:"path"},n&&{id:n},r&&{labels:r},i&&{record:i},{children:e})},g=function(e){return e.reduce((function(e,t){return e[t.name]=t.value,e}),{})},y=function(e,t){return{type:"property",name:e,value:t}},h=function(e){return{type:"boolean",value:e?"true":"false"}},m=function(e){return{type:"string",value:e}},v=function(e,t){return{type:"tagged",value:t,tag:e}},b=function(e){return{type:"integer",value:String(e)}},O=function(e){return{type:"decimal",value:String(e)}},S=function(e){return{type:"hexadecimal",value:e}},x=function(e){return{type:"octal",value:e}},_=function(e,t){return{type:"measurement",value:String(t),unit:e}},j=function(e){return v(e instanceof Date?e.getFullYear().toString():e,"date")},q=function(e){return v(e instanceof Date?o(e):e,"date")},D=function(e){return v(e instanceof Date?"--"+e.toISOString().slice(5,10):e,"date")},I=function(e){return v(e instanceof Date?o(e):e,"time")},M=function(e,t){return void 0===t&&(t=1),e.flat(t).filter((function(e){return null!==e}))},A={__proto__:null,seq:a,reduce:u,cons:l,UNIT:c,unit:d,node:f,edge:p,path:s,record:g,property:y,boolean:h,string:m,tagged:v,integer:b,decimal:O,hexadecimal:S,octal:x,measurement:_,year:j,date:q,dayOfMonth:D,time:I,flatten:M,default:{seq:a,unit:d,cons:l,path:s,node:f,edge:p,record:g,property:y,boolean:h,string:m,tagged:v,integer:b,decimal:O,hexadecimal:S,octal:x,measurement:_,date:q,time:I,flatten:M}};e.UNIT=c,e.boolean=h,e.cons=l,e.date=q,e.dayOfMonth=D,e.decimal=O,e.default=A,e.edge=p,e.flatten=M,e.hexadecimal=S,e.integer=b,e.measurement=_,e.node=f,e.octal=x,e.path=s,e.property=y,e.record=g,e.reduce=u,e.seq=a,e.string=m,e.tagged=v,e.time=I,e.unit=d,e.year=j,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=gram-builder.umd.production.min.js.map
{
"name": "@gram-data/gram-builder",
"version": "0.1.9",
"version": "0.1.10",
"license": "MIT",

@@ -53,5 +53,5 @@ "main": "dist/index.js",

"dependencies": {
"@gram-data/gram-ast": "^0.1.9"
"@gram-data/gram-ast": "^0.1.10"
},
"gitHead": "43a096296038b010d268f648eb456207f8b1640b",
"gitHead": "0df0d0a9641c40097de62219503f626d3913de9c",
"publishConfig": {

@@ -58,0 +58,0 @@ "access": "public"

@@ -134,3 +134,3 @@ /**

const inner = element.children[0];
if (element.id) {
if (element.id || (element.labels && element.labels.length > 0) || element.record ) {
if (isGramUnit(inner)) {

@@ -137,0 +137,0 @@ element.type = 'node';

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

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