littlewing 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,10 +5,10 @@ A minimal, high-performance arithmetic expression language with a complete lexer
5
5
  ## Features
6
6
 
7
7
  - 🚀 **Minimal & Fast** - O(n) algorithms throughout (lexer, parser, executor)
8
- - 📦 **Tiny Bundle** - 4.19 KB gzipped, zero dependencies
8
+ - 📦 **Tiny Bundle** - 4.20 KB gzipped, zero dependencies
9
9
  - 🌐 **Browser Ready** - 100% ESM, no Node.js APIs
10
10
  - 🔒 **Type-Safe** - Strict TypeScript with full type coverage
11
- - ✅ **Thoroughly Tested** - 128 tests, 98.61% line coverage
11
+ - ✅ **Thoroughly Tested** - 136 tests, 99.52% line coverage
12
12
  - 📐 **Pure Arithmetic** - Numbers-only, clean semantics
13
13
  - 🎯 **Clean API** - Intuitive dual API (class-based + functional)
14
14
  - 📝 **Well Documented** - Complete JSDoc and examples
@@ -495,15 +495,15 @@ const dueTimes = tasks.map((task) => ({
495
495
 
496
496
  ### Bundle Size
497
497
 
498
- - **4.19 KB gzipped** (19.60 KB raw)
498
+ - **4.20 KB gzipped** (19.72 KB raw)
499
499
  - Zero dependencies
500
500
  - Includes optimizer for constant folding
501
501
  - Fully tree-shakeable
502
502
 
503
503
  ### Test Coverage
504
504
 
505
- - **128 tests** with **98.61% line coverage**
506
- - **98.52% function coverage**
505
+ - **136 tests** with **99.52% line coverage**
506
+ - **99.26% function coverage**
507
507
  - All edge cases handled
508
508
  - Type-safe execution guaranteed
509
509
 
package/dist/index.js CHANGED
@@ -704,6 +704,12 @@ function optimize(node) {
704
704
  argument
705
705
  };
706
706
  }
707
+ if (isFunctionCall(node)) {
708
+ return {
709
+ ...node,
710
+ arguments: node.arguments.map((arg) => optimize(arg))
711
+ };
712
+ }
707
713
  return node;
708
714
  }
709
715
  function evaluateBinaryOp(operator, left, right) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "littlewing",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "A minimal, high-performance arithmetic expression language with lexer, parser, and executor. Optimized for browsers with zero dependencies and type-safe execution.",
5
5
  "keywords": [
6
6
  "arithmetic",