qntjs-lib 1.0.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.
- package/LICENSE +695 -0
- package/README.md +60 -0
- package/dist/arr/arr.d.ts +81 -0
- package/dist/bundle/index.d.ts +1573 -0
- package/dist/bundle/index.js +3169 -0
- package/dist/index.d.ts +4 -0
- package/dist/math/basic.d.ts +174 -0
- package/dist/math/index.d.ts +11 -0
- package/dist/math/linalg.d.ts +36 -0
- package/dist/math/minmax.d.ts +81 -0
- package/dist/math/prod.d.ts +20 -0
- package/dist/math/random.d.ts +22 -0
- package/dist/math/sum.d.ts +26 -0
- package/dist/stats/index.d.ts +10 -0
- package/dist/stats/mean.d.ts +53 -0
- package/dist/stats/quantile.d.ts +42 -0
- package/dist/stats/sampling.d.ts +23 -0
- package/dist/stats/skew.d.ts +26 -0
- package/dist/stats/transforms.d.ts +48 -0
- package/dist/stats/var.d.ts +42 -0
- package/dist/ta/index.d.ts +13 -0
- package/dist/ta/momentum-oscillators/ao.d.ts +11 -0
- package/dist/ta/momentum-oscillators/apo.d.ts +11 -0
- package/dist/ta/momentum-oscillators/aroon.d.ts +11 -0
- package/dist/ta/momentum-oscillators/cmo.d.ts +10 -0
- package/dist/ta/momentum-oscillators/index.d.ts +14 -0
- package/dist/ta/momentum-oscillators/kst.d.ts +29 -0
- package/dist/ta/momentum-oscillators/macd.d.ts +12 -0
- package/dist/ta/momentum-oscillators/mom.d.ts +9 -0
- package/dist/ta/momentum-oscillators/ppo.d.ts +11 -0
- package/dist/ta/momentum-oscillators/roc.d.ts +18 -0
- package/dist/ta/momentum-oscillators/rsi.d.ts +14 -0
- package/dist/ta/momentum-oscillators/stoch.d.ts +14 -0
- package/dist/ta/momentum-oscillators/stochrsi.d.ts +9 -0
- package/dist/ta/momentum-oscillators/ultosc.d.ts +17 -0
- package/dist/ta/momentum-oscillators/wpr.d.ts +12 -0
- package/dist/ta/moving-averages/dema.d.ts +10 -0
- package/dist/ta/moving-averages/ema.d.ts +10 -0
- package/dist/ta/moving-averages/hma.d.ts +10 -0
- package/dist/ta/moving-averages/index.d.ts +11 -0
- package/dist/ta/moving-averages/kama.d.ts +14 -0
- package/dist/ta/moving-averages/rma.d.ts +11 -0
- package/dist/ta/moving-averages/sma.d.ts +11 -0
- package/dist/ta/moving-averages/t3.d.ts +24 -0
- package/dist/ta/moving-averages/tema.d.ts +10 -0
- package/dist/ta/moving-averages/trima.d.ts +9 -0
- package/dist/ta/moving-averages/vwma.d.ts +17 -0
- package/dist/ta/moving-averages/wma.d.ts +11 -0
- package/dist/ta/trend/cci.d.ts +13 -0
- package/dist/ta/trend/di.d.ts +36 -0
- package/dist/ta/trend/dpo.d.ts +10 -0
- package/dist/ta/trend/ichimoku.d.ts +20 -0
- package/dist/ta/trend/index.d.ts +6 -0
- package/dist/ta/trend/psar.d.ts +10 -0
- package/dist/ta/trend/supertrend.d.ts +14 -0
- package/dist/ta/util.d.ts +53 -0
- package/dist/ta/volatility/atr.d.ts +23 -0
- package/dist/ta/volatility/bb.d.ts +11 -0
- package/dist/ta/volatility/bbw.d.ts +10 -0
- package/dist/ta/volatility/donchian.d.ts +11 -0
- package/dist/ta/volatility/index.d.ts +5 -0
- package/dist/ta/volatility/keltner.d.ts +12 -0
- package/dist/ta/volume-money-flow/ad.d.ts +12 -0
- package/dist/ta/volume-money-flow/adosc.d.ts +15 -0
- package/dist/ta/volume-money-flow/index.d.ts +6 -0
- package/dist/ta/volume-money-flow/mfi.d.ts +12 -0
- package/dist/ta/volume-money-flow/obv.d.ts +9 -0
- package/dist/ta/volume-money-flow/pnvi.d.ts +10 -0
- package/dist/ta/volume-money-flow/wad.d.ts +11 -0
- package/dist/untyped/index.d.ts +1194 -0
- package/dist/untyped/index.js +29 -0
- package/package.json +58 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Generated untyped wrapper — converts Float64Array -> number[] and recursively maps tuples/arrays
|
|
2
|
+
import * as core from '../bundle/index.js';
|
|
3
|
+
|
|
4
|
+
function convert(val) {
|
|
5
|
+
if (val instanceof Float64Array) return Array.from(val);
|
|
6
|
+
if (Array.isArray(val)) return val.map(convert);
|
|
7
|
+
return val;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function wrapNamespace(ns) {
|
|
11
|
+
const out = {};
|
|
12
|
+
for (const k of Object.keys(ns)) {
|
|
13
|
+
const v = ns[k];
|
|
14
|
+
if (typeof v === 'function') {
|
|
15
|
+
out[k] = (...args) => convert(v(...args));
|
|
16
|
+
} else {
|
|
17
|
+
out[k] = v;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const math = wrapNamespace(core.math || {});
|
|
24
|
+
export const ta = wrapNamespace(core.ta || {});
|
|
25
|
+
export const arr = wrapNamespace(core.arr || {});
|
|
26
|
+
export const stats = wrapNamespace(core.stats || {});
|
|
27
|
+
|
|
28
|
+
const _default = { math, ta, arr, stats };
|
|
29
|
+
export default _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "qntjs-lib",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/bundle/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/bundle/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./typed": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/bundle/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./untyped": {
|
|
17
|
+
"types": "./dist/untyped/index.d.ts",
|
|
18
|
+
"import": "./dist/untyped/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist/",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"package.json"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
28
|
+
"build:bundle": "vite build",
|
|
29
|
+
"build:dts": "rollup -c rollup.dts.config.js",
|
|
30
|
+
"build:untyped": "node scripts/generate_untyped.js",
|
|
31
|
+
"build": "npm run build:types && npm run build:bundle && npm run build:dts && npm run build:untyped",
|
|
32
|
+
"prepack": "npm run build",
|
|
33
|
+
"test": "vitest --run --coverage"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/amahouachi/qntjs-lib.git"
|
|
38
|
+
},
|
|
39
|
+
"keywords": ["technical-analysis","indicators","ta","trading","finance","sma","ema","tema","kama","mfi","typescript","javascript","array-utils"],
|
|
40
|
+
"author": "Ahmed MAHOUACHI (https://github.com/amahouachi)",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/amahouachi/qntjs-lib/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/amahouachi/qntjs-lib#readme",
|
|
46
|
+
"description": "High-performance JavaScript/TypeScript library of technical-analysis indicators and array/math utilities (NaN-aware + dense fast paths).",
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^25.0.3",
|
|
49
|
+
"@vitest/coverage-istanbul": "^4.0.16",
|
|
50
|
+
"rollup": "^4.55.1",
|
|
51
|
+
"rollup-plugin-dts": "^6.3.0",
|
|
52
|
+
"talib": "^1.1.6",
|
|
53
|
+
"tulind": "^0.8.20",
|
|
54
|
+
"typescript": "^5.9.3",
|
|
55
|
+
"vite": "^7.3.1",
|
|
56
|
+
"vitest": "^4.0.16"
|
|
57
|
+
}
|
|
58
|
+
}
|