Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
* A **LOT** of code refactoring (coming closer to BETA)
* Updated documentation
+ More asynchronous methods
+ Dynamic data source support
+ `Tag` property to tag any object
+ `Parent` property to navigate a LINQ array tree backwards
+ `Count` supports infinity LINQ arrays
+ `NotOfType` filters by item type
+ `SupportsDynamic` to determine, if the LINQ array tree could support dynamic in theory
+ `ToJson` serializes a LINQ array to a JSON string
+ static `FomJson` deserializes a LINQ array from a JSON string or array
+ static `FomJsonUri` uses JSON from an URI or deserializes a LINQ array from a JSON URI
+ Private property setter methods (`_*`) for extensions
+ Object extension improved (still experimental!)
+ Partition configuration (`LinqArrayExt.PartitionInfo`)
+ Partition column groups for pivot tables (`LinqArrayExt.PivotPartitionColumn`)
+ XML parsing (`LinqArrayExt.FromXml`)
+ Tree node conversion (`LinqArrayExt.FromNode`)
+ Support for indexed DB cursor (`LinqArrayExt.FromCursor` and `LinqArrayExt.FromCursorAsync`)
+ PLINQ (experimental!)
+ Unit tests for `LinqArray` and `LinqArrayExt`
- Many bugs fixed
  • Loading branch information
nd1012 committed Jan 23, 2022
1 parent be8f66b commit 8819b40
Show file tree
Hide file tree
Showing 15 changed files with 3,727 additions and 411 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ jobs:
steps:
- name: Checkout branch
uses: actions/checkout@v2

- name: Minify CSS/JS
uses: nizarmah/[email protected]


- name: Delete not required files
run: |
rm -f ${GITHUB_WORKSPACE}/tests/*.min.js
- name: Update files from external sources
run: |
wget -v -O ${GITHUB_WORKSPACE}/tests/tests.js https://raw.githubusercontent.com/nd1012/JS-TESTS/main/src/tests.js
- name: Commit modified files
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
dev
src/index.html
tests/linq.js
tests/linqext.js
tests/plinq.js
tests/plinqworker.js
202 changes: 190 additions & 12 deletions README.md

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<html lang="en">
<head>
<title>JS-LINQ demonstration</title>
<script src="https://cdn.jsdelivr.net/gh/nd1012/JS-Linq/src/linq.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nd1012/JS-Linq/src/linqext.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nd1012/JS-LINQ/src/plinq.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nd1012/JS-LINQ/src/linq.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nd1012/JS-LINQ/src/linqext.min.js"></script>
<style>
textarea{
font-family:Consolas,Courier;
Expand All @@ -24,8 +25,9 @@
<body>
<form name="demo" action="javascript:execute();">
<h1>JS-LINQ demonstration</h1>
<p>Use this form or open the browser developer tools (F12 or Shift+Ctrl+I) and play with the JavaScipt console directly. The extensions are loaded, too.</p>
<p>Use this form or open the browser developer tools (F12 or Shift+Ctrl+I) and play with the JavaScipt console directly. The extensions and PLINQ are loaded, too.</p>
<h2>JavaScript input</h2>
<p>The script needs to return the output:</p>
<textarea name="input" cols="80" rows="20" required spellcheck="false">// Example CSV data for a pivot table
const exampleData=LinqArrayExt.FromCsv([
'seller,customer,turnover,country',
Expand Down Expand Up @@ -88,7 +90,7 @@ <h2>JavaScript input</h2>
const pivotAsArray=pivot.ToArray();
console.log('Pivot table:');
console.table(pivotAsArray);
alert('Have a look at the JavaScript console (F12 or Shift+Ctrl+I) for a rendered pivot table');
setTimeout(()=>alert('Have a look at the JavaScript console (F12 or Shift+Ctrl+I) for a rendered pivot table'),0);
return pivotAsArray;</textarea>
<p><input type="submit" value="Execute"></p>
<h2>Return value JSON</h2>
Expand Down
Loading

0 comments on commit 8819b40

Please sign in to comment.