File tree Expand file tree Collapse file tree 10 files changed +1206
-3280
lines changed Open diff view settings
Expand file tree Collapse file tree 10 files changed +1206
-3280
lines changed Open diff view settings
Original file line number Diff line number Diff line change 11{
2- "extends": "nelson",
2+ "extends": [
3+ "standard"
4+ ],
35 "env": {
4- "jest": true
6+ "mocha": true
7+ },
8+ "rules": {
9+ "indent": "off",
10+ "quotes": ["error", "double"]
511 }
612}
Original file line number Diff line number Diff line change 11gitignore
2+ .vscode
23
34# Logs
45logs
Original file line number Diff line number Diff line change 77 "contributors" : [
88 " Viliam Simko <viliam.simko@gmail.com> (https://github.com/vsimko)"
99 ],
10- "main" : " src/index.js " ,
10+ "main" : " src/index" ,
1111 "scripts" : {
12- "test" : " jest " ,
12+ "test" : " mocha " ,
1313 "lint" : " eslint ." ,
14+ "release" : " standard-version" ,
1415 "up" : " cd test && docker-compose up -d" ,
1516 "down" : " cd test && docker-compose down" ,
16- "ps" : " cd test && docker-compose ps"
17+ "ps" : " cd test && docker-compose ps" ,
18+ "git-cred" : " git config credential.helper store"
1719 },
1820 "repository" : {
1921 "type" : " git" ,
2931 "ramda" : " ^0.25.0"
3032 },
3133 "devDependencies" : {
32- "eslint" : " ^3.13.1" ,
33- "eslint-config-nelson" : " ^0.2.0" ,
34- "eslint-plugin-import" : " ^2.2.0" ,
35- "jest" : " 23.0.0" ,
36- "jest-cli" : " 23.0.0"
37- },
38- "jest" : {
39- "testEnvironment" : " node"
34+ "@types/chai" : " ^4.1.4" ,
35+ "@types/mocha" : " ^5.2.3" ,
36+ "chai" : " ^4.1.2" ,
37+ "eslint" : " ^4.19.1" ,
38+ "eslint-config-standard" : " ^11.0.0" ,
39+ "eslint-plugin-import" : " ^2.12.0" ,
40+ "eslint-plugin-node" : " ^6.0.1" ,
41+ "eslint-plugin-promise" : " ^3.8.0" ,
42+ "eslint-plugin-standard" : " ^3.1.0" ,
43+ "mocha" : " ^5.2.0" ,
44+ "standard-version" : " ^4.4.0"
4045 }
4146}
Original file line number Diff line number Diff line change 1- const { compose, merge } = require ( ' ramda' ) ;
2- const { SPARQL } = require ( ' ./sparql' ) ;
1+ const { compose, merge } = require ( " ramda" )
2+ const { SPARQL } = require ( " ./sparql" )
33const {
44 deleteSparql,
55 querySparql,
66 updateSparql,
77 ...otherFun
8- } = require ( ' ./middleware' ) ;
8+ } = require ( " ./middleware" )
99
1010const defaultOptions = {
11- host : ' localhost' ,
11+ host : " localhost" ,
1212 port : 9999 ,
13- namespace : 'kb' ,
14- blazename : ' bigdata' , // it was 'blazegraph' before
15- } ;
13+ namespace : "kb" ,
14+ blazename : " bigdata" // it was 'blazegraph' before
15+ }
1616
1717const prepareBlazeUrl = compose (
1818 ( { host, port, namespace, blazename } ) =>
1919 `http://${ host } :${ port } /${ blazename } /namespace/${ namespace } /sparql` ,
2020 merge ( defaultOptions ) ,
2121 merge ( { } )
22- ) ;
22+ )
2323
2424// helper function that wraps other functons as template literals
25- const tmpl = fn => ( str , ...vars ) => fn ( SPARQL ( str , ...vars ) ) ;
25+ const tmpl = fn => ( str , ...vars ) => fn ( SPARQL ( str , ...vars ) )
2626
2727module . exports = {
2828 prepareBlazeUrl,
2929 SELECT : tmpl ( querySparql ) ,
3030 UPDATE : tmpl ( updateSparql ) ,
3131 DELETE : tmpl ( deleteSparql ) ,
32- ...otherFun ,
33- } ;
32+ ...otherFun
33+ }
You can’t perform that action at this time.
0 commit comments