@mojir/lits 2.2.3 → 2.3.0

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.
Files changed (65) hide show
  1. package/README.md +1 -8
  2. package/dist/cli/cli.js +1264 -909
  3. package/dist/cli/src/Lits/Lits.d.ts +8 -2
  4. package/dist/cli/src/builtin/bindingNode.d.ts +2 -1
  5. package/dist/cli/src/builtin/interface.d.ts +3 -2
  6. package/dist/cli/src/builtin/modules/number-theory/sequences/index.d.ts +2 -1
  7. package/dist/cli/src/evaluator/functionExecutors.d.ts +2 -1
  8. package/dist/cli/src/evaluator/index.d.ts +3 -2
  9. package/dist/cli/src/evaluator/interface.d.ts +3 -2
  10. package/dist/cli/src/utils/maybePromise.d.ts +54 -0
  11. package/dist/full.esm.js +1 -1
  12. package/dist/full.esm.js.map +1 -1
  13. package/dist/full.js +1 -1
  14. package/dist/full.js.map +1 -1
  15. package/dist/index.esm.js +1 -1
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/lits.iife.js +1 -1
  20. package/dist/lits.iife.js.map +1 -1
  21. package/dist/modules/assert.esm.js +1 -1
  22. package/dist/modules/assert.esm.js.map +1 -1
  23. package/dist/modules/assert.js +1 -1
  24. package/dist/modules/assert.js.map +1 -1
  25. package/dist/modules/collection.esm.js +1 -1
  26. package/dist/modules/collection.esm.js.map +1 -1
  27. package/dist/modules/collection.js +1 -1
  28. package/dist/modules/collection.js.map +1 -1
  29. package/dist/modules/grid.esm.js +1 -1
  30. package/dist/modules/grid.esm.js.map +1 -1
  31. package/dist/modules/grid.js +1 -1
  32. package/dist/modules/grid.js.map +1 -1
  33. package/dist/modules/number-theory.esm.js +1 -1
  34. package/dist/modules/number-theory.esm.js.map +1 -1
  35. package/dist/modules/number-theory.js +1 -1
  36. package/dist/modules/number-theory.js.map +1 -1
  37. package/dist/modules/sequence.esm.js +1 -1
  38. package/dist/modules/sequence.esm.js.map +1 -1
  39. package/dist/modules/sequence.js +1 -1
  40. package/dist/modules/sequence.js.map +1 -1
  41. package/dist/modules/src/Lits/Lits.d.ts +8 -2
  42. package/dist/modules/src/builtin/bindingNode.d.ts +2 -1
  43. package/dist/modules/src/builtin/interface.d.ts +3 -2
  44. package/dist/modules/src/builtin/modules/number-theory/sequences/index.d.ts +2 -1
  45. package/dist/modules/src/evaluator/functionExecutors.d.ts +2 -1
  46. package/dist/modules/src/evaluator/index.d.ts +3 -2
  47. package/dist/modules/src/evaluator/interface.d.ts +3 -2
  48. package/dist/modules/src/utils/maybePromise.d.ts +54 -0
  49. package/dist/modules/vector.esm.js +1 -1
  50. package/dist/modules/vector.esm.js.map +1 -1
  51. package/dist/modules/vector.js +1 -1
  52. package/dist/modules/vector.js.map +1 -1
  53. package/dist/src/Lits/Lits.d.ts +8 -2
  54. package/dist/src/builtin/bindingNode.d.ts +2 -1
  55. package/dist/src/builtin/interface.d.ts +3 -2
  56. package/dist/src/builtin/modules/number-theory/sequences/index.d.ts +2 -1
  57. package/dist/src/evaluator/functionExecutors.d.ts +2 -1
  58. package/dist/src/evaluator/index.d.ts +3 -2
  59. package/dist/src/evaluator/interface.d.ts +3 -2
  60. package/dist/src/utils/maybePromise.d.ts +54 -0
  61. package/dist/testFramework.esm.js +1 -1
  62. package/dist/testFramework.esm.js.map +1 -1
  63. package/dist/testFramework.js +1 -1
  64. package/dist/testFramework.js.map +1 -1
  65. package/package.json +1 -1
package/README.md CHANGED
@@ -4,20 +4,13 @@ A functional language with algebraic notation and JavaScript interoperability.
4
4
 
5
5
  Try it in the [Lits Playground](https://mojir.github.io/lits/).
6
6
 
7
- ## TODO
8
- Fix playground, it looks a bit funky under modules.
9
- Also fix Header, were name, module and category should be presented
10
-
11
- Model cli as module, create a new bundle that include this module. The existing full bundle should not include this.
12
-
13
-
14
-
15
7
  ## Features
16
8
 
17
9
  - **Pure functional language** - Variables cannot be changed, ensuring predictable behavior and easier reasoning about code
18
10
  - **Expression-based syntax** - Everything in Lits is an expression that returns a value; there are no statements, making the language highly composable and consistent
19
11
  - **Fully serializable** - Every value returned from Lits evaluation, including functions and regexps, is serializable as JSON
20
12
  - **JavaScript interoperability** - JavaScript values and functions can easily be exposed in Lits
13
+ - **Transparent async support** - When native JavaScript functions return Promises, Lits automatically handles them — no async/await syntax needed in Lits code
21
14
  - **First-class functions** - Functions are treated as values that can be passed to other functions
22
15
  - **Algebraic notation** - All operators can be used as functions, and functions that take two parameters can be used as operators
23
16
  - **Comprehensive standard library** - Rich set of functions for collections, math, strings, and more