Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modular src #1860

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 25 additions & 22 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
env:
node: true
extends: 'eslint:recommended'
es6: true
rules:
accessor-pairs: error
array-bracket-newline: error
array-bracket-spacing: error
array-callback-return: error
array-element-newline: 0
arrow-body-style: error
arrow-parens: error
arrow-spacing: error
arrow-body-style: 0
arrow-parens: 0
arrow-spacing: 0
block-scoped-var: 'off'
block-spacing: error
brace-style: 0
Expand All @@ -29,7 +29,7 @@ rules:
default-case: error
dot-location: 0
dot-notation: error
eol-last: error
eol-last: 0
eqeqeq: error
for-direction: error
func-call-spacing: error
Expand All @@ -41,7 +41,7 @@ rules:
function-paren-newline: 0
generator-star-spacing: error
getter-return: error
global-require: error
global-require: 0
guard-for-in: error
handle-callback-err: error
id-blacklist: error
Expand All @@ -52,11 +52,11 @@ rules:
indent-legacy: 'off'
init-declarations: 'off'
jsx-quotes: 'off'
key-spacing: error
key-spacing: 0
keyword-spacing:
- error
- after: true
before: true
- 0
- after: 0
- before: 0
line-comment-position: 'off'
linebreak-style: 'off'
lines-around-comment: 'off'
Expand All @@ -81,9 +81,9 @@ rules:
no-bitwise: 0
no-buffer-constructor: error
no-caller: error
no-catch-shadow: error
no-catch-shadow: 0
no-confusing-arrow: error
no-continue: error
no-continue: 0
no-div-regex: error
no-duplicate-imports: error
no-else-return: 'off'
Expand All @@ -108,9 +108,9 @@ rules:
no-labels: error
no-lone-blocks: error
no-lonely-if: 'off'
no-loop-func: error
no-loop-func: 0
no-magic-numbers: 'off'
no-mixed-operators: error
no-mixed-operators: 0
no-mixed-requires: error
no-multi-assign: 'off'
no-multi-spaces: error
Expand Down Expand Up @@ -146,33 +146,33 @@ rules:
no-shadow: 0
no-shadow-restricted-names: error
no-spaced-func: error
no-sync: error
no-sync: 0
no-tabs: 'off'
no-template-curly-in-string: 'off'
no-ternary: 'off'
no-throw-literal: 0
no-trailing-spaces: 0
no-undef-init: error
no-undefined: 'off'
no-underscore-dangle: error
no-underscore-dangle: 0
no-unmodified-loop-condition: error
no-unneeded-ternary: error
no-unused-expressions: error
no-use-before-define: error
no-use-before-define: 0
no-useless-call: error
no-useless-computed-key: error
no-useless-concat: 0
no-useless-constructor: error
no-useless-rename: error
no-useless-return: error
no-var: 'off'
no-void: error
no-void: 0
no-warning-comments: 0
no-whitespace-before-property: 0
no-with: error
nonblock-statement-body-position: 0
object-curly-newline: error
object-curly-spacing: error
object-curly-newline: 0
object-curly-spacing: 0
object-property-newline: 'off'
object-shorthand: 0
one-var: 'off'
Expand All @@ -192,7 +192,7 @@ rules:
prefer-template: 'off'
quote-props: 'off'
quotes: 'off'
radix: error
radix: 0
require-await: error
require-jsdoc: 'off'
rest-spread-spacing: error
Expand All @@ -214,7 +214,7 @@ rules:
- never
switch-colon-spacing: error
symbol-description: error
template-curly-spacing: error
template-curly-spacing: 0
template-tag-spacing: error
unicode-bom:
- error
Expand All @@ -230,3 +230,6 @@ rules:
globals:
- alasql: 1
- yy: 1
parserOptions:
ecmaVersion: 6
sourceType: "module"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"code":"import options from './17options';\r\nvar yy = {};\r\nvar mem = {};\r\nexport default (alasql = function (sql, params, cb, scope) {\r\n params = params || [];\r\n if (typeof importScripts !== 'function' && mem.webworker) {\r\n var id = mem.lastid++;\r\n mem.buffer[id] = cb;\r\n mem.webworker.postMessage({ id: id, sql: sql, params: params });\r\n return;\r\n }\r\n if (arguments.length === 0) {\r\n // Without arguments - Fluent interface\r\n return new yy.Select({\r\n columns: [new yy.Column({ columnid: '*' })],\r\n from: [new yy.ParamValue({ param: 0 })]\r\n });\r\n }\r\n else if (arguments.length === 1) {\r\n // Access promise notation without using `.promise(...)`\r\n if (sql.constructor === Array) {\r\n return alasql.promise(sql);\r\n }\r\n }\r\n // Avoid setting params if not needed even with callback\r\n if (typeof params === 'function') {\r\n scope = cb;\r\n cb = params;\r\n params = [];\r\n }\r\n if (typeof params !== 'object') {\r\n params = [params];\r\n }\r\n // Standard interface\r\n // alasql('#sql');\r\n if (typeof sql === 'string' && sql[0] === '#' && typeof document === 'object') {\r\n sql = document.querySelector(sql).textContent;\r\n }\r\n else if (typeof sql === 'object' && sql instanceof HTMLElement) {\r\n sql = sql.textContent;\r\n }\r\n else if (typeof sql === 'function') {\r\n // to run multiline functions\r\n sql = sql.toString();\r\n sql = (/\\/\\*([\\S\\s]+)\\*\\//m.exec(sql) || [\r\n '',\r\n 'Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function.',\r\n ])[1];\r\n }\r\n // Run SQL\r\n return alasql.exec(sql, params, cb, scope);\r\n});\r\n/**\r\n Current version of alasql\r\n @constant {string}\r\n*/\r\nalasql.version = 'PACKAGE_VERSION_NUMBER';\r\n/**\r\n Debug flag\r\n @type {boolean}\r\n*/\r\nalasql.debug = undefined; // Initial debug variable\r\noptions(alasql);\r\n/*only-for-browser/*\r\nvar require = function(){return null}; // as alasqlparser.js is generated, we can not \"remove\" referenses to\r\nvar __dirname = '';\r\n//*/\r\n"}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"code":"import options from './17options';\r\nvar yy = {};\r\nvar mem = {};\r\nexport default (alasql = function (sql, params, cb, scope) {\r\n params = params || [];\r\n if (typeof importScripts !== 'function' && mem.webworker) {\r\n var id = mem.lastid++;\r\n mem.buffer[id] = cb;\r\n mem.webworker.postMessage({ id: id, sql: sql, params: params });\r\n return;\r\n }\r\n if (arguments.length === 0) {\r\n // Without arguments - Fluent interface\r\n return new yy.Select({\r\n columns: [new yy.Column({ columnid: '*' })],\r\n from: [new yy.ParamValue({ param: 0 })]\r\n });\r\n }\r\n else if (arguments.length === 1) {\r\n // Access promise notation without using `.promise(...)`\r\n if (sql.constructor === Array) {\r\n return alasql.promise(sql);\r\n }\r\n }\r\n // Avoid setting params if not needed even with callback\r\n if (typeof params === 'function') {\r\n scope = cb;\r\n cb = params;\r\n params = [];\r\n }\r\n if (typeof params !== 'object') {\r\n params = [params];\r\n }\r\n // Standard interface\r\n // alasql('#sql');\r\n if (typeof sql === 'string' && sql[0] === '#' && typeof document === 'object') {\r\n sql = document.querySelector(sql).textContent;\r\n }\r\n else if (typeof sql === 'object' && sql instanceof HTMLElement) {\r\n sql = sql.textContent;\r\n }\r\n else if (typeof sql === 'function') {\r\n // to run multiline functions\r\n sql = sql.toString();\r\n sql = (/\\/\\*([\\S\\s]+)\\*\\//m.exec(sql) || [\r\n '',\r\n 'Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function.',\r\n ])[1];\r\n }\r\n // Run SQL\r\n return alasql.exec(sql, params, cb, scope);\r\n});\r\n/**\r\n Current version of alasql\r\n @constant {string}\r\n*/\r\nalasql.version = 'PACKAGE_VERSION_NUMBER';\r\n/**\r\n Debug flag\r\n @type {boolean}\r\n*/\r\nalasql.debug = undefined; // Initial debug variable\r\noptions(alasql);\r\n/*only-for-browser/*\r\nvar require = function(){return null}; // as alasqlparser.js is generated, we can not \"remove\" referenses to\r\nvar __dirname = '';\r\n//*/\r\n"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"code":"//! AlaSQL vPACKAGE_VERSION_NUMBER | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT\r\nvar yy = {};\r\nvar mem = {};\r\nexport default alasql = function (sql, params, cb, scope) {\r\n params = params || [];\r\n if (typeof importScripts !== 'function' && mem.webworker) {\r\n var id = mem.lastid++;\r\n mem.buffer[id] = cb;\r\n mem.webworker.postMessage({ id: id, sql: sql, params: params });\r\n return;\r\n }\r\n if (arguments.length === 0) {\r\n // Without arguments - Fluent interface\r\n return new yy.Select({\r\n columns: [new yy.Column({ columnid: '*' })],\r\n from: [new yy.ParamValue({ param: 0 })]\r\n });\r\n }\r\n else if (arguments.length === 1) {\r\n // Access promise notation without using `.promise(...)`\r\n if (sql.constructor === Array) {\r\n return alasql.promise(sql);\r\n }\r\n }\r\n // Avoid setting params if not needed even with callback\r\n if (typeof params === 'function') {\r\n scope = cb;\r\n cb = params;\r\n params = [];\r\n }\r\n if (typeof params !== 'object') {\r\n params = [params];\r\n }\r\n // Standard interface\r\n // alasql('#sql');\r\n if (typeof sql === 'string' && sql[0] === '#' && typeof document === \"object\") {\r\n sql = document.querySelector(sql).textContent;\r\n }\r\n else if (typeof sql === 'object' && sql instanceof HTMLElement) {\r\n sql = sql.textContent;\r\n }\r\n else if (typeof sql === 'function') {\r\n // to run multiline functions\r\n sql = sql.toString();\r\n sql = (/\\/\\*([\\S\\s]+)\\*\\//m.exec(sql) || ['', 'Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function.'])[1];\r\n }\r\n // Run SQL\t\t\t\r\n return alasql.exec(sql, params, cb, scope);\r\n};\r\n/**\r\n Current version of alasql\r\n @constant {string}\r\n*/\r\nalasql.version = 'PACKAGE_VERSION_NUMBER';\r\n/**\r\n Debug flag\r\n @type {boolean}\r\n*/\r\nalasql.debug = undefined; // Initial debug variable\r\n/*only-for-browser/*\r\nvar require = function(){return null}; // as alasqlparser.js is generated, we can not \"remove\" referenses to\r\nvar __dirname = '';\r\n//*/\r\n"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"code":"import options from './17options';\r\nvar mem = {};\r\nvar yy = {};\r\nvar alasql = function (sql, params, cb, scope) {\r\n params = params || [];\r\n if (typeof importScripts !== 'function' && mem.webworker) {\r\n var id = mem.lastid++;\r\n mem.buffer[id] = cb;\r\n mem.webworker.postMessage({ id: id, sql: sql, params: params });\r\n return;\r\n }\r\n if (arguments.length === 0) {\r\n // Without arguments - Fluent interface\r\n return new yy.Select({\r\n columns: [new yy.Column({ columnid: '*' })],\r\n from: [new yy.ParamValue({ param: 0 })]\r\n });\r\n }\r\n else if (arguments.length === 1) {\r\n // Access promise notation without using `.promise(...)`\r\n if (sql.constructor === Array) {\r\n return alasql.promise(sql);\r\n }\r\n }\r\n // Avoid setting params if not needed even with callback\r\n if (typeof params === 'function') {\r\n scope = cb;\r\n cb = params;\r\n params = [];\r\n }\r\n if (typeof params !== 'object') {\r\n params = [params];\r\n }\r\n // Standard interface\r\n // alasql('#sql');\r\n /*only-for-browser/*\r\n if (typeof sql === 'string' && sql[0] === '#' && typeof document === 'object') {\r\n sql = document.querySelector(sql).textContent;\r\n } else if (typeof sql === 'object' && sql instanceof HTMLElement) {\r\n sql = sql.textContent;\r\n } else //*/\r\n if (typeof sql === 'function') {\r\n // to run multiline functions\r\n sql = sql.toString();\r\n sql = (/\\/\\*([\\S\\s]+)\\*\\//m.exec(sql) || [\r\n '',\r\n 'Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function.',\r\n ])[1];\r\n }\r\n // Run SQL\r\n return alasql.exec(sql, params, cb, scope);\r\n};\r\n/**\r\n Current version of alasql\r\n @constant {string}\r\n*/\r\nalasql.version = 'PACKAGE_VERSION_NUMBER';\r\n/**\r\n Debug flag\r\n @type {boolean}\r\n*/\r\nalasql.debug = undefined; // Initial debug variable\r\noptions(alasql);\r\n/*only-for-browser/*\r\nvar require = function(){return null}; // as alasqlparser.js is generated, we can not \"remove\" referenses to\r\nvar __dirname = '';\r\n//*/\r\n/*only-for-browser/*\r\nif(utils.isCordova || utils.isMeteorServer || utils.isNode ){\r\n console.warn('It looks like you are using the browser version of AlaSQL. Please use the alasql.fs.js file instead.')\r\n}\r\n//*/\r\n// Create default database\r\n//! new Database(\"alasql\");\r\n// Set default database\r\nalasql.use(\"alasql\");\r\nexport default alasql;\r\n"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"code":"import options from './17options';\r\nvar yy = {};\r\nvar mem = {};\r\nexport default (alasql = function (sql, params, cb, scope) {\r\n params = params || [];\r\n if (typeof importScripts !== 'function' && mem.webworker) {\r\n var id = mem.lastid++;\r\n mem.buffer[id] = cb;\r\n mem.webworker.postMessage({ id: id, sql: sql, params: params });\r\n return;\r\n }\r\n if (arguments.length === 0) {\r\n // Without arguments - Fluent interface\r\n return new yy.Select({\r\n columns: [new yy.Column({ columnid: '*' })],\r\n from: [new yy.ParamValue({ param: 0 })]\r\n });\r\n }\r\n else if (arguments.length === 1) {\r\n // Access promise notation without using `.promise(...)`\r\n if (sql.constructor === Array) {\r\n return alasql.promise(sql);\r\n }\r\n }\r\n // Avoid setting params if not needed even with callback\r\n if (typeof params === 'function') {\r\n scope = cb;\r\n cb = params;\r\n params = [];\r\n }\r\n if (typeof params !== 'object') {\r\n params = [params];\r\n }\r\n // Standard interface\r\n // alasql('#sql');\r\n if (typeof sql === 'string' && sql[0] === '#' && typeof document === 'object') {\r\n sql = document.querySelector(sql).textContent;\r\n }\r\n else if (typeof sql === 'object' && sql instanceof HTMLElement) {\r\n sql = sql.textContent;\r\n }\r\n else if (typeof sql === 'function') {\r\n // to run multiline functions\r\n sql = sql.toString();\r\n sql = (/\\/\\*([\\S\\s]+)\\*\\//m.exec(sql) || [\r\n '',\r\n 'Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function.',\r\n ])[1];\r\n }\r\n // Run SQL\r\n return alasql.exec(sql, params, cb, scope);\r\n});\r\n/**\r\n Current version of alasql\r\n @constant {string}\r\n*/\r\nalasql.version = 'PACKAGE_VERSION_NUMBER';\r\n/**\r\n Debug flag\r\n @type {boolean}\r\n*/\r\nalasql.debug = undefined; // Initial debug variable\r\noptions(alasql);\r\n/*only-for-browser/*\r\nvar require = function(){return null}; // as alasqlparser.js is generated, we can not \"remove\" referenses to\r\nvar __dirname = '';\r\n//*/\r\n"}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"code":"import options from './17options';\r\nvar mem = {};\r\nvar yy = {};\r\nvar alasql = function (sql, params, cb, scope) {\r\n params = params || [];\r\n if (typeof importScripts !== 'function' && mem.webworker) {\r\n var id = mem.lastid++;\r\n mem.buffer[id] = cb;\r\n mem.webworker.postMessage({ id: id, sql: sql, params: params });\r\n return;\r\n }\r\n if (arguments.length === 0) {\r\n // Without arguments - Fluent interface\r\n return new yy.Select({\r\n columns: [new yy.Column({ columnid: '*' })],\r\n from: [new yy.ParamValue({ param: 0 })]\r\n });\r\n }\r\n else if (arguments.length === 1) {\r\n // Access promise notation without using `.promise(...)`\r\n if (sql.constructor === Array) {\r\n return alasql.promise(sql);\r\n }\r\n }\r\n // Avoid setting params if not needed even with callback\r\n if (typeof params === 'function') {\r\n scope = cb;\r\n cb = params;\r\n params = [];\r\n }\r\n if (typeof params !== 'object') {\r\n params = [params];\r\n }\r\n // Standard interface\r\n // alasql('#sql');\r\n /*only-for-browser/*\r\n if (typeof sql === 'string' && sql[0] === '#' && typeof document === 'object') {\r\n sql = document.querySelector(sql).textContent;\r\n } else if (typeof sql === 'object' && sql instanceof HTMLElement) {\r\n sql = sql.textContent;\r\n } else //*/\r\n if (typeof sql === 'function') {\r\n // to run multiline functions\r\n sql = sql.toString();\r\n sql = (/\\/\\*([\\S\\s]+)\\*\\//m.exec(sql) || [\r\n '',\r\n 'Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function.',\r\n ])[1];\r\n }\r\n // Run SQL\r\n return alasql.exec(sql, params, cb, scope);\r\n};\r\n/**\r\n Current version of alasql\r\n @constant {string}\r\n*/\r\nalasql.version = 'PACKAGE_VERSION_NUMBER';\r\n/**\r\n Debug flag\r\n @type {boolean}\r\n*/\r\nalasql.debug = undefined; // Initial debug variable\r\noptions(alasql);\r\n/*only-for-browser/*\r\nvar require = function(){return null}; // as alasqlparser.js is generated, we can not \"remove\" referenses to\r\nvar __dirname = '';\r\n//*/\r\n/*only-for-browser/*\r\nif(utils.isCordova || utils.isMeteorServer || utils.isNode ){\r\n console.warn('It looks like you are using the browser version of AlaSQL. Please use the alasql.fs.js file instead.')\r\n}\r\n//*/\r\n// Create default database\r\n//! new Database(\"alasql\");\r\n// Set default database\r\nalasql.use(\"alasql\");\r\nexport default alasql;\r\n"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading