Skip to content

Commit

Permalink
Update to Oozaru 0.6.3
Browse files Browse the repository at this point in the history
Yay! It's pig-feeding time!
(don't tell anyone but I triggered the porkocalypse)
  • Loading branch information
fatcerberus committed Dec 22, 2023
1 parent e4a77a6 commit cd5e9bc
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a href="."><img alt="Sphere logo" src="logo-dark.svg" width=48 height=48></a>
<div id="title">
<span id="name">Oozaru</span> <span id="gameTitle">Sphere for the Web</span><br>
<span id="copyright">&copy; 2023 Fat Cerberus</span>
<span id="copyright">&copy; 2024 Fat Cerberus</span>
</div>
</nav>
<div id="tv">
Expand Down
2 changes: 1 addition & 1 deletion oozaru.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Oozaru",
"publisher": "Fat Cerberus",
"version": "0.6.2"
"version": "0.6.3"
}
22 changes: 12 additions & 10 deletions runtime/from.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Query

all(predicate)
{
return this.run$(new FindOp((it, key, memo) => !predicate(it) ? (memo.value = false, true) : false, true));
return this.run$(new FindOp((it, key, memo) => !predicate(it, key) ? (memo.value = false, true) : false, true));
}

allIn(values)
Expand All @@ -127,7 +127,7 @@ class Query

any(predicate)
{
return this.run$(new FindOp((it, key, memo) => predicate(it) ? (memo.value = true, true) : false, false));
return this.run$(new FindOp((it, key, memo) => predicate(it, key) ? (memo.value = true, true) : false, false));
}

anyIn(values)
Expand Down Expand Up @@ -470,9 +470,9 @@ class AggregateOp extends QueryOp
return this.accumulator;
}

step(value)
step(value, source, key)
{
this.accumulator = this.aggregator(this.accumulator, value);
this.accumulator = this.aggregator(this.accumulator, value, key);
return true;
}
}
Expand Down Expand Up @@ -601,10 +601,11 @@ class LastOp extends QueryOp
return this.lastValue;
}

step(value)
step(value, source, key)
{
if (this.predicate(value))
if (this.predicate(value, key))
this.lastValue = value;
return true;
}
}

Expand Down Expand Up @@ -730,9 +731,9 @@ class SelectManyOp extends QueryOp
super.initialize();
}

step(value)
step(value, source, key)
{
const itemSource = this.selector(value);
const itemSource = this.selector(value, key);
return feedMeSeymour(this.nextOp, itemSource);
}
}
Expand All @@ -756,13 +757,14 @@ class SingleOp extends QueryOp
return this.lastValue;
}

step(value)
step(value, source, key)
{
if (this.predicate(value)) {
if (this.predicate(value, key)) {
if (++this.count > 1)
throw new Error("Query would return too many results");
this.lastValue = value;
}
return true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/audialis.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/data-stream.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/deque.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/fido.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/fontso.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/galileo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/game.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/input-engine.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/job-queue.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/pegasus.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/utilities.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Oozaru: Sphere for the Web
* Copyright (c) 2015-2023, Fat Cerberus
* Copyright (c) 2016-2024, Fat Cerberus
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down

0 comments on commit cd5e9bc

Please sign in to comment.