File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 22const UTILS = require ( '../utils' )
33const WOQLPrinter = require ( './woqlPrinter' )
44
5- function convert ( obj ) {
5+
6+ function convert ( obj ) {
67 if ( obj == null ) {
78 return null
89 } else if ( typeof ( obj ) == 'number' ) {
@@ -29,10 +30,13 @@ function convert(obj){
2930 }
3031}
3132
32- function Var ( name ) { this . name = name }
33- function Doc ( obj ) {
34- this . doc = obj
35- this . encoded = convert ( obj )
33+ export function Var ( name ) {
34+ this . name = name
35+ }
36+
37+ export function Doc ( obj ) {
38+ this . doc = obj
39+ this . encoded = convert ( obj )
3640}
3741
3842/**
Original file line number Diff line number Diff line change 22//I HAVE TO REVIEW THE Inheritance and the prototype chain
33const typedef = require ( './typedef' )
44const WOQLQuery = require ( './query/woqlBuilder' )
5-
5+ const { Var } = require ( "./query/woqlCore" )
66/**
77 * @license Apache Version 2
88 * @module WOQL
@@ -1188,9 +1188,10 @@ WOQL.iri = function(val) {
11881188 */
11891189
11901190WOQL . vars = function ( ...varNames ) {
1191- return varNames . map ( item => Var ( item ) )
1191+ return varNames . map ( item => new Var ( item ) )
11921192}
11931193
1194+
11941195/**
11951196 * Gets/Sets woqlClient
11961197 * @param {WOQLClient }
Original file line number Diff line number Diff line change 2929 "babel-loader" : " ^8.0.6" ,
3030 "chai" : " ^4.3.4" ,
3131 "coveralls" : " ^3.1.1" ,
32- "docsify-cli" : " ^4.4.3 " ,
33- "eslint" : " 7.9 .0" ,
32+ "docsify-cli" : " ^4.4.2 " ,
33+ "eslint" : " ^7.32 .0" ,
3434 "eslint-config-prettier" : " 6.11.0" ,
3535 "eslint-plugin-prettier" : " 3.1.3" ,
3636 "html-webpack-plugin" : " ^5.3.1" ,
4242 "typescript" : " ^4.2.3" ,
4343 "webpack" : " ^5.36.2" ,
4444 "webpack-cli" : " ^4.6.0" ,
45- "webpack-dev-server" : " ^3.11.2 "
45+ "webpack-dev-server" : " ^4.6.0 "
4646 },
4747 "scripts" : {
4848 "mkdocs:multi" : " node ./docs/createDocs.js" ,
You can’t perform that action at this time.
0 commit comments