File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55.nyc_output /
66.coveralls.yml
77bower_components /
8+ umd /
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ npm install @taozhi8833998/node-sql-parser --registry=https://npm.pkg.github.com
4949Import the JS file in your page:
5050
5151``` javascript
52- < script src= " https://unpkg.com/node-sql-parser@latest /parser.min.js" >< / script>
52+ < script src= " https://unpkg.com/node-sql-parser/umd /parser.min.js" >< / script>
5353```
5454- ` latest ` is the version that could be replaced by a specified version, such as ` 1.7.13 `
5555- ` NodeSQLParser ` object is on ` window `
@@ -63,13 +63,15 @@ Import the JS file in your page:
6363 </head >
6464 <body >
6565 <p ><em >Check console to see the output</em ></p >
66- <script src =" https://unpkg.com/node-sql-parser@latest /parser.min.js" ></script >
66+ <script src =" https://unpkg.com/node-sql-parser/umd /parser.min.js" ></script >
6767 <script >
6868 window .onload = function () {
69- // Example parser
70- const parser = new NodeSQLParser.Parser ()
71- const ast = parser .astify (" select id, name from students where age < 18" )
72- console .log (ast)
69+ // Example parser
70+ const parser = new NodeSQLParser.Parser ()
71+ const ast = parser .astify (" select id, name from students where age < 18" )
72+ console .log (ast)
73+ const sql = parser .sqlify (ast)
74+ console .log (sql)
7375 }
7476 </script >
7577 </body >
Original file line number Diff line number Diff line change 11{
22 "name" : " node-sql-parser" ,
3- "version" : " 1.8.0 " ,
3+ "version" : " 1.8.1 " ,
44 "description" : " simple node sql parser" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
77 "scripts" : {
88 "build" : " rm -rf build/* && mkdir -p build && node build.js && npm run compile" ,
99 "test" : " NODE_ENV=test npm run lint && mocha --recursive --require @babel/register" ,
1010 "compile" : " babel src -d lib" ,
11- "browser" : " browserify -p tinyify index.js -o parser.min.js" ,
11+ "browser" : " browserify -p tinyify index.js -o umd/ parser.min.js" ,
1212 "lint" : " npm run build && eslint src/" ,
1313 "prepublishOnly" : " npm run build && npm run browser" ,
1414 "coverLocal" : " nyc npm run test" ,
3333 "author" : " taozhi8833998 <taozhi8833998@163.com>" ,
3434 "files" : [
3535 " index.js" ,
36- " parser.min.js" ,
3736 " lib/" ,
3837 " index.d.ts" ,
3938 " build/" ,
39+ " umd/" ,
4040 " README.md" ,
4141 " LICENSE"
4242 ],
You can’t perform that action at this time.
0 commit comments