Socket
Socket
Sign inDemoInstall

astronomia

Package Overview
Dependencies
0
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.4 to 4.0.0

6

data/deltat.js

@@ -14,7 +14,7 @@ /**

data: {
table: [43.4724, 43.5648, 43.6737, 43.7782, 43.8763, 43.9562, 44.0315, 44.1132, 44.1982, 44.2952, 44.3936, 44.4841, 44.5646, 44.6425, 44.7386, 44.837, 44.9302, 44.9986, 45.0584, 45.1284, 45.2064, 45.298, 45.3897, 45.4761, 45.5632, 45.645, 45.7375, 45.8284, 45.9133, 45.982, 46.0407, 46.1067, 46.1825, 46.2789, 46.3713, 46.4567, 46.5445, 46.6311, 46.7302, 46.8284, 46.9247, 46.997, 47.0709, 47.145, 47.2362, 47.3413, 47.4319, 47.5214, 47.6049, 47.6837, 47.7781, 47.8771, 47.9687, 48.0348, 48.0942, 48.1608, 48.246, 48.3439, 48.4355, 48.5344, 48.6324, 48.7294, 48.8365, 48.9353, 49.0319, 49.1013, 49.1591, 49.2286, 49.307, 49.4018, 49.4945, 49.5861, 49.6805, 49.7602, 49.8556, 49.9489, 50.0347, 50.1019, 50.1622, 50.226, 50.2968, 50.3831, 50.4599, 50.5387, 50.616, 50.6866, 50.7658, 50.8454, 50.9187, 50.9761, 51.0278, 51.0843, 51.1538, 51.2319, 51.3063, 51.3808, 51.4526, 51.516, 51.5985, 51.6809, 51.7573, 51.8133, 51.8532, 51.9014, 51.9603, 52.0328, 52.0985, 52.1668, 52.2316, 52.2938, 52.368, 52.4465, 52.518, 52.5751, 52.6178, 52.6668, 52.734, 52.8056, 52.8792, 52.9565, 53.0445, 53.1268, 53.2197, 53.3024, 53.3747, 53.4335, 53.4778, 53.53, 53.5845, 53.6523, 53.7256, 53.7882, 53.8367, 53.883, 53.9443, 54.0042, 54.0536, 54.0856, 54.1084, 54.1463, 54.1914, 54.2452, 54.2958, 54.3427, 54.3911, 54.432, 54.4898, 54.5456, 54.5977, 54.6355, 54.6532, 54.6776, 54.7174, 54.7741, 54.8253, 54.8712, 54.9161, 54.9581, 54.9997, 55.0476, 55.0912, 55.1132, 55.1328, 55.1532, 55.1898, 55.2416, 55.2838, 55.3222, 55.3613, 55.4063, 55.4629, 55.5111, 55.5524, 55.5812, 55.6004, 55.6262, 55.6656, 55.7168, 55.7698, 55.8197, 55.8615, 55.913, 55.9663, 56.022, 56.07, 56.0939, 56.1105, 56.1314, 56.1611, 56.2068, 56.2582, 56.3, 56.3399, 56.379, 56.4283, 56.4804, 56.5352, 56.5697, 56.5983, 56.6328, 56.6739, 56.7332, 56.7972, 56.8553, 56.9111, 56.9755, 57.0471, 57.1136, 57.1738, 57.2226, 57.2597, 57.3073, 57.3643, 57.4334, 57.5016, 57.5653, 57.6333, 57.6973, 57.7711, 57.8407, 57.9058, 57.9576, 57.9975, 58.0425, 58.1043, 58.1679, 58.2389, 58.3091659, 58.3833021, 58.4536748, 58.5401438, 58.6227714, 58.6916662, 58.7409628, 58.7836189, 58.8405543, 58.898579, 58.9713678, 59.043837, 59.1218414, 59.2002687, 59.274737, 59.3574134, 59.4433827, 59.5242416, 59.5849787, 59.6343497, 59.6927827, 59.758805, 59.8386448, 59.9110567, 59.9844537, 60.056435, 60.123065, 60.2042185, 60.2803745, 60.3530352, 60.4011891, 60.4439959, 60.4900257, 60.5578054, 60.6324446, 60.7058569, 60.7853482, 60.8663504, 60.9386672, 61.0276757, 61.1103448, 61.1870458, 61.2453891, 61.2881024, 61.3377799, 61.4036165, 61.4760366, 61.5524599, 61.6286593, 61.6845819, 61.743306, 61.8132425, 61.8823203, 61.9496762, 61.9968743, 62.0342938, 62.0714108, 62.1202315, 62.1809508, 62.2382046, 62.2950486, 62.3506479, 62.3995381, 62.475395, 62.5463091, 62.6136031, 62.6570739, 62.6941742, 62.7383271, 62.7926305, 62.8566986, 62.9145607, 62.9658689, 63.0216632, 63.0807052, 63.1461718, 63.2052946, 63.2599441, 63.2844088, 63.2961369, 63.3126092, 63.3421622, 63.3871303, 63.4339302, 63.4673369, 63.4978642, 63.5319327, 63.5679441, 63.6104432, 63.6444291, 63.6641815, 63.6739403, 63.692603, 63.7147066, 63.7518055, 63.792717, 63.8285221, 63.8556871, 63.8803854, 63.9075025, 63.9392787, 63.9690744, 63.9798604, 63.9833077, 63.9938011, 64.0093384, 64.0399621, 64.0670429, 64.0907881, 64.1068077, 64.1282125, 64.1584211, 64.1832722, 64.2093975, 64.2116628, 64.2073173, 64.2115565, 64.2222858, 64.2499625, 64.2760973, 64.2998037, 64.3191858, 64.345013, 64.3734584, 64.3943291, 64.4151156, 64.4132064, 64.4118464, 64.4096536, 64.4167832, 64.43292, 64.4510529, 64.4734276, 64.4893377, 64.5053342, 64.5269189, 64.5470942, 64.5596729, 64.5512293, 64.5370906, 64.5359472, 64.5414947, 64.5543634, 64.5654298, 64.5736111, 64.5891142, 64.6014759, 64.6176147, 64.6374397, 64.6548674, 64.6530021, 64.6379271, 64.637161, 64.6399614, 64.6543152, 64.6723164, 64.6876311, 64.7051905, 64.7313433, 64.7575312, 64.7811143, 64.8000929, 64.7994561, 64.7876424, 64.783095, 64.7920604, 64.8096421, 64.8310888, 64.8451826, 64.8597013, 64.8849929, 64.9174991, 64.9480298, 64.9793881, 64.9894772, 65.0028155, 65.0138193, 65.0371432, 65.0772597, 65.112197, 65.1464034, 65.1832638, 65.2145358, 65.2493713, 65.2920645, 65.3279403, 65.3413366, 65.3451881, 65.34964, 65.3711307, 65.3971998, 65.4295547, 65.4573487, 65.486752, 65.5152012, 65.5449916, 65.5780768, 65.612728, 65.6287505, 65.6370091, 65.6493375, 65.6759928, 65.7096966, 65.746092, 65.7768362, 65.8024614, 65.8236695, 65.8595036, 65.8973008, 65.932291, 65.950911, 65.9534105, 65.962833, 65.9838647, 66.0146733, 66.042049, 66.0699217, 66.0961343, 66.1310116, 66.1682713, 66.2071627, 66.2355846, 66.2408549, 66.2335423, 66.2349107, 66.2441095, 66.2751123, 66.3054334, 66.3245568, 66.3405713, 66.3624433, 66.3957101, 66.428903, 66.4618675, 66.4748837, 66.4751281, 66.4828678, 66.5056165, 66.5382912, 66.5705628, 66.6030198, 66.6339689, 66.6569117, 66.6925011, 66.7288729, 66.7578719, 66.7707625, 66.7740427, 66.7846288, 66.810324, 66.840048, 66.8778601, 66.9069091, 66.944259, 66.9762508, 67.0258126, 67.0716286, 67.1100184, 67.1266401, 67.1331391, 67.145797, 67.17174, 67.2091069, 67.2459812, 67.2810383, 67.3136452, 67.3456968, 67.389003, 67.4318433, 67.4666209, 67.4858459, 67.4989147, 67.5110936, 67.5352658, 67.571103, 67.6070253, 67.6439167, 67.6765272, 67.7116693, 67.7590634, 67.8011542, 67.840213, 67.8606318, 67.8821576, 67.9120101, 67.9546462, 68.0054839, 68.051412, 68.1024205, 68.1577127, 68.2043653, 68.2664507, 68.3188171, 68.3703564, 68.3964356, 68.4094472, 68.4304611, 68.4629791, 68.507818, 68.5537018, 68.5927179, 68.6298107, 68.6670627, 68.7135208, 68.7622755, 68.8032843, 68.8244838, 68.8373427, 68.847693, 68.8688567, 68.9005814, 68.9354999, 68.9676423, 68.9875354, 69.0175527, 69.0499081, 69.0823433, 69.1070034, 69.1134027, 69.1141898, 69.1207203, 69.1355578, 69.16459, 69.1964228, 69.2201632, 69.2451564, 69.2732758, 69.3031979, 69.3325675, 69.3540507, 69.3581722, 69.3441594, 69.3376329, 69.3377424, 69.3432191, 69.3540144, 69.3611554, 69.3751703, 69.3889904, 69.4091639, 69.4264661, 69.4386334, 69.424136, 69.3921206, 69.3693417, 69.3574756, 69.3593236, 69.3630256, 69.3593376, 69.3510079, 69.3537839, 69.3582064, 69.3600354, 69.350675, 69.3271031, 69.2938938, 69.2651866, 69.2533783, 69.2533196, 69.2526193, 69.2538987, 69.2474551, 69.2590294, 69.2785293],
table: [43.4724, 43.5648, 43.6737, 43.7782, 43.8763, 43.9562, 44.0315, 44.1132, 44.1982, 44.2952, 44.3936, 44.4841, 44.5646, 44.6425, 44.7386, 44.837, 44.9302, 44.9986, 45.0584, 45.1284, 45.2064, 45.298, 45.3897, 45.4761, 45.5632, 45.645, 45.7375, 45.8284, 45.9133, 45.982, 46.0407, 46.1067, 46.1825, 46.2789, 46.3713, 46.4567, 46.5445, 46.6311, 46.7302, 46.8284, 46.9247, 46.997, 47.0709, 47.145, 47.2362, 47.3413, 47.4319, 47.5214, 47.6049, 47.6837, 47.7781, 47.8771, 47.9687, 48.0348, 48.0942, 48.1608, 48.246, 48.3439, 48.4355, 48.5344, 48.6324, 48.7294, 48.8365, 48.9353, 49.0319, 49.1013, 49.1591, 49.2286, 49.307, 49.4018, 49.4945, 49.5861, 49.6805, 49.7602, 49.8556, 49.9489, 50.0347, 50.1019, 50.1622, 50.226, 50.2968, 50.3831, 50.4599, 50.5387, 50.616, 50.6866, 50.7658, 50.8454, 50.9187, 50.9761, 51.0278, 51.0843, 51.1538, 51.2319, 51.3063, 51.3808, 51.4526, 51.516, 51.5985, 51.6809, 51.7573, 51.8133, 51.8532, 51.9014, 51.9603, 52.0328, 52.0985, 52.1668, 52.2316, 52.2938, 52.368, 52.4465, 52.518, 52.5751, 52.6178, 52.6668, 52.734, 52.8056, 52.8792, 52.9565, 53.0445, 53.1268, 53.2197, 53.3024, 53.3747, 53.4335, 53.4778, 53.53, 53.5845, 53.6523, 53.7256, 53.7882, 53.8367, 53.883, 53.9443, 54.0042, 54.0536, 54.0856, 54.1084, 54.1463, 54.1914, 54.2452, 54.2958, 54.3427, 54.3911, 54.432, 54.4898, 54.5456, 54.5977, 54.6355, 54.6532, 54.6776, 54.7174, 54.7741, 54.8253, 54.8712, 54.9161, 54.9581, 54.9997, 55.0476, 55.0912, 55.1132, 55.1328, 55.1532, 55.1898, 55.2416, 55.2838, 55.3222, 55.3613, 55.4063, 55.4629, 55.5111, 55.5524, 55.5812, 55.6004, 55.6262, 55.6656, 55.7168, 55.7698, 55.8197, 55.8615, 55.913, 55.9663, 56.022, 56.07, 56.0939, 56.1105, 56.1314, 56.1611, 56.2068, 56.2582, 56.3, 56.3399, 56.379, 56.4283, 56.4804, 56.5352, 56.5697, 56.5983, 56.6328, 56.6739, 56.7332, 56.7972, 56.8553, 56.9111, 56.9755, 57.0471, 57.1136, 57.1738, 57.2226, 57.2597, 57.3073, 57.3643, 57.4334, 57.5016, 57.5653, 57.6333, 57.6973, 57.7711, 57.8407, 57.9058, 57.9576, 57.9975, 58.0425, 58.1043, 58.1679, 58.2389, 58.3091659, 58.3833021, 58.4536748, 58.5401438, 58.6227714, 58.6916662, 58.7409628, 58.7836189, 58.8405543, 58.898579, 58.9713678, 59.043837, 59.1218414, 59.2002687, 59.274737, 59.3574134, 59.4433827, 59.5242416, 59.5849787, 59.6343497, 59.6927827, 59.758805, 59.8386448, 59.9110567, 59.9844537, 60.056435, 60.123065, 60.2042185, 60.2803745, 60.3530352, 60.4011891, 60.4439959, 60.4900257, 60.5578054, 60.6324446, 60.7058569, 60.7853482, 60.8663504, 60.9386672, 61.0276757, 61.1103448, 61.1870458, 61.2453891, 61.2881024, 61.3377799, 61.4036165, 61.4760366, 61.5524599, 61.6286593, 61.6845819, 61.743306, 61.8132425, 61.8823203, 61.9496762, 61.9968743, 62.0342938, 62.0714108, 62.1202315, 62.1809508, 62.2382046, 62.2950486, 62.3506479, 62.3995381, 62.475395, 62.5463091, 62.6136031, 62.6570739, 62.6941742, 62.7383271, 62.7926305, 62.8566986, 62.9145607, 62.9658689, 63.0216632, 63.0807052, 63.1461718, 63.2052946, 63.2599441, 63.2844088, 63.2961369, 63.3126092, 63.3421622, 63.3871303, 63.4339302, 63.4673369, 63.4978642, 63.5319327, 63.5679441, 63.6104432, 63.6444291, 63.6641815, 63.6739403, 63.692603, 63.7147066, 63.7518055, 63.792717, 63.8285221, 63.8556871, 63.8803854, 63.9075025, 63.9392787, 63.9690744, 63.9798604, 63.9833077, 63.9938011, 64.0093384, 64.0399621, 64.0670429, 64.0907881, 64.1068077, 64.1282125, 64.1584211, 64.1832722, 64.2093975, 64.2116628, 64.2073173, 64.2115565, 64.2222858, 64.2499625, 64.2760973, 64.2998037, 64.3191858, 64.345013, 64.3734584, 64.3943291, 64.4151156, 64.4132064, 64.4118464, 64.4096536, 64.4167832, 64.43292, 64.4510529, 64.4734276, 64.4893377, 64.5053342, 64.5269189, 64.5470942, 64.5596729, 64.5512293, 64.5370906, 64.5359472, 64.5414947, 64.5543634, 64.5654298, 64.5736111, 64.5891142, 64.6014759, 64.6176147, 64.6374397, 64.6548674, 64.6530021, 64.6379271, 64.637161, 64.6399614, 64.6543152, 64.6723164, 64.6876311, 64.7051905, 64.7313433, 64.7575312, 64.7811143, 64.8000929, 64.7994561, 64.7876424, 64.783095, 64.7920604, 64.8096421, 64.8310888, 64.8451826, 64.8597013, 64.8849929, 64.9174991, 64.9480298, 64.9793881, 64.9894772, 65.0028155, 65.0138193, 65.0371432, 65.0772597, 65.112197, 65.1464034, 65.1832638, 65.2145358, 65.2493713, 65.2920645, 65.3279403, 65.3413366, 65.3451881, 65.34964, 65.3711307, 65.3971998, 65.4295547, 65.4573487, 65.486752, 65.5152012, 65.5449916, 65.5780768, 65.612728, 65.6287505, 65.6370091, 65.6493375, 65.6759928, 65.7096966, 65.746092, 65.7768362, 65.8024614, 65.8236695, 65.8595036, 65.8973008, 65.932291, 65.950911, 65.9534105, 65.962833, 65.9838647, 66.0146733, 66.042049, 66.0699217, 66.0961343, 66.1310116, 66.1682713, 66.2071627, 66.2355846, 66.2408549, 66.2335423, 66.2349107, 66.2441095, 66.2751123, 66.3054334, 66.3245568, 66.3405713, 66.3624433, 66.3957101, 66.428903, 66.4618675, 66.4748837, 66.4751281, 66.4828678, 66.5056165, 66.5382912, 66.5705628, 66.6030198, 66.6339689, 66.6569117, 66.6925011, 66.7288729, 66.7578719, 66.7707625, 66.7740427, 66.7846288, 66.810324, 66.840048, 66.8778601, 66.9069091, 66.944259, 66.9762508, 67.0258126, 67.0716286, 67.1100184, 67.1266401, 67.1331391, 67.145797, 67.17174, 67.2091069, 67.2459812, 67.2810383, 67.3136452, 67.3456968, 67.389003, 67.4318433, 67.4666209, 67.4858459, 67.4989147, 67.5110936, 67.5352658, 67.571103, 67.6070253, 67.6439167, 67.6765272, 67.7116693, 67.7590634, 67.8011542, 67.840213, 67.8606318, 67.8821576, 67.9120101, 67.9546462, 68.0054839, 68.051412, 68.1024205, 68.1577127, 68.2043653, 68.2664507, 68.3188171, 68.3703564, 68.3964356, 68.4094472, 68.4304611, 68.4629791, 68.507818, 68.5537018, 68.5927179, 68.6298107, 68.6670627, 68.7135208, 68.7622755, 68.8032843, 68.8244838, 68.8373427, 68.847693, 68.8688567, 68.9005814, 68.9354999, 68.9676423, 68.9875354, 69.0175527, 69.0499081, 69.0823433, 69.1070034, 69.1134027, 69.1141898, 69.1207203, 69.1355578, 69.16459, 69.1964228, 69.2201632, 69.2451564, 69.2732758, 69.3031979, 69.3325675, 69.3540507, 69.3581722, 69.3441594, 69.3376329, 69.3377424, 69.3432191, 69.3540144, 69.3611554, 69.3751703, 69.3889904, 69.4091639, 69.4264662, 69.4386334, 69.4241358, 69.3921207, 69.3693417, 69.3574758, 69.3593236, 69.3630255, 69.3593373, 69.351008, 69.353784, 69.3582227, 69.3672934, 69.3672469, 69.3447515, 69.3102708, 69.2818095, 69.2695544, 69.269195, 69.2728002, 69.2692484, 69.2580081, 69.2558878, 69.2674788, 69.2770101],
first: 1973.0849315068492,
firstYM: [1973, 2],
last: 2022.2465753424658,
lastYM: [2022, 4]
last: 2022.3287671232877,
lastYM: [2022, 5]
},

@@ -21,0 +21,0 @@ prediction: {

{
"name": "astronomia",
"version": "3.0.4",
"version": "4.0.0",
"description": "An astronomical library",

@@ -31,3 +31,3 @@ "keywords": [

"import": "./src/index.js",
"require": "./lib/index.ccjs"
"require": "./lib/index.cjs"
},

@@ -353,2 +353,3 @@ "./angle": {

"main": "./lib/index.cjs",
"module": "./src/index.js",
"directories": {

@@ -373,19 +374,19 @@ "lib": "lib",

"babelify": "^10.0.0",
"c8": "^7.7.0",
"core-js": "^3.10.0",
"dtslint": "^4.0.8",
"eslint": "^7.23.0",
"c8": "^7.7.2",
"core-js": "^3.12.1",
"dtslint": "^4.0.9",
"eslint": "^7.26.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.23.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^5.0.0",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"npm-run-all": "^4.1.5",
"regenerator-runtime": "^0.13.7",
"regenerator-runtime": "^0.13.8",
"rimraf": "^3.0.2",
"rollup": "^2.44.0",
"rollup": "^2.48.0",
"serialize-to-js": "^3.1.1",
"serialize-to-module": "^1.1.0",
"typescript": "^4.2.3"
"typescript": "^4.2.4"
},

@@ -392,0 +393,0 @@ "engines": {

@@ -37,4 +37,8 @@ /**

import deltat from '../data/deltat.js'
import { Calendar, LeapYearGregorian } from './julian.js'
// avoids ciclic import { LeapYearGregorian } from './julian.js'
function LeapYearGregorian (y) {
return (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0
}
/**

@@ -120,9 +124,10 @@ * deltaT returns the difference ΔT = TD - UT between Dynamical Time TD and

function monthOfYear (dyear) {
if (!monthOfYear.data) { // memoize yearly fractions per month
monthOfYear.data = { 0: [], 1: [] }
for (let m = 0; m <= 12; m++) {
monthOfYear.data[0][m] = new Calendar(1999, m, 1).toYear() - 1999 // non leap year
monthOfYear.data[1][m] = new Calendar(2000, m, 1).toYear() - 2000 // leap year
}
}
// if (!monthOfYear.data) { // memoize yearly fractions per month
// monthOfYear.data = { 0: [], 1: [] }
// for (let m = 0; m <= 12; m++) {
// monthOfYear.data[0][m] = new Calendar(1999, m, 1).toYear() - 1999 // non leap year
// monthOfYear.data[1][m] = new Calendar(2000, m, 1).toYear() - 2000 // leap year
// }
// }
// console.log(monthOfYear)
const year = dyear | 0

@@ -141,2 +146,38 @@ const f = dyear - year

}
/**
monthOfYear.data[0][m] = new Calendar(1999, m, 1).toYear() - 1999 // non leap year
monthOfYear.data[1][m] = new Calendar(2000, m, 1).toYear() - 2000 // leap year
*/
monthOfYear.data = [
[ // non leap year
0,
0,
0.08493150684921602,
0.16164383561635987,
0.24657534246580326,
0.3287671232876619,
0.4136986301368779,
0.4958904109589639,
0.5808219178081799,
0.6657534246576233,
0.747945205479482,
0.832876712328698,
0.915068493150784
],
[ // leap year
0,
0,
0.08743169398917416,
0.1639344262296163,
0.24863387978143692,
0.3306010928961314,
0.4153005464481794,
0.49726775956287383,
0.5819672131146945,
0.6666666666667425,
0.7486338797814369,
0.8333333333332575,
0.9153005464481794
]
]

@@ -143,0 +184,0 @@ export default {

@@ -9,3 +9,2 @@ export { default as angle } from './angle.js'

export { default as circle } from './circle.js'
export { default as data } from '../data/index.js'
export { default as deltat } from './deltat.js'

@@ -12,0 +11,0 @@ export { default as elementequinox } from './elementequinox.js'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc