@adaptic/utils 0.0.992 → 0.0.993
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/README.md +15 -3
- package/dist/index.cjs +0 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +0 -6
- package/dist/index.mjs.map +1 -1
- package/dist/test.js +0 -220
- package/dist/test.js.map +1 -1
- package/dist/types/technical-analysis.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
# @adaptic/utils
|
|
2
2
|
|
|
3
|
-
Last updated: 20 Feb 2025
|
|
4
|
-
|
|
5
3
|
A comprehensive utility library for financial data processing, time manipulation, and formatting.
|
|
6
4
|
|
|
7
5
|
NPM repo: https://www.npmjs.com/package/@adaptic/utils
|
|
8
6
|
|
|
7
|
+
## Branch Model
|
|
8
|
+
|
|
9
|
+
This repo has two publish lineages:
|
|
10
|
+
|
|
11
|
+
- `master` -> `@adaptic/utils@0.1.x` on npm dist-tag `latest`. What external
|
|
12
|
+
unpinned `npm install @adaptic/utils` will pull.
|
|
13
|
+
- `stable-release` -> `@adaptic/utils@0.0.x` (0.0.992+) on npm dist-tag
|
|
14
|
+
`stable`. What `engine` and `backend-legacy` actually consume via pinned
|
|
15
|
+
versions.
|
|
16
|
+
|
|
17
|
+
All new work lands on `stable-release`. `master` is only updated when
|
|
18
|
+
intentionally cutting a 0.1.x patch for legacy external consumers.
|
|
19
|
+
|
|
9
20
|
## Installation
|
|
10
21
|
|
|
11
22
|
```bash
|
|
12
|
-
npm install @adaptic/utils
|
|
23
|
+
npm install @adaptic/utils # 0.1.x from master
|
|
24
|
+
npm install @adaptic/utils@stable # 0.0.x from stable-release (engine pins this)
|
|
13
25
|
```
|
|
14
26
|
|
|
15
27
|
## Usage
|
package/dist/index.cjs
CHANGED
|
@@ -11617,7 +11617,6 @@ function calculateBollingerBands(priceData, { period = 20, standardDeviations =
|
|
|
11617
11617
|
close: priceData[i].close,
|
|
11618
11618
|
});
|
|
11619
11619
|
}
|
|
11620
|
-
// logIfDebug(`Calculated Bollinger Bands for ${result.length} periods`);
|
|
11621
11620
|
return result;
|
|
11622
11621
|
}
|
|
11623
11622
|
/**
|
|
@@ -11680,7 +11679,6 @@ function calculateEMA(priceData, { period = 20, period2 = 9 } = {}) {
|
|
|
11680
11679
|
}
|
|
11681
11680
|
result.push(entry);
|
|
11682
11681
|
}
|
|
11683
|
-
// logIfDebug(`Calculated EMA for ${result.length} periods`);
|
|
11684
11682
|
return result;
|
|
11685
11683
|
}
|
|
11686
11684
|
/**
|
|
@@ -11742,7 +11740,6 @@ function calculateFibonacciLevels(priceData, { lookbackPeriod = 20, retracementL
|
|
|
11742
11740
|
close: priceData[i].close,
|
|
11743
11741
|
});
|
|
11744
11742
|
}
|
|
11745
|
-
// logIfDebug(`Calculated Fibonacci levels for ${result.length} periods`);
|
|
11746
11743
|
return result;
|
|
11747
11744
|
}
|
|
11748
11745
|
/**
|
|
@@ -11790,7 +11787,6 @@ function calculateMACD(priceData, { shortPeriod = 12, longPeriod = 26, signalPer
|
|
|
11790
11787
|
close: emaLong[i].close,
|
|
11791
11788
|
});
|
|
11792
11789
|
}
|
|
11793
|
-
// logIfDebug(`Calculated MACD for ${result.length} periods`);
|
|
11794
11790
|
return result;
|
|
11795
11791
|
}
|
|
11796
11792
|
/**
|
|
@@ -11846,7 +11842,6 @@ function calculateRSI(priceData, { period = 14 } = {}) {
|
|
|
11846
11842
|
close: priceData[i].close,
|
|
11847
11843
|
});
|
|
11848
11844
|
}
|
|
11849
|
-
// logIfDebug(`Calculated RSI for ${result.length} periods`);
|
|
11850
11845
|
return result;
|
|
11851
11846
|
}
|
|
11852
11847
|
/**
|
|
@@ -11899,7 +11894,6 @@ function calculateStochasticOscillator(priceData, { lookbackPeriod = 5, signalPe
|
|
|
11899
11894
|
});
|
|
11900
11895
|
}
|
|
11901
11896
|
}
|
|
11902
|
-
// logIfDebug(`Calculated Stochastic Oscillator for ${result.length} periods`);
|
|
11903
11897
|
return result;
|
|
11904
11898
|
}
|
|
11905
11899
|
/**
|