sweph 2.10.0-5 → 2.10.0-6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sweph",
3
- "version": "2.10.0-5",
3
+ "version": "2.10.0-6",
4
4
  "description": "The definitive Swiss Ephemeris bindings for Node.js",
5
5
  "main": "index.js",
6
6
  "typings": "./index.d.ts",
@@ -25,6 +25,6 @@
25
25
  "author": "Timotej Valentin Rojko",
26
26
  "license": "(GPL-2.0-or-later OR LGPL-3.0-or-later)",
27
27
  "devDependencies": {
28
- "eslint": "^7.31.0"
28
+ "eslint": "^8.21.0"
29
29
  }
30
30
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  constexpr std::pair<int, const char*> args[] = {
4
4
  { 1, "Expecting 1 argument: hsys" },
5
- { NUMBER, "Argument 1 should be a number - house system ID" }
5
+ { STRING, "Argument 1 should be a string - house system ID" }
6
6
  };
7
7
 
8
8
  Napi::Value sweph_house_name(const Napi::CallbackInfo& info) {
@@ -10,7 +10,8 @@ Napi::Value sweph_house_name(const Napi::CallbackInfo& info) {
10
10
  if(!sweph_type_check(args, info)) {
11
11
  return env.Null();
12
12
  }
13
- const char* name = swe_house_name(info[0].As<Napi::Number>().Int32Value());
13
+ char sys = info[0].As<Napi::String>().Utf8Value()[0];
14
+ const char* name = swe_house_name(int(sys));
14
15
  if(name == NULL) {
15
16
  Napi::TypeError::New(env, "Invalid house system").ThrowAsJavaScriptException();
16
17
  return env.Null();