eyeling 1.6.31 → 1.6.32

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 (2) hide show
  1. package/eyeling.js +11 -10
  2. package/package.json +1 -1
package/eyeling.js CHANGED
@@ -5786,8 +5786,7 @@ function printExplanation(df, prefixes) {
5786
5786
  function main() {
5787
5787
  // Drop "node" and script name; keep only user-provided args
5788
5788
  const argv = process.argv.slice(2);
5789
- const pathMod = require('path');
5790
- const prog = pathMod.basename(process.argv[1] || 'eyeling');
5789
+ const prog = String(process.argv[1] || 'eyeling').split(/[\/]/).pop();
5791
5790
 
5792
5791
  function printHelp(toStderr = false) {
5793
5792
  const msg =
@@ -5801,11 +5800,12 @@ function main() {
5801
5800
  (toStderr ? console.error : console.log)(msg);
5802
5801
  }
5803
5802
 
5803
+
5804
5804
  // --------------------------------------------------------------------------
5805
5805
  // Global options
5806
5806
  // --------------------------------------------------------------------------
5807
5807
  // --help / -h: print help and exit
5808
- if (argv.includes('--help') || argv.includes('-h')) {
5808
+ if (argv.includes('--help') || argv.includes('-h')) {
5809
5809
  printHelp(false);
5810
5810
  process.exit(0);
5811
5811
  }
@@ -5818,6 +5818,7 @@ function main() {
5818
5818
 
5819
5819
  const showAst = argv.includes('--ast') || argv.includes('-a');
5820
5820
 
5821
+
5821
5822
  // --proof-comments / -p: enable proof explanations
5822
5823
  if (argv.includes('--proof-comments') || argv.includes('-p')) {
5823
5824
  proofCommentsEnabled = true;
@@ -5832,7 +5833,7 @@ function main() {
5832
5833
  // --------------------------------------------------------------------------
5833
5834
  // Positional args (the N3 file)
5834
5835
  // --------------------------------------------------------------------------
5835
- const positional = argv.filter((a) => !a.startsWith('-'));
5836
+ const positional = argv.filter((a) => !a.startsWith('-'));
5836
5837
  if (positional.length === 0) {
5837
5838
  // No args: show help like many CLI tools do.
5838
5839
  printHelp(false);
@@ -5898,10 +5899,10 @@ function main() {
5898
5899
  }
5899
5900
  }
5900
5901
 
5901
- const __isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
5902
- const __isNode =
5903
- !__isBrowser && typeof process !== 'undefined' && process.versions && process.versions.node && typeof require === 'function';
5904
-
5905
- if (__isNode && require.main === module) {
5906
- main();
5902
+ try {
5903
+ if (typeof module !== 'undefined' && typeof require === 'function' && require.main === module) {
5904
+ main();
5905
+ }
5906
+ } catch (_e) {
5907
+ // ignore
5907
5908
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.6.31",
3
+ "version": "1.6.32",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [