This library primarily targets times before the introduction of Optional Chaining. If your codebase supports Optional Chaining, it’s advisable to use it. However, there may be instances where this library is preferred, such as when dealing with large access to a single object and aiming to enhance performance using “cursor” methods. Nonetheless, native support typically offers better performance compared to this library.
PASS ./index.test.js
√ Should dot string notation accepted. (3ms)
√ Should object dot string notation accepted.
√ Should array dot string notation accepted. (1ms)
√ Should equal symbol return object if target is array object based on condition.
√ Should equal symbol return array if target is array based on condition.
√ Should equal symbol return null when target not exists. (1ms)
√ Should arrayMap symbol return specific key
√ Should comma symbol work with arrayMap symbol return multiple keys
√ Should pipe symbol return first truth value (1ms)
√ Should return null if target exists.
√ Should return null if object is falsy value.
√ Should run invoke if function and data found. (1ms)
√ Should skip if function not found.
√ Should `cursor` build options object
√ Should build cache when cursor not null
√ Should get from cache when cursor not null and key exist (1ms)
√ Should `withOptions` set disableTracker on options
√ Should `setOptions` update options object.
----------|---------|----------|---------|---------|-------------------
| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
| ---------- | --------- | ---------- | --------- | --------- | ------------------- |
| All files | 100 | 95.83 | 100 | 100 |
| index.js | 100 | 95.83 | 100 | 100 | 155,159 |
| ---------- | --------- | ---------- | --------- | --------- | ------------------- |
Test Suites: 1 passed, 1 total
Tests: 18 passed, 18 total
Snapshots: 0 total
Time: 1.562s
Ran all test suites.