harbor run -t openthoughts/tasktrove-exp-rpt-stack-jest-v2-stack-jest-0146harbor download openthoughts/tasktrove-exp-rpt-stack-jest-v2-stack-jest-0146Task: Implement toInteger and toSafeInteger utilities in /app/
Goal Create a small, dependency-free utility module that exposes two functions, toInteger and toSafeInteger, which convert any input to an integer in a manner consistent with lodash's ToInteger and ToSafeInteger behavior as exercised by the tests.
What to implement
A module at /app/index.js that exports an object with:
Required behavior (based on tests):
Constants to rely on
Notes
What to place in /app
Example behavior (internal sanity checks)
End result A self-contained, self-describing implementation placed at /app/index.js that provides the two functions with the exact numeric behavior described above, allowing the existing tests to pass.