@danielsimonjr/mathts-expression 0.7.0 → 0.7.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +204 -0
  2. package/dist/index.js +634 -171
  3. package/package.json +59 -59
package/dist/index.d.ts CHANGED
@@ -750,208 +750,412 @@ declare const embeddedDocs: {
750
750
  seealso: string[];
751
751
  };
752
752
  speedOfLight: {
753
+ name: string;
754
+ category: string;
755
+ syntax: string[];
753
756
  description: string;
754
757
  examples: string[];
758
+ seealso: never[];
755
759
  };
756
760
  gravitationConstant: {
761
+ name: string;
762
+ category: string;
763
+ syntax: string[];
757
764
  description: string;
758
765
  examples: string[];
766
+ seealso: never[];
759
767
  };
760
768
  planckConstant: {
769
+ name: string;
770
+ category: string;
771
+ syntax: string[];
761
772
  description: string;
762
773
  examples: string[];
774
+ seealso: never[];
763
775
  };
764
776
  reducedPlanckConstant: {
777
+ name: string;
778
+ category: string;
779
+ syntax: string[];
765
780
  description: string;
766
781
  examples: string[];
782
+ seealso: never[];
767
783
  };
768
784
  magneticConstant: {
785
+ name: string;
786
+ category: string;
787
+ syntax: string[];
769
788
  description: string;
770
789
  examples: string[];
790
+ seealso: never[];
771
791
  };
772
792
  electricConstant: {
793
+ name: string;
794
+ category: string;
795
+ syntax: string[];
773
796
  description: string;
774
797
  examples: string[];
798
+ seealso: never[];
775
799
  };
776
800
  vacuumImpedance: {
801
+ name: string;
802
+ category: string;
803
+ syntax: string[];
777
804
  description: string;
778
805
  examples: string[];
806
+ seealso: never[];
779
807
  };
780
808
  coulomb: {
809
+ name: string;
810
+ category: string;
811
+ syntax: string[];
781
812
  description: string;
782
813
  examples: string[];
814
+ seealso: never[];
783
815
  };
784
816
  coulombConstant: {
817
+ name: string;
818
+ category: string;
819
+ syntax: string[];
785
820
  description: string;
786
821
  examples: string[];
822
+ seealso: never[];
787
823
  };
788
824
  elementaryCharge: {
825
+ name: string;
826
+ category: string;
827
+ syntax: string[];
789
828
  description: string;
790
829
  examples: string[];
830
+ seealso: never[];
791
831
  };
792
832
  bohrMagneton: {
833
+ name: string;
834
+ category: string;
835
+ syntax: string[];
793
836
  description: string;
794
837
  examples: string[];
838
+ seealso: never[];
795
839
  };
796
840
  conductanceQuantum: {
841
+ name: string;
842
+ category: string;
843
+ syntax: string[];
797
844
  description: string;
798
845
  examples: string[];
846
+ seealso: never[];
799
847
  };
800
848
  inverseConductanceQuantum: {
849
+ name: string;
850
+ category: string;
851
+ syntax: string[];
801
852
  description: string;
802
853
  examples: string[];
854
+ seealso: never[];
803
855
  };
804
856
  magneticFluxQuantum: {
857
+ name: string;
858
+ category: string;
859
+ syntax: string[];
805
860
  description: string;
806
861
  examples: string[];
862
+ seealso: never[];
807
863
  };
808
864
  nuclearMagneton: {
865
+ name: string;
866
+ category: string;
867
+ syntax: string[];
809
868
  description: string;
810
869
  examples: string[];
870
+ seealso: never[];
811
871
  };
812
872
  klitzing: {
873
+ name: string;
874
+ category: string;
875
+ syntax: string[];
813
876
  description: string;
814
877
  examples: string[];
878
+ seealso: never[];
815
879
  };
816
880
  bohrRadius: {
881
+ name: string;
882
+ category: string;
883
+ syntax: string[];
817
884
  description: string;
818
885
  examples: string[];
886
+ seealso: never[];
819
887
  };
820
888
  classicalElectronRadius: {
889
+ name: string;
890
+ category: string;
891
+ syntax: string[];
821
892
  description: string;
822
893
  examples: string[];
894
+ seealso: never[];
823
895
  };
824
896
  electronMass: {
897
+ name: string;
898
+ category: string;
899
+ syntax: string[];
825
900
  description: string;
826
901
  examples: string[];
902
+ seealso: never[];
827
903
  };
828
904
  fermiCoupling: {
905
+ name: string;
906
+ category: string;
907
+ syntax: string[];
829
908
  description: string;
830
909
  examples: string[];
910
+ seealso: never[];
831
911
  };
832
912
  fineStructure: {
913
+ name: string;
914
+ category: string;
915
+ syntax: string[];
833
916
  description: string;
834
917
  examples: string[];
918
+ seealso: never[];
835
919
  };
836
920
  hartreeEnergy: {
921
+ name: string;
922
+ category: string;
923
+ syntax: string[];
837
924
  description: string;
838
925
  examples: string[];
926
+ seealso: never[];
839
927
  };
840
928
  protonMass: {
929
+ name: string;
930
+ category: string;
931
+ syntax: string[];
841
932
  description: string;
842
933
  examples: string[];
934
+ seealso: never[];
843
935
  };
844
936
  deuteronMass: {
937
+ name: string;
938
+ category: string;
939
+ syntax: string[];
845
940
  description: string;
846
941
  examples: string[];
942
+ seealso: never[];
847
943
  };
848
944
  neutronMass: {
945
+ name: string;
946
+ category: string;
947
+ syntax: string[];
849
948
  description: string;
850
949
  examples: string[];
950
+ seealso: never[];
851
951
  };
852
952
  quantumOfCirculation: {
953
+ name: string;
954
+ category: string;
955
+ syntax: string[];
853
956
  description: string;
854
957
  examples: string[];
958
+ seealso: never[];
855
959
  };
856
960
  rydberg: {
961
+ name: string;
962
+ category: string;
963
+ syntax: string[];
857
964
  description: string;
858
965
  examples: string[];
966
+ seealso: never[];
859
967
  };
860
968
  thomsonCrossSection: {
969
+ name: string;
970
+ category: string;
971
+ syntax: string[];
861
972
  description: string;
862
973
  examples: string[];
974
+ seealso: never[];
863
975
  };
864
976
  weakMixingAngle: {
977
+ name: string;
978
+ category: string;
979
+ syntax: string[];
865
980
  description: string;
866
981
  examples: string[];
982
+ seealso: never[];
867
983
  };
868
984
  efimovFactor: {
985
+ name: string;
986
+ category: string;
987
+ syntax: string[];
869
988
  description: string;
870
989
  examples: string[];
990
+ seealso: never[];
871
991
  };
872
992
  atomicMass: {
993
+ name: string;
994
+ category: string;
995
+ syntax: string[];
873
996
  description: string;
874
997
  examples: string[];
998
+ seealso: never[];
875
999
  };
876
1000
  avogadro: {
1001
+ name: string;
1002
+ category: string;
1003
+ syntax: string[];
877
1004
  description: string;
878
1005
  examples: string[];
1006
+ seealso: never[];
879
1007
  };
880
1008
  boltzmann: {
1009
+ name: string;
1010
+ category: string;
1011
+ syntax: string[];
881
1012
  description: string;
882
1013
  examples: string[];
1014
+ seealso: never[];
883
1015
  };
884
1016
  faraday: {
1017
+ name: string;
1018
+ category: string;
1019
+ syntax: string[];
885
1020
  description: string;
886
1021
  examples: string[];
1022
+ seealso: never[];
887
1023
  };
888
1024
  firstRadiation: {
1025
+ name: string;
1026
+ category: string;
1027
+ syntax: string[];
889
1028
  description: string;
890
1029
  examples: string[];
1030
+ seealso: never[];
891
1031
  };
892
1032
  loschmidt: {
1033
+ name: string;
1034
+ category: string;
1035
+ syntax: string[];
893
1036
  description: string;
894
1037
  examples: string[];
1038
+ seealso: never[];
895
1039
  };
896
1040
  gasConstant: {
1041
+ name: string;
1042
+ category: string;
1043
+ syntax: string[];
897
1044
  description: string;
898
1045
  examples: string[];
1046
+ seealso: never[];
899
1047
  };
900
1048
  molarPlanckConstant: {
1049
+ name: string;
1050
+ category: string;
1051
+ syntax: string[];
901
1052
  description: string;
902
1053
  examples: string[];
1054
+ seealso: never[];
903
1055
  };
904
1056
  molarVolume: {
1057
+ name: string;
1058
+ category: string;
1059
+ syntax: string[];
905
1060
  description: string;
906
1061
  examples: string[];
1062
+ seealso: never[];
907
1063
  };
908
1064
  sackurTetrode: {
1065
+ name: string;
1066
+ category: string;
1067
+ syntax: string[];
909
1068
  description: string;
910
1069
  examples: string[];
1070
+ seealso: never[];
911
1071
  };
912
1072
  secondRadiation: {
1073
+ name: string;
1074
+ category: string;
1075
+ syntax: string[];
913
1076
  description: string;
914
1077
  examples: string[];
1078
+ seealso: never[];
915
1079
  };
916
1080
  stefanBoltzmann: {
1081
+ name: string;
1082
+ category: string;
1083
+ syntax: string[];
917
1084
  description: string;
918
1085
  examples: string[];
1086
+ seealso: never[];
919
1087
  };
920
1088
  wienDisplacement: {
1089
+ name: string;
1090
+ category: string;
1091
+ syntax: string[];
921
1092
  description: string;
922
1093
  examples: string[];
1094
+ seealso: never[];
923
1095
  };
924
1096
  molarMass: {
1097
+ name: string;
1098
+ category: string;
1099
+ syntax: string[];
925
1100
  description: string;
926
1101
  examples: string[];
1102
+ seealso: never[];
927
1103
  };
928
1104
  molarMassC12: {
1105
+ name: string;
1106
+ category: string;
1107
+ syntax: string[];
929
1108
  description: string;
930
1109
  examples: string[];
1110
+ seealso: never[];
931
1111
  };
932
1112
  gravity: {
1113
+ name: string;
1114
+ category: string;
1115
+ syntax: string[];
933
1116
  description: string;
934
1117
  examples: string[];
1118
+ seealso: never[];
935
1119
  };
936
1120
  planckLength: {
1121
+ name: string;
1122
+ category: string;
1123
+ syntax: string[];
937
1124
  description: string;
938
1125
  examples: string[];
1126
+ seealso: never[];
939
1127
  };
940
1128
  planckMass: {
1129
+ name: string;
1130
+ category: string;
1131
+ syntax: string[];
941
1132
  description: string;
942
1133
  examples: string[];
1134
+ seealso: never[];
943
1135
  };
944
1136
  planckTime: {
1137
+ name: string;
1138
+ category: string;
1139
+ syntax: string[];
945
1140
  description: string;
946
1141
  examples: string[];
1142
+ seealso: never[];
947
1143
  };
948
1144
  planckCharge: {
1145
+ name: string;
1146
+ category: string;
1147
+ syntax: string[];
949
1148
  description: string;
950
1149
  examples: string[];
1150
+ seealso: never[];
951
1151
  };
952
1152
  planckTemperature: {
1153
+ name: string;
1154
+ category: string;
1155
+ syntax: string[];
953
1156
  description: string;
954
1157
  examples: string[];
1158
+ seealso: never[];
955
1159
  };
956
1160
  derivative: {
957
1161
  name: string;
package/dist/index.js CHANGED
@@ -5,11 +5,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __commonJS = (cb, mod) => function __require() {
8
- try {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- } catch (e) {
11
- throw mod = 0, e;
12
- }
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
9
  };
14
10
  var __copyProps = (to, from, except, desc) => {
15
11
  if (from && typeof from === "object" || typeof from === "function") {
@@ -655,6 +651,75 @@ import {
655
651
  toPrecision
656
652
  } from "@danielsimonjr/mathts-core/internal";
657
653
 
654
+ // src/utils/customs.ts
655
+ function getSafeProperty(object, prop) {
656
+ if (isSafeProperty(object, prop)) {
657
+ return object[prop];
658
+ }
659
+ if (typeof object[prop] === "function" && isSafeMethod(object, prop)) {
660
+ throw new Error('Cannot access method "' + String(prop) + '" as a property');
661
+ }
662
+ throw new Error('No access to property "' + String(prop) + '"');
663
+ }
664
+ function setSafeProperty(object, prop, value) {
665
+ if (isSafeProperty(object, prop)) {
666
+ object[prop] = value;
667
+ return value;
668
+ }
669
+ throw new Error('No access to property "' + String(prop) + '"');
670
+ }
671
+ function isSafeProperty(object, prop) {
672
+ if (!isPlainObject(object) && !Array.isArray(object)) {
673
+ return false;
674
+ }
675
+ if (hasOwnProperty(safeNativeProperties, prop)) {
676
+ return true;
677
+ }
678
+ if (prop in Object.prototype) {
679
+ return false;
680
+ }
681
+ if (prop in Function.prototype) {
682
+ return false;
683
+ }
684
+ return true;
685
+ }
686
+ function getSafeMethod(object, method) {
687
+ if (!isSafeMethod(object, method)) {
688
+ throw new Error('No access to method "' + String(method) + '"');
689
+ }
690
+ return object[method];
691
+ }
692
+ function isSafeMethod(object, method) {
693
+ if (object === null || object === void 0 || typeof object[method] !== "function") {
694
+ return false;
695
+ }
696
+ if (hasOwnProperty(object, method) && Object.getPrototypeOf && method in Object.getPrototypeOf(object)) {
697
+ return false;
698
+ }
699
+ if (hasOwnProperty(safeNativeMethods, method)) {
700
+ return true;
701
+ }
702
+ if (method in Object.prototype) {
703
+ return false;
704
+ }
705
+ if (method in Function.prototype) {
706
+ return false;
707
+ }
708
+ return true;
709
+ }
710
+ function isPlainObject(object) {
711
+ return typeof object === "object" && !!object && object.constructor === Object;
712
+ }
713
+ var safeNativeProperties = {
714
+ length: true,
715
+ name: true
716
+ };
717
+ var safeNativeMethods = {
718
+ toString: true,
719
+ valueOf: true,
720
+ toLocaleString: true
721
+ };
722
+
658
723
  // src/parse.ts
659
724
  var name = "parse";
660
725
  var dependencies = [
@@ -1696,7 +1761,7 @@ var createParse = /* @__PURE__ */ factory(
1696
1761
  throw createSyntaxError(state, "Colon : expected after object key");
1697
1762
  }
1698
1763
  getToken(state);
1699
- properties2[key] = parseAssignment(state);
1764
+ setSafeProperty(properties2, key, parseAssignment(state));
1700
1765
  }
1701
1766
  } while (state.token === ",");
1702
1767
  if (state.token !== "}") {
@@ -1987,6 +2052,516 @@ var createHelpClass = /* @__PURE__ */ factory(
1987
2052
  { isClass: true }
1988
2053
  );
1989
2054
 
2055
+ // src/embeddedDocs/physicalConstants/speedOfLight.ts
2056
+ var speedOfLightDocs = {
2057
+ name: "speedOfLight",
2058
+ category: "Physical Constants",
2059
+ syntax: ["speedOfLight"],
2060
+ description: "Speed of light in vacuum",
2061
+ examples: ["speedOfLight"],
2062
+ seealso: []
2063
+ };
2064
+
2065
+ // src/embeddedDocs/physicalConstants/gravitationConstant.ts
2066
+ var gravitationConstantDocs = {
2067
+ name: "gravitationConstant",
2068
+ category: "Physical Constants",
2069
+ syntax: ["gravitationConstant"],
2070
+ description: "Newtonian constant of gravitation",
2071
+ examples: ["gravitationConstant"],
2072
+ seealso: []
2073
+ };
2074
+
2075
+ // src/embeddedDocs/physicalConstants/planckConstant.ts
2076
+ var planckConstantDocs = {
2077
+ name: "planckConstant",
2078
+ category: "Physical Constants",
2079
+ syntax: ["planckConstant"],
2080
+ description: "Planck constant",
2081
+ examples: ["planckConstant"],
2082
+ seealso: []
2083
+ };
2084
+
2085
+ // src/embeddedDocs/physicalConstants/reducedPlanckConstant.ts
2086
+ var reducedPlanckConstantDocs = {
2087
+ name: "reducedPlanckConstant",
2088
+ category: "Physical Constants",
2089
+ syntax: ["reducedPlanckConstant"],
2090
+ description: "Reduced Planck constant",
2091
+ examples: ["reducedPlanckConstant"],
2092
+ seealso: []
2093
+ };
2094
+
2095
+ // src/embeddedDocs/physicalConstants/magneticConstant.ts
2096
+ var magneticConstantDocs = {
2097
+ name: "magneticConstant",
2098
+ category: "Physical Constants",
2099
+ syntax: ["magneticConstant"],
2100
+ description: "Magnetic constant (vacuum permeability)",
2101
+ examples: ["magneticConstant"],
2102
+ seealso: []
2103
+ };
2104
+
2105
+ // src/embeddedDocs/physicalConstants/electricConstant.ts
2106
+ var electricConstantDocs = {
2107
+ name: "electricConstant",
2108
+ category: "Physical Constants",
2109
+ syntax: ["electricConstant"],
2110
+ description: "Electric constant (vacuum permeability)",
2111
+ examples: ["electricConstant"],
2112
+ seealso: []
2113
+ };
2114
+
2115
+ // src/embeddedDocs/physicalConstants/vacuumImpedance.ts
2116
+ var vacuumImpedanceDocs = {
2117
+ name: "vacuumImpedance",
2118
+ category: "Physical Constants",
2119
+ syntax: ["vacuumImpedance"],
2120
+ description: "Characteristic impedance of vacuum",
2121
+ examples: ["vacuumImpedance"],
2122
+ seealso: []
2123
+ };
2124
+
2125
+ // src/embeddedDocs/physicalConstants/coulomb.ts
2126
+ var coulombDocs = {
2127
+ name: "coulomb",
2128
+ category: "Physical Constants",
2129
+ syntax: ["coulomb"],
2130
+ description: "Coulomb's constant. Deprecated in favor of coulombConstant",
2131
+ examples: ["coulomb"],
2132
+ seealso: []
2133
+ };
2134
+
2135
+ // src/embeddedDocs/physicalConstants/coulombConstant.ts
2136
+ var coulombConstantDocs = {
2137
+ name: "coulombConstant",
2138
+ category: "Physical Constants",
2139
+ syntax: ["coulombConstant"],
2140
+ description: "Coulomb's constant",
2141
+ examples: ["coulombConstant"],
2142
+ seealso: []
2143
+ };
2144
+
2145
+ // src/embeddedDocs/physicalConstants/elementaryCharge.ts
2146
+ var elementaryChargeDocs = {
2147
+ name: "elementaryCharge",
2148
+ category: "Physical Constants",
2149
+ syntax: ["elementaryCharge"],
2150
+ description: "Elementary charge",
2151
+ examples: ["elementaryCharge"],
2152
+ seealso: []
2153
+ };
2154
+
2155
+ // src/embeddedDocs/physicalConstants/bohrMagneton.ts
2156
+ var bohrMagnetonDocs = {
2157
+ name: "bohrMagneton",
2158
+ category: "Physical Constants",
2159
+ syntax: ["bohrMagneton"],
2160
+ description: "Bohr magneton",
2161
+ examples: ["bohrMagneton"],
2162
+ seealso: []
2163
+ };
2164
+
2165
+ // src/embeddedDocs/physicalConstants/conductanceQuantum.ts
2166
+ var conductanceQuantumDocs = {
2167
+ name: "conductanceQuantum",
2168
+ category: "Physical Constants",
2169
+ syntax: ["conductanceQuantum"],
2170
+ description: "Conductance quantum",
2171
+ examples: ["conductanceQuantum"],
2172
+ seealso: []
2173
+ };
2174
+
2175
+ // src/embeddedDocs/physicalConstants/inverseConductanceQuantum.ts
2176
+ var inverseConductanceQuantumDocs = {
2177
+ name: "inverseConductanceQuantum",
2178
+ category: "Physical Constants",
2179
+ syntax: ["inverseConductanceQuantum"],
2180
+ description: "Inverse conductance quantum",
2181
+ examples: ["inverseConductanceQuantum"],
2182
+ seealso: []
2183
+ };
2184
+
2185
+ // src/embeddedDocs/physicalConstants/magneticFluxQuantum.ts
2186
+ var magneticFluxQuantumDocs = {
2187
+ name: "magneticFluxQuantum",
2188
+ category: "Physical Constants",
2189
+ syntax: ["magneticFluxQuantum"],
2190
+ description: "Magnetic flux quantum",
2191
+ examples: ["magneticFluxQuantum"],
2192
+ seealso: []
2193
+ };
2194
+
2195
+ // src/embeddedDocs/physicalConstants/nuclearMagneton.ts
2196
+ var nuclearMagnetonDocs = {
2197
+ name: "nuclearMagneton",
2198
+ category: "Physical Constants",
2199
+ syntax: ["nuclearMagneton"],
2200
+ description: "Nuclear magneton",
2201
+ examples: ["nuclearMagneton"],
2202
+ seealso: []
2203
+ };
2204
+
2205
+ // src/embeddedDocs/physicalConstants/klitzing.ts
2206
+ var klitzingDocs = {
2207
+ name: "klitzing",
2208
+ category: "Physical Constants",
2209
+ syntax: ["klitzing"],
2210
+ description: "Von Klitzing constant",
2211
+ examples: ["klitzing"],
2212
+ seealso: []
2213
+ };
2214
+
2215
+ // src/embeddedDocs/physicalConstants/bohrRadius.ts
2216
+ var bohrRadiusDocs = {
2217
+ name: "bohrRadius",
2218
+ category: "Physical Constants",
2219
+ syntax: ["bohrRadius"],
2220
+ description: "Bohr radius",
2221
+ examples: ["bohrRadius"],
2222
+ seealso: []
2223
+ };
2224
+
2225
+ // src/embeddedDocs/physicalConstants/classicalElectronRadius.ts
2226
+ var classicalElectronRadiusDocs = {
2227
+ name: "classicalElectronRadius",
2228
+ category: "Physical Constants",
2229
+ syntax: ["classicalElectronRadius"],
2230
+ description: "Classical electron radius",
2231
+ examples: ["classicalElectronRadius"],
2232
+ seealso: []
2233
+ };
2234
+
2235
+ // src/embeddedDocs/physicalConstants/electronMass.ts
2236
+ var electronMassDocs = {
2237
+ name: "electronMass",
2238
+ category: "Physical Constants",
2239
+ syntax: ["electronMass"],
2240
+ description: "Electron mass",
2241
+ examples: ["electronMass"],
2242
+ seealso: []
2243
+ };
2244
+
2245
+ // src/embeddedDocs/physicalConstants/fermiCoupling.ts
2246
+ var fermiCouplingDocs = {
2247
+ name: "fermiCoupling",
2248
+ category: "Physical Constants",
2249
+ syntax: ["fermiCoupling"],
2250
+ description: "Fermi coupling constant",
2251
+ examples: ["fermiCoupling"],
2252
+ seealso: []
2253
+ };
2254
+
2255
+ // src/embeddedDocs/physicalConstants/fineStructure.ts
2256
+ var fineStructureDocs = {
2257
+ name: "fineStructure",
2258
+ category: "Physical Constants",
2259
+ syntax: ["fineStructure"],
2260
+ description: "Fine-structure constant",
2261
+ examples: ["fineStructure"],
2262
+ seealso: []
2263
+ };
2264
+
2265
+ // src/embeddedDocs/physicalConstants/hartreeEnergy.ts
2266
+ var hartreeEnergyDocs = {
2267
+ name: "hartreeEnergy",
2268
+ category: "Physical Constants",
2269
+ syntax: ["hartreeEnergy"],
2270
+ description: "Hartree energy",
2271
+ examples: ["hartreeEnergy"],
2272
+ seealso: []
2273
+ };
2274
+
2275
+ // src/embeddedDocs/physicalConstants/protonMass.ts
2276
+ var protonMassDocs = {
2277
+ name: "protonMass",
2278
+ category: "Physical Constants",
2279
+ syntax: ["protonMass"],
2280
+ description: "Proton mass",
2281
+ examples: ["protonMass"],
2282
+ seealso: []
2283
+ };
2284
+
2285
+ // src/embeddedDocs/physicalConstants/deuteronMass.ts
2286
+ var deuteronMassDocs = {
2287
+ name: "deuteronMass",
2288
+ category: "Physical Constants",
2289
+ syntax: ["deuteronMass"],
2290
+ description: "Deuteron Mass",
2291
+ examples: ["deuteronMass"],
2292
+ seealso: []
2293
+ };
2294
+
2295
+ // src/embeddedDocs/physicalConstants/neutronMass.ts
2296
+ var neutronMassDocs = {
2297
+ name: "neutronMass",
2298
+ category: "Physical Constants",
2299
+ syntax: ["neutronMass"],
2300
+ description: "Neutron mass",
2301
+ examples: ["neutronMass"],
2302
+ seealso: []
2303
+ };
2304
+
2305
+ // src/embeddedDocs/physicalConstants/quantumOfCirculation.ts
2306
+ var quantumOfCirculationDocs = {
2307
+ name: "quantumOfCirculation",
2308
+ category: "Physical Constants",
2309
+ syntax: ["quantumOfCirculation"],
2310
+ description: "Quantum of circulation",
2311
+ examples: ["quantumOfCirculation"],
2312
+ seealso: []
2313
+ };
2314
+
2315
+ // src/embeddedDocs/physicalConstants/rydberg.ts
2316
+ var rydbergDocs = {
2317
+ name: "rydberg",
2318
+ category: "Physical Constants",
2319
+ syntax: ["rydberg"],
2320
+ description: "Rydberg constant",
2321
+ examples: ["rydberg"],
2322
+ seealso: []
2323
+ };
2324
+
2325
+ // src/embeddedDocs/physicalConstants/thomsonCrossSection.ts
2326
+ var thomsonCrossSectionDocs = {
2327
+ name: "thomsonCrossSection",
2328
+ category: "Physical Constants",
2329
+ syntax: ["thomsonCrossSection"],
2330
+ description: "Thomson cross section",
2331
+ examples: ["thomsonCrossSection"],
2332
+ seealso: []
2333
+ };
2334
+
2335
+ // src/embeddedDocs/physicalConstants/weakMixingAngle.ts
2336
+ var weakMixingAngleDocs = {
2337
+ name: "weakMixingAngle",
2338
+ category: "Physical Constants",
2339
+ syntax: ["weakMixingAngle"],
2340
+ description: "Weak mixing angle",
2341
+ examples: ["weakMixingAngle"],
2342
+ seealso: []
2343
+ };
2344
+
2345
+ // src/embeddedDocs/physicalConstants/efimovFactor.ts
2346
+ var efimovFactorDocs = {
2347
+ name: "efimovFactor",
2348
+ category: "Physical Constants",
2349
+ syntax: ["efimovFactor"],
2350
+ description: "Efimov factor",
2351
+ examples: ["efimovFactor"],
2352
+ seealso: []
2353
+ };
2354
+
2355
+ // src/embeddedDocs/physicalConstants/atomicMass.ts
2356
+ var atomicMassDocs = {
2357
+ name: "atomicMass",
2358
+ category: "Physical Constants",
2359
+ syntax: ["atomicMass"],
2360
+ description: "Atomic mass constant",
2361
+ examples: ["atomicMass"],
2362
+ seealso: []
2363
+ };
2364
+
2365
+ // src/embeddedDocs/physicalConstants/avogadro.ts
2366
+ var avogadroDocs = {
2367
+ name: "avogadro",
2368
+ category: "Physical Constants",
2369
+ syntax: ["avogadro"],
2370
+ description: "Avogadro's number",
2371
+ examples: ["avogadro"],
2372
+ seealso: []
2373
+ };
2374
+
2375
+ // src/embeddedDocs/physicalConstants/boltzmann.ts
2376
+ var boltzmannDocs = {
2377
+ name: "boltzmann",
2378
+ category: "Physical Constants",
2379
+ syntax: ["boltzmann"],
2380
+ description: "Boltzmann constant",
2381
+ examples: ["boltzmann"],
2382
+ seealso: []
2383
+ };
2384
+
2385
+ // src/embeddedDocs/physicalConstants/faraday.ts
2386
+ var faradayDocs = {
2387
+ name: "faraday",
2388
+ category: "Physical Constants",
2389
+ syntax: ["faraday"],
2390
+ description: "Faraday constant",
2391
+ examples: ["faraday"],
2392
+ seealso: []
2393
+ };
2394
+
2395
+ // src/embeddedDocs/physicalConstants/firstRadiation.ts
2396
+ var firstRadiationDocs = {
2397
+ name: "firstRadiation",
2398
+ category: "Physical Constants",
2399
+ syntax: ["firstRadiation"],
2400
+ description: "First radiation constant",
2401
+ examples: ["firstRadiation"],
2402
+ seealso: []
2403
+ };
2404
+
2405
+ // src/embeddedDocs/physicalConstants/loschmidt.ts
2406
+ var loschmidtDocs = {
2407
+ name: "loschmidt",
2408
+ category: "Physical Constants",
2409
+ syntax: ["loschmidt"],
2410
+ description: "Loschmidt constant at T=273.15 K and p=101.325 kPa",
2411
+ examples: ["loschmidt"],
2412
+ seealso: []
2413
+ };
2414
+
2415
+ // src/embeddedDocs/physicalConstants/gasConstant.ts
2416
+ var gasConstantDocs = {
2417
+ name: "gasConstant",
2418
+ category: "Physical Constants",
2419
+ syntax: ["gasConstant"],
2420
+ description: "Gas constant",
2421
+ examples: ["gasConstant"],
2422
+ seealso: []
2423
+ };
2424
+
2425
+ // src/embeddedDocs/physicalConstants/molarPlanckConstant.ts
2426
+ var molarPlanckConstantDocs = {
2427
+ name: "molarPlanckConstant",
2428
+ category: "Physical Constants",
2429
+ syntax: ["molarPlanckConstant"],
2430
+ description: "Molar Planck constant",
2431
+ examples: ["molarPlanckConstant"],
2432
+ seealso: []
2433
+ };
2434
+
2435
+ // src/embeddedDocs/physicalConstants/molarVolume.ts
2436
+ var molarVolumeDocs = {
2437
+ name: "molarVolume",
2438
+ category: "Physical Constants",
2439
+ syntax: ["molarVolume"],
2440
+ description: "Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",
2441
+ examples: ["molarVolume"],
2442
+ seealso: []
2443
+ };
2444
+
2445
+ // src/embeddedDocs/physicalConstants/sackurTetrode.ts
2446
+ var sackurTetrodeDocs = {
2447
+ name: "sackurTetrode",
2448
+ category: "Physical Constants",
2449
+ syntax: ["sackurTetrode"],
2450
+ description: "Sackur-Tetrode constant at T=1 K and p=101.325 kPa",
2451
+ examples: ["sackurTetrode"],
2452
+ seealso: []
2453
+ };
2454
+
2455
+ // src/embeddedDocs/physicalConstants/secondRadiation.ts
2456
+ var secondRadiationDocs = {
2457
+ name: "secondRadiation",
2458
+ category: "Physical Constants",
2459
+ syntax: ["secondRadiation"],
2460
+ description: "Second radiation constant",
2461
+ examples: ["secondRadiation"],
2462
+ seealso: []
2463
+ };
2464
+
2465
+ // src/embeddedDocs/physicalConstants/stefanBoltzmann.ts
2466
+ var stefanBoltzmannDocs = {
2467
+ name: "stefanBoltzmann",
2468
+ category: "Physical Constants",
2469
+ syntax: ["stefanBoltzmann"],
2470
+ description: "Stefan-Boltzmann constant",
2471
+ examples: ["stefanBoltzmann"],
2472
+ seealso: []
2473
+ };
2474
+
2475
+ // src/embeddedDocs/physicalConstants/wienDisplacement.ts
2476
+ var wienDisplacementDocs = {
2477
+ name: "wienDisplacement",
2478
+ category: "Physical Constants",
2479
+ syntax: ["wienDisplacement"],
2480
+ description: "Wien displacement law constant",
2481
+ examples: ["wienDisplacement"],
2482
+ seealso: []
2483
+ };
2484
+
2485
+ // src/embeddedDocs/physicalConstants/molarMass.ts
2486
+ var molarMassDocs = {
2487
+ name: "molarMass",
2488
+ category: "Physical Constants",
2489
+ syntax: ["molarMass"],
2490
+ description: "Molar mass constant",
2491
+ examples: ["molarMass"],
2492
+ seealso: []
2493
+ };
2494
+
2495
+ // src/embeddedDocs/physicalConstants/molarMassC12.ts
2496
+ var molarMassC12Docs = {
2497
+ name: "molarMassC12",
2498
+ category: "Physical Constants",
2499
+ syntax: ["molarMassC12"],
2500
+ description: "Molar mass constant of carbon-12",
2501
+ examples: ["molarMassC12"],
2502
+ seealso: []
2503
+ };
2504
+
2505
+ // src/embeddedDocs/physicalConstants/gravity.ts
2506
+ var gravityDocs = {
2507
+ name: "gravity",
2508
+ category: "Physical Constants",
2509
+ syntax: ["gravity"],
2510
+ description: "Standard acceleration of gravity (standard acceleration of free-fall on Earth)",
2511
+ examples: ["gravity"],
2512
+ seealso: []
2513
+ };
2514
+
2515
+ // src/embeddedDocs/physicalConstants/planckLength.ts
2516
+ var planckLengthDocs = {
2517
+ name: "planckLength",
2518
+ category: "Physical Constants",
2519
+ syntax: ["planckLength"],
2520
+ description: "Planck length",
2521
+ examples: ["planckLength"],
2522
+ seealso: []
2523
+ };
2524
+
2525
+ // src/embeddedDocs/physicalConstants/planckMass.ts
2526
+ var planckMassDocs = {
2527
+ name: "planckMass",
2528
+ category: "Physical Constants",
2529
+ syntax: ["planckMass"],
2530
+ description: "Planck mass",
2531
+ examples: ["planckMass"],
2532
+ seealso: []
2533
+ };
2534
+
2535
+ // src/embeddedDocs/physicalConstants/planckTime.ts
2536
+ var planckTimeDocs = {
2537
+ name: "planckTime",
2538
+ category: "Physical Constants",
2539
+ syntax: ["planckTime"],
2540
+ description: "Planck time",
2541
+ examples: ["planckTime"],
2542
+ seealso: []
2543
+ };
2544
+
2545
+ // src/embeddedDocs/physicalConstants/planckCharge.ts
2546
+ var planckChargeDocs = {
2547
+ name: "planckCharge",
2548
+ category: "Physical Constants",
2549
+ syntax: ["planckCharge"],
2550
+ description: "Planck charge",
2551
+ examples: ["planckCharge"],
2552
+ seealso: []
2553
+ };
2554
+
2555
+ // src/embeddedDocs/physicalConstants/planckTemperature.ts
2556
+ var planckTemperatureDocs = {
2557
+ name: "planckTemperature",
2558
+ category: "Physical Constants",
2559
+ syntax: ["planckTemperature"],
2560
+ description: "Planck temperature",
2561
+ examples: ["planckTemperature"],
2562
+ seealso: []
2563
+ };
2564
+
1990
2565
  // src/embeddedDocs/constants/e.ts
1991
2566
  var eDocs = {
1992
2567
  name: "e",
@@ -6289,102 +6864,59 @@ var embeddedDocs = {
6289
6864
  true: trueDocs,
6290
6865
  version: versionDocs,
6291
6866
  // physical constants
6292
- // TODO: more detailed docs for physical constants
6293
- speedOfLight: { description: "Speed of light in vacuum", examples: ["speedOfLight"] },
6294
- gravitationConstant: {
6295
- description: "Newtonian constant of gravitation",
6296
- examples: ["gravitationConstant"]
6297
- },
6298
- planckConstant: { description: "Planck constant", examples: ["planckConstant"] },
6299
- reducedPlanckConstant: {
6300
- description: "Reduced Planck constant",
6301
- examples: ["reducedPlanckConstant"]
6302
- },
6303
- magneticConstant: {
6304
- description: "Magnetic constant (vacuum permeability)",
6305
- examples: ["magneticConstant"]
6306
- },
6307
- electricConstant: {
6308
- description: "Electric constant (vacuum permeability)",
6309
- examples: ["electricConstant"]
6310
- },
6311
- vacuumImpedance: {
6312
- description: "Characteristic impedance of vacuum",
6313
- examples: ["vacuumImpedance"]
6314
- },
6315
- coulomb: {
6316
- description: "Coulomb's constant. Deprecated in favor of coulombConstant",
6317
- examples: ["coulombConstant"]
6318
- },
6319
- coulombConstant: { description: "Coulomb's constant", examples: ["coulombConstant"] },
6320
- elementaryCharge: { description: "Elementary charge", examples: ["elementaryCharge"] },
6321
- bohrMagneton: { description: "Bohr magneton", examples: ["bohrMagneton"] },
6322
- conductanceQuantum: { description: "Conductance quantum", examples: ["conductanceQuantum"] },
6323
- inverseConductanceQuantum: {
6324
- description: "Inverse conductance quantum",
6325
- examples: ["inverseConductanceQuantum"]
6326
- },
6867
+ speedOfLight: speedOfLightDocs,
6868
+ gravitationConstant: gravitationConstantDocs,
6869
+ planckConstant: planckConstantDocs,
6870
+ reducedPlanckConstant: reducedPlanckConstantDocs,
6871
+ magneticConstant: magneticConstantDocs,
6872
+ electricConstant: electricConstantDocs,
6873
+ vacuumImpedance: vacuumImpedanceDocs,
6874
+ coulomb: coulombDocs,
6875
+ coulombConstant: coulombConstantDocs,
6876
+ elementaryCharge: elementaryChargeDocs,
6877
+ bohrMagneton: bohrMagnetonDocs,
6878
+ conductanceQuantum: conductanceQuantumDocs,
6879
+ inverseConductanceQuantum: inverseConductanceQuantumDocs,
6327
6880
  // josephson: {description: 'Josephson constant', examples: ['josephson']},
6328
- magneticFluxQuantum: { description: "Magnetic flux quantum", examples: ["magneticFluxQuantum"] },
6329
- nuclearMagneton: { description: "Nuclear magneton", examples: ["nuclearMagneton"] },
6330
- klitzing: { description: "Von Klitzing constant", examples: ["klitzing"] },
6331
- bohrRadius: { description: "Bohr radius", examples: ["bohrRadius"] },
6332
- classicalElectronRadius: {
6333
- description: "Classical electron radius",
6334
- examples: ["classicalElectronRadius"]
6335
- },
6336
- electronMass: { description: "Electron mass", examples: ["electronMass"] },
6337
- fermiCoupling: { description: "Fermi coupling constant", examples: ["fermiCoupling"] },
6338
- fineStructure: { description: "Fine-structure constant", examples: ["fineStructure"] },
6339
- hartreeEnergy: { description: "Hartree energy", examples: ["hartreeEnergy"] },
6340
- protonMass: { description: "Proton mass", examples: ["protonMass"] },
6341
- deuteronMass: { description: "Deuteron Mass", examples: ["deuteronMass"] },
6342
- neutronMass: { description: "Neutron mass", examples: ["neutronMass"] },
6343
- quantumOfCirculation: {
6344
- description: "Quantum of circulation",
6345
- examples: ["quantumOfCirculation"]
6346
- },
6347
- rydberg: { description: "Rydberg constant", examples: ["rydberg"] },
6348
- thomsonCrossSection: { description: "Thomson cross section", examples: ["thomsonCrossSection"] },
6349
- weakMixingAngle: { description: "Weak mixing angle", examples: ["weakMixingAngle"] },
6350
- efimovFactor: { description: "Efimov factor", examples: ["efimovFactor"] },
6351
- atomicMass: { description: "Atomic mass constant", examples: ["atomicMass"] },
6352
- avogadro: { description: "Avogadro's number", examples: ["avogadro"] },
6353
- boltzmann: { description: "Boltzmann constant", examples: ["boltzmann"] },
6354
- faraday: { description: "Faraday constant", examples: ["faraday"] },
6355
- firstRadiation: { description: "First radiation constant", examples: ["firstRadiation"] },
6356
- loschmidt: {
6357
- description: "Loschmidt constant at T=273.15 K and p=101.325 kPa",
6358
- examples: ["loschmidt"]
6359
- },
6360
- gasConstant: { description: "Gas constant", examples: ["gasConstant"] },
6361
- molarPlanckConstant: { description: "Molar Planck constant", examples: ["molarPlanckConstant"] },
6362
- molarVolume: {
6363
- description: "Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",
6364
- examples: ["molarVolume"]
6365
- },
6366
- sackurTetrode: {
6367
- description: "Sackur-Tetrode constant at T=1 K and p=101.325 kPa",
6368
- examples: ["sackurTetrode"]
6369
- },
6370
- secondRadiation: { description: "Second radiation constant", examples: ["secondRadiation"] },
6371
- stefanBoltzmann: { description: "Stefan-Boltzmann constant", examples: ["stefanBoltzmann"] },
6372
- wienDisplacement: {
6373
- description: "Wien displacement law constant",
6374
- examples: ["wienDisplacement"]
6375
- },
6881
+ magneticFluxQuantum: magneticFluxQuantumDocs,
6882
+ nuclearMagneton: nuclearMagnetonDocs,
6883
+ klitzing: klitzingDocs,
6884
+ bohrRadius: bohrRadiusDocs,
6885
+ classicalElectronRadius: classicalElectronRadiusDocs,
6886
+ electronMass: electronMassDocs,
6887
+ fermiCoupling: fermiCouplingDocs,
6888
+ fineStructure: fineStructureDocs,
6889
+ hartreeEnergy: hartreeEnergyDocs,
6890
+ protonMass: protonMassDocs,
6891
+ deuteronMass: deuteronMassDocs,
6892
+ neutronMass: neutronMassDocs,
6893
+ quantumOfCirculation: quantumOfCirculationDocs,
6894
+ rydberg: rydbergDocs,
6895
+ thomsonCrossSection: thomsonCrossSectionDocs,
6896
+ weakMixingAngle: weakMixingAngleDocs,
6897
+ efimovFactor: efimovFactorDocs,
6898
+ atomicMass: atomicMassDocs,
6899
+ avogadro: avogadroDocs,
6900
+ boltzmann: boltzmannDocs,
6901
+ faraday: faradayDocs,
6902
+ firstRadiation: firstRadiationDocs,
6903
+ loschmidt: loschmidtDocs,
6904
+ gasConstant: gasConstantDocs,
6905
+ molarPlanckConstant: molarPlanckConstantDocs,
6906
+ molarVolume: molarVolumeDocs,
6907
+ sackurTetrode: sackurTetrodeDocs,
6908
+ secondRadiation: secondRadiationDocs,
6909
+ stefanBoltzmann: stefanBoltzmannDocs,
6910
+ wienDisplacement: wienDisplacementDocs,
6376
6911
  // spectralRadiance: {description: 'First radiation constant for spectral radiance', examples: ['spectralRadiance']},
6377
- molarMass: { description: "Molar mass constant", examples: ["molarMass"] },
6378
- molarMassC12: { description: "Molar mass constant of carbon-12", examples: ["molarMassC12"] },
6379
- gravity: {
6380
- description: "Standard acceleration of gravity (standard acceleration of free-fall on Earth)",
6381
- examples: ["gravity"]
6382
- },
6383
- planckLength: { description: "Planck length", examples: ["planckLength"] },
6384
- planckMass: { description: "Planck mass", examples: ["planckMass"] },
6385
- planckTime: { description: "Planck time", examples: ["planckTime"] },
6386
- planckCharge: { description: "Planck charge", examples: ["planckCharge"] },
6387
- planckTemperature: { description: "Planck temperature", examples: ["planckTemperature"] },
6912
+ molarMass: molarMassDocs,
6913
+ molarMassC12: molarMassC12Docs,
6914
+ gravity: gravityDocs,
6915
+ planckLength: planckLengthDocs,
6916
+ planckMass: planckMassDocs,
6917
+ planckTime: planckTimeDocs,
6918
+ planckCharge: planckChargeDocs,
6919
+ planckTemperature: planckTemperatureDocs,
6388
6920
  // functions - algebra
6389
6921
  derivative: derivativeDocs,
6390
6922
  lsolve: lsolveDocs,
@@ -6724,75 +7256,6 @@ var embeddedDocs = {
6724
7256
  gammainc: gammaincDocs
6725
7257
  };
6726
7258
 
6727
- // src/utils/customs.ts
6728
- function getSafeProperty(object, prop) {
6729
- if (isSafeProperty(object, prop)) {
6730
- return object[prop];
6731
- }
6732
- if (typeof object[prop] === "function" && isSafeMethod(object, prop)) {
6733
- throw new Error('Cannot access method "' + String(prop) + '" as a property');
6734
- }
6735
- throw new Error('No access to property "' + String(prop) + '"');
6736
- }
6737
- function setSafeProperty(object, prop, value) {
6738
- if (isSafeProperty(object, prop)) {
6739
- object[prop] = value;
6740
- return value;
6741
- }
6742
- throw new Error('No access to property "' + String(prop) + '"');
6743
- }
6744
- function isSafeProperty(object, prop) {
6745
- if (!isPlainObject(object) && !Array.isArray(object)) {
6746
- return false;
6747
- }
6748
- if (hasOwnProperty(safeNativeProperties, prop)) {
6749
- return true;
6750
- }
6751
- if (prop in Object.prototype) {
6752
- return false;
6753
- }
6754
- if (prop in Function.prototype) {
6755
- return false;
6756
- }
6757
- return true;
6758
- }
6759
- function getSafeMethod(object, method) {
6760
- if (!isSafeMethod(object, method)) {
6761
- throw new Error('No access to method "' + String(method) + '"');
6762
- }
6763
- return object[method];
6764
- }
6765
- function isSafeMethod(object, method) {
6766
- if (object === null || object === void 0 || typeof object[method] !== "function") {
6767
- return false;
6768
- }
6769
- if (hasOwnProperty(object, method) && Object.getPrototypeOf && method in Object.getPrototypeOf(object)) {
6770
- return false;
6771
- }
6772
- if (hasOwnProperty(safeNativeMethods, method)) {
6773
- return true;
6774
- }
6775
- if (method in Object.prototype) {
6776
- return false;
6777
- }
6778
- if (method in Function.prototype) {
6779
- return false;
6780
- }
6781
- return true;
6782
- }
6783
- function isPlainObject(object) {
6784
- return typeof object === "object" && !!object && object.constructor === Object;
6785
- }
6786
- var safeNativeProperties = {
6787
- length: true,
6788
- name: true
6789
- };
6790
- var safeNativeMethods = {
6791
- toString: true,
6792
- valueOf: true,
6793
- toLocaleString: true
6794
- };
6795
-
6796
7259
  // src/compiler/compile.ts
6797
7260
  function compile(node, mathScope) {
6798
7261
  const evalFn = compileNode(node, mathScope, {});
@@ -10477,14 +10940,14 @@ var createObjectNode = /* @__PURE__ */ factory(
10477
10940
  const stringifiedKey = stringify(key);
10478
10941
  const parsedKey = JSON.parse(stringifiedKey);
10479
10942
  const prop = getSafeProperty(this.properties, key);
10480
- evalEntries[parsedKey] = prop._compile(math, argNames);
10943
+ setSafeProperty(evalEntries, parsedKey, prop._compile(math, argNames));
10481
10944
  }
10482
10945
  }
10483
10946
  return function evalObjectNode(scope, args, context) {
10484
10947
  const obj = {};
10485
10948
  for (const key in evalEntries) {
10486
10949
  if (hasOwnProperty(evalEntries, key)) {
10487
- obj[key] = evalEntries[key](scope, args, context);
10950
+ setSafeProperty(obj, key, evalEntries[key](scope, args, context));
10488
10951
  }
10489
10952
  }
10490
10953
  return obj;
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
- {
2
- "name": "@danielsimonjr/mathts-expression",
3
- "version": "0.7.0",
4
- "description": "Expression parser and evaluator for MathTS",
5
- "author": "Daniel Simon Jr.",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "./dist/index.js",
9
- "module": "./dist/index.js",
10
- "types": "./dist/index.d.ts",
11
- "exports": {
12
- ".": {
13
- "import": "./dist/index.js",
14
- "types": "./dist/index.d.ts"
15
- }
16
- },
17
- "files": [
18
- "dist",
19
- "README.md"
20
- ],
21
- "scripts": {
22
- "build": "tsup src/index.ts --format esm --dts --clean",
23
- "dev": "tsup src/index.ts --format esm --dts --watch",
24
- "test": "vitest run",
25
- "test:watch": "vitest",
26
- "test:coverage": "vitest run --coverage",
27
- "typecheck": "tsc --noEmit",
28
- "lint": "eslint src --ext .ts",
29
- "lint:fix": "eslint src --ext .ts --fix",
30
- "clean": "rm -rf dist",
31
- "build:prod": "tsup src/index.ts --format esm --dts --clean --minify --treeshake"
32
- },
33
- "dependencies": {
34
- "@danielsimonjr/mathts-core": "^0.14.0",
35
- "typed-function": "^4.0.0"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^25.5.2",
39
- "tsup": "^8.0.0",
40
- "typescript": "^5.3.0",
41
- "vitest": "^4.1.5"
42
- },
43
- "publishConfig": {
44
- "access": "public"
45
- },
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/danielsimonjr/MathTS.git",
49
- "directory": "expression"
50
- },
51
- "keywords": [
52
- "math",
53
- "typescript",
54
- "expression",
55
- "parser",
56
- "evaluator",
57
- "compiler"
58
- ]
59
- }
1
+ {
2
+ "name": "@danielsimonjr/mathts-expression",
3
+ "version": "0.7.1",
4
+ "description": "Expression parser and evaluator for MathTS",
5
+ "author": "Daniel Simon Jr.",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup src/index.ts --format esm --dts --clean",
23
+ "dev": "tsup src/index.ts --format esm --dts --watch",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "eslint src --ext .ts",
29
+ "lint:fix": "eslint src --ext .ts --fix",
30
+ "clean": "rm -rf dist",
31
+ "build:prod": "tsup src/index.ts --format esm --dts --clean --minify --treeshake"
32
+ },
33
+ "dependencies": {
34
+ "@danielsimonjr/mathts-core": "^0.14.1",
35
+ "typed-function": "^4.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^25.5.2",
39
+ "tsup": "^8.0.0",
40
+ "typescript": "^5.3.0",
41
+ "vitest": "^4.1.10"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/danielsimonjr/MathTS.git",
49
+ "directory": "expression"
50
+ },
51
+ "keywords": [
52
+ "math",
53
+ "typescript",
54
+ "expression",
55
+ "parser",
56
+ "evaluator",
57
+ "compiler"
58
+ ]
59
+ }