{"_id":"@adaskothebeast/hierarchical-convert-to-moment","_rev":"17-29ce4e4201c8209f4546b0561a66575b","name":"@adaskothebeast/hierarchical-convert-to-moment","dist-tags":{"latest":"11.0.1"},"versions":{"1.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"1.0.0","_id":"@adaskothebeast/hierarchical-convert-to-moment@1.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"dist":{"shasum":"5e060820ddc0cbb960e4ea9e945f3519948a1af9","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-1.0.0.tgz","fileCount":8,"integrity":"sha512-A+AeGbfplMbsVW/aSpI6usdhAo8fkWAUhFlM0nezizJ3AQHtO/sUGCbyaMVU44bwXXHikGy3pLzvH041GdTjVw==","signatures":[{"sig":"MEUCICpwM0XhUXjfOpBdBv59Q9DiQE4/weEDjiIVulaefkyyAiEAuibyLuusvXj3ofpeq5KS3GG1xGlprYB/V3rfNNeHJ0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20225},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"5a8393de558ed881da2eaed1093b1f44d8b84013","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"_npmVersion":"9.5.1","description":"Dates in JSON are usually serialized as strings. This library helps to convert them to Date objects. It also helps to convert duration strings to Duration objects.","directories":{},"_nodeVersion":"18.16.1","_hasShrinkwrap":false,"peerDependencies":{"tslib":"2.5.3","moment":"^2.29.4"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_1.0.0_1690045999885_0.8378739951155563","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"1.1.0","_id":"@adaskothebeast/hierarchical-convert-to-moment@1.1.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"dist":{"shasum":"03286573e7a3addfadc9367f38086e7a5dcb47de","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-1.1.0.tgz","fileCount":8,"integrity":"sha512-hAuyf+4C2WJt1xTpGuOcpH3Z27QGSl2lgfSLKgxU9dtTS2YNO8n+UFq8zON8rTnQkUlcy6+TXgnMaFeNZ6n+yg==","signatures":[{"sig":"MEYCIQDrl8g2yuU717HFzbhsODGyv0FnuM3Fnb3ElpMNEwt+jAIhAPuxFZURkrOMOUAC4feT+eN8goFAztLGoqe7ApJ0nuHW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20225},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"5a8393de558ed881da2eaed1093b1f44d8b84013","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"_npmVersion":"9.5.1","description":"Dates in JSON are usually serialized as strings. This library helps to convert them to Date objects. It also helps to convert duration strings to Duration objects.","directories":{},"_nodeVersion":"18.16.1","_hasShrinkwrap":false,"peerDependencies":{"tslib":"2.5.3","moment":"^2.29.4"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_1.1.0_1690184324793_0.8244363584657628","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"1.2.0","_id":"@adaskothebeast/hierarchical-convert-to-moment@1.2.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"dist":{"shasum":"373ed4cd197d8f06f4634268350f20b813df4c8c","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-1.2.0.tgz","fileCount":8,"integrity":"sha512-nH2TOj4uvwxHPXpU6SQyvfAo8h8V8do6rHAWpVZnVZZUSe5QrQK9aBUMU7teOImMMEO8TLy2XA1z9d68pvCmeA==","signatures":[{"sig":"MEUCIQDjtXVijOeJ6UdejJdEESf/Ge459pg3fndib/4l5QEHLwIgUPQMLbwqY7eIUzWpmA7WhIk2bnBlBLa95WiGT1ifbXY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20203},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"e4b5c4c39932b5fc44e14c9d216b31eb05e5443f","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"_npmVersion":"9.6.7","description":"Dates in JSON are usually serialized as strings. This library helps to convert them to Date objects. It also helps to convert duration strings to Duration objects.","directories":{},"_nodeVersion":"18.17.0","_hasShrinkwrap":false,"peerDependencies":{"moment":"^2.29.4"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_1.2.0_1691015880192_0.8790777260038001","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"2.0.0","_id":"@adaskothebeast/hierarchical-convert-to-moment@2.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"dist":{"shasum":"2576e18c12683d4f9e82c93077f198e461bb625f","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-2.0.0.tgz","fileCount":8,"integrity":"sha512-Be9D62Zi4HDWg2zQPjkzBZSG8EXvHhZYqbJo5pMATlAr982VwijgobuqPudj8fKvPEHV+zWPqzpgceB+flzN9w==","signatures":[{"sig":"MEUCIQCsjEVH12vRkqoSXL9dlM9+7zs6poR3eGEIKgAcp9sJEQIgeszMyffygCzub04oC72DQxIZsHf8A0UkpD8gnm+cRTU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19298},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"a680a7de38721a64c7252058496d6bc3580f5d05","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"_npmVersion":"10.1.0","description":"Dates in JSON are usually serialized as strings. This library helps to convert them to Date objects. It also helps to convert duration strings to Duration objects.","directories":{},"_nodeVersion":"20.9.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.6.2","moment":"^2.29.4"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_2.0.0_1699714701190_0.2772783905805094","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"3.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@3.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"5411766ee63a05efd70ccf9e38d1f590aca57d4f","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-3.0.0.tgz","fileCount":8,"integrity":"sha512-4VwwiHwhsE1imaVZl5ZPggHX13fJ5tJIpzF8hrj/dqMo3TdWw8OR7cj7lGRlrgAh6jUfXLSBodK5MIbVnUJ1JQ==","signatures":[{"sig":"MEUCIQCUWT8oPZmv1h+m21prVb2hyTfJEbJSE0qSpbD71nINwwIgUvqP3HsInxzjlOyCzAvZQ0OeG/By9rXbo0chjyb3oy8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19573},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"ddfd51225dea744f8d13646f74264b5e17e45020","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"10.2.3","description":"Dates in JSON are usually serialized as strings. This library helps to convert them to Date objects. It also helps to convert duration strings to Duration objects.","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.6.2","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_3.0.0_1704558007099_0.6126286902094304","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"4.0.1","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@4.0.1","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"c5ac79ec69bb583caff73cb72c731bbbed549984","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-4.0.1.tgz","fileCount":8,"integrity":"sha512-Q6L4i56jEcWSlPTfXyOGjiMJ9M6WR2BYQ+4ZzMXLcE0kz9IqlrLnyPM8DgMY/9ATBpjqC1KhDFAjxd8+Tm396w==","signatures":[{"sig":"MEYCIQDLQeTO7SZo7bFrgk+QgGT57rGHcpocpXAgnX1/cvb5iAIhAIRMPYyXhDu6ABDkFa3XUH5jyovhiftk+MojSJfILipa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25338},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"a04bf19e09f1872e8c4c4c0f45bc6d1a737b8157","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"10.5.2","description":"## What problem does this set of libraries solve?","directories":{},"_nodeVersion":"20.13.1","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.6.2","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_4.0.1_1716918752187_0.9674297586061478","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"5.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@5.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"40053deacb6f650273e9be17e8a4f5ff670f8fd5","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-5.0.0.tgz","fileCount":8,"integrity":"sha512-rnn1y9m6IeMkb0SlWtrzrlO98u5oZfKZOyUWfyG61Ql/xrgwXNjhdGDO4gZ+RaxZySEI+04f9uEGAWIjVLtZFw==","signatures":[{"sig":"MEQCIARSdFi9SBU7cCyezW7rjP8Ky2MUrw5dd6V9WXKesgwvAiBc3rEN6cNkHPYKLNwfUXfg2vaF6SwuqpeuMCmbb3pC5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25323},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"ac396ac45c5f37d050e30d30fe47c0a6f7b620df","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"10.9.0","description":"## What problem does this set of libraries solve?","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_5.0.0_1735899827873_0.6462593252725277","host":"s3://npm-registry-packages-npm-production"}},"6.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"6.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@6.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"419c0b86d947a2766a53d098b3e10a6245c34782","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-6.0.0.tgz","fileCount":8,"integrity":"sha512-kTAUa6Cn3qb8UnIddN4bfbnfAmw34tEM+MfdA7pB4bIObPw1Pt3QF4V68F/LZHBIXcYamhADOxWlHko8qhZcHQ==","signatures":[{"sig":"MEUCIDIvoVUM6tAnUQJgefjP1Nhe43GkQG+n4FaO/1Lydva7AiEAjlydUym1aR5CvBhy/XFn6KMy/tctJoJF0j99F6fwPZE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25280},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"55f79fc389d6933a3a9659c77e3f23eb13be379c","_npmUser":{"name":"adasko","actor":{"name":"adasko","type":"user","email":"adaskothebeast@gmail.com"},"email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"10.9.2","description":"## What problem does this set of libraries solve?","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_6.0.0_1750514234600_0.9225096606266792","host":"s3://npm-registry-packages-npm-production"}},"7.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"7.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@7.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"3cf2ea0777fe720be07cdf13579c4bcd962b6c53","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-7.0.0.tgz","fileCount":8,"integrity":"sha512-OMb5bundmjXKom81JRqqX90hjx1rJMzAcc8yOz0askBwsdYQTKTKlZ5c/pPq38r1HTfb9RhJbpGlgz8XN6a5hQ==","signatures":[{"sig":"MEYCIQCAGsHMo11lvTzQXXjJOigq+anVVXO3h6GaEgP+PAGghQIhAItYZWDZdza5jD8d9AZWv+N5mo9RWko/S8nHda0lsdfG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25280},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"4b1f3945958b60806b57550bbd812ae9fbca679b","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"10.9.3","description":"Working with dates and durations in JSON can be cumbersome and error-prone due to the lack of a standard format for date-time serialization. JSON, by its nature, does not have a specific data type for dates or durations. As a result, dates are usually ser","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_7.0.0_1760268482454_0.5641097403906348","host":"s3://npm-registry-packages-npm-production"}},"8.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"8.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@8.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"c37041084326c0cd4846b9adbef96b4ce411984f","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-8.0.0.tgz","fileCount":8,"integrity":"sha512-/EBWeERlUkx+aQv80Any08c39GqxmUBfXaTr2h/si65gCi+cX4m7AQ09Ld2bC/5TQcZzfuNZEEt/BbwobXH9ew==","signatures":[{"sig":"MEQCIAfETYf1L0sE8/dz2RjXVdgLtdUuxd/1s6rVu/LSKCG3AiB+jL2QslMHafw9gvCNSw4L67w5WbAf7o51gyyIZaA3rw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46035},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","gitHead":"b452bdb4251a869fc28fbf45cb6916616651a876","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"11.6.2","description":"> **Production-ready, security-hardened date/time conversion for JSON APIs**   > Automatically converts ISO 8601 date strings in JSON responses into native Date objects — deeply, safely, and blazingly fast.","directories":{},"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_8.0.0_1763833662482_0.12095130826294254","host":"s3://npm-registry-packages-npm-production"}},"9.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"9.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@9.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"e653138e0d5978383ece91397bebebf1fe0a199a","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-9.0.0.tgz","fileCount":8,"integrity":"sha512-6Y4aQ0b62w+OpY3DnymCqoEDVy7zu7DEy91us8Qc+nQuPU6+fD0nqlauDzp49efJlbKc2XK74TzU1wSDR202qQ==","signatures":[{"sig":"MEUCIFEQ+aoCYhltHEbByRsGD0GU2VzaET/c0e1w8pMPdLYpAiEArMuCAW7TmTd2c83diPXqY2oLOfgoYbNkxHKWvx8cOrs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaskothebeast%2fhierarchical-convert-to-moment@9.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46129},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eb0eec09-be53-41f6-9fd4-f98c9c334ea8"}},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"11.6.2","description":"> **Production-ready, security-hardened date/time conversion for JSON APIs**   > Automatically converts ISO 8601 date strings in JSON responses into native Date objects — deeply, safely, and blazingly fast.","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_9.0.0_1767539366928_0.3298693673029005","host":"s3://npm-registry-packages-npm-production"}},"9.0.1":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"9.0.1","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@9.0.1","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"5f8c02dca70929d0283a1ec2a4abb903330e6962","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-9.0.1.tgz","fileCount":8,"integrity":"sha512-drmdq92g8QAdjCnQ5C4XeJ+Ha+vghAE0R7aSFD70MWGO2RO4EBkOFAzUBqHivtoeHkZyKyQwJezwr0PwG0NnYQ==","signatures":[{"sig":"MEYCIQDY54NQjxpPl0WRaaTwf/brOHo53O+j+E7xMR17IOVXtgIhAMtmbU7GvnIKq9iWKO12rIWEbs+jI53LU7jLqkq9dUYE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaskothebeast%2fhierarchical-convert-to-moment@9.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46129},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eb0eec09-be53-41f6-9fd4-f98c9c334ea8"}},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"11.6.2","description":"> **Production-ready, security-hardened date/time conversion for JSON APIs**   > Automatically converts ISO 8601 date strings in JSON responses into native Date objects — deeply, safely, and blazingly fast.","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_9.0.1_1767539928495_0.3626299388106389","host":"s3://npm-registry-packages-npm-production"}},"9.1.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"9.1.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@9.1.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"82d1828d24d6a3d36903525256201d69c64ae9bc","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-9.1.0.tgz","fileCount":8,"integrity":"sha512-jnin/bbz3hwEAuJdHlXRk617WcnZ+LekaqkVR7F3XSKKq07VFVirNIo0vs7AHjCMd3LXPASHir8MZr21rpfTFg==","signatures":[{"sig":"MEQCICyWNLCfbi4NaqwPtrfzHGcxWbYuVKeh7872pyjkd5ibAiBlYc7ByEWQBeBPXjocsuj3vq/o5dRAuuboV+z/UxuolQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaskothebeast%2fhierarchical-convert-to-moment@9.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46129},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eb0eec09-be53-41f6-9fd4-f98c9c334ea8"}},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"11.11.0","description":"> **Production-ready, security-hardened date/time conversion for JSON APIs**   > Automatically converts ISO 8601 date strings in JSON responses into native Date objects — deeply, safely, and blazingly fast.","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_9.1.0_1775284649941_0.762123549165596","host":"s3://npm-registry-packages-npm-production"}},"10.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"10.0.0","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@10.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"2c2685d81dfd2907b0e66bf431f95244150d279c","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-10.0.0.tgz","fileCount":18,"integrity":"sha512-R4bHjTlZFNaRwsFwauEATscc++RYred6BZpFOnz8vVMbAa4oYkmKBnKTrdsNAyRuMMDoRHsanJSPgl2CvIR2Ww==","signatures":[{"sig":"MEQCIC37ilbeUCo/eo3jj+rTbdg6EWNPUQ61ozQZqRmaYsjzAiAZ2NWc+DiX+4mgQls9pVhKQRkt+G8c9G543r8p2Gycbg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113917},"gitHead":"d939a562c5f5947e98df253b28d384399481063e","_npmUser":{"name":"adasko","email":"adaskothebeast@gmail.com"},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"11.16.0","description":"**Moment.js bindings for [date-interceptors](https://github.com/AdaskoTheBeAsT/date-interceptors): walk a parsed JSON payload and turn ISO 8601 strings into `Moment` and `moment.Duration` values, plus a schema-driven Moment backend for the typewriter runt","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1","@adaskothebeast/typewriter-runtime":"10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_10.0.0_1785246957934_0.7147277946500787","host":"s3://npm-registry-packages-npm-production"}},"10.0.2":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"10.0.2","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@10.0.2","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"3cf37ab0eeb48aa85f2363f66ce07beb29b7791f","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-10.0.2.tgz","fileCount":11,"integrity":"sha512-YlsJ9e2nX6AbUSfeAp4/sURx7yAQTv2NY/cVJQCqjOho9yHx67oxsh2nTZNpInZIsOR4A4RYokY6Sbmluw+ekg==","signatures":[{"sig":"MEUCIBHY2hTnHajlIDP5l0CbPebRU1IEdwtoRMXKrbaEfDHZAiEA8tK2yb4+/FZSNBYPNpQWAQOQ/TxKvjMt8L5dFDJMuqI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaskothebeast%2fhierarchical-convert-to-moment@10.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28709},"main":"./src/index.js","type":"commonjs","types":"./src/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eb0eec09-be53-41f6-9fd4-f98c9c334ea8"}},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git"},"_npmVersion":"11.16.0","description":"**Moment.js bindings for [date-interceptors](https://github.com/AdaskoTheBeAsT/date-interceptors): walk a parsed JSON payload and turn ISO 8601 strings into `Moment` and `moment.Duration` values, plus a schema-driven Moment backend for the typewriter runt","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"peerDependencies":{"tslib":"^2.8.1","moment":"^2.30.1","@adaskothebeast/typewriter-runtime":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_10.0.2_1785252311518_0.7713704972090953","host":"s3://npm-registry-packages-npm-production"}},"11.0.0":{"name":"@adaskothebeast/hierarchical-convert-to-moment","version":"11.0.0","keywords":["moment","date","duration","iso8601","converter","json","typescript"],"author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","_id":"@adaskothebeast/hierarchical-convert-to-moment@11.0.0","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors/tree/main/libs/hierarchical-convert-to-moment#readme","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"e2879ba6504eed920713efe13ae436a1865abe04","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-11.0.0.tgz","fileCount":13,"integrity":"sha512-AE6yVMgGR9lAXbLFfqNohicIqUyAWQ/thqz5xXkbuZJDi+7Tp+oAdcOVXQDx4AXryfIEb5niLQmA45KRHPPBAA==","signatures":[{"sig":"MEUCIFjOh5aeqZKpuh2Ifos6TR9IzK+iZT9RaceZOxaRTCz4AiEAvcDFXw2Iii4LKZB0wcur0rhzF10/5qGZ562aAw/46Hc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIG9u9tkPZcYzflzHpSAOn243d3+eLOGSaxdfXNC7J1qDAiEAuBSgCvDnMh2u9Cg7cyzS2sQzYJhJFrFMAUOws7xu8oo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaskothebeast%2fhierarchical-convert-to-moment@11.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27326},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.esm.js","engines":{"node":">=22.12"},"exports":{".":{"import":{"types":"./index.d.ts","default":"./index.esm.js"},"require":{"types":"./index.d.cts","default":"./index.cjs"}},"./package.json":"./package.json"},"gitHead":"23dc193eb4d8d834b51de51e1900225a26c143ff","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eb0eec09-be53-41f6-9fd4-f98c9c334ea8"}},"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git","directory":"libs/hierarchical-convert-to-moment"},"_npmVersion":"11.19.0","description":"Deep, in-place conversion of ISO 8601 dates and durations in JSON payloads into Moment values, plus a Moment backend for the Typewriter runtime.","directories":{},"sideEffects":false,"_nodeVersion":"26.10.0","dependencies":{"@adaskothebeast/hierarchical-convert-core":"^11.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"moment":"^2.30.1"},"_npmOperationalInternal":{"tmp":"tmp/hierarchical-convert-to-moment_11.0.0_1790551318190_0.7076495262037277","host":"s3://npm-registry-packages-npm-production"}},"11.0.1":{"_id":"@adaskothebeast/hierarchical-convert-to-moment@11.0.1","bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"dist":{"shasum":"22b74e05b48054a2a152ae9750b93b05b0e68ce0","tarball":"https://registry.npmjs.org/@adaskothebeast/hierarchical-convert-to-moment/-/hierarchical-convert-to-moment-11.0.1.tgz","fileCount":13,"integrity":"sha512-bNCIfWS0vVV97aSD6vZ09moAgQIQSjPbAR5GVs4prv3zVaVjiQN7K2rK/aCGCp0kj4QKGIGflM+Wt/qu8AUeSA==","signatures":[{"sig":"MEYCIQDiU7nz4U+vObmtVXtpdzhbZ9HIZ2uTscEGUnQVCOH5DwIhANO+phT1j70leYW/injglPZAHU/Aoh/Uk9eYp9SnRKep","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD8YGk93eRmYgzKHGkAGiccXr1u7SIYpiCbfZ8uwryMCQIgJaDEsmxBHXG03CkBLy3z0oydUv/nI2jx7smQNMIuRQ0="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaskothebeast%2fhierarchical-convert-to-moment@11.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":26704},"main":"./index.cjs","name":"@adaskothebeast/hierarchical-convert-to-moment","type":"module","types":"./index.d.ts","author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"module":"./index.esm.js","engines":{"node":">=22.12"},"exports":{".":{"import":{"types":"./index.d.ts","default":"./index.esm.js"},"require":{"types":"./index.d.cts","default":"./index.cjs"}},"./package.json":"./package.json"},"gitHead":"f9edf319c5e23bf1a17f5ec4eb8dac0008b9fd26","license":"MIT","version":"11.0.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"eb0eec09-be53-41f6-9fd4-f98c9c334ea8"}},"homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors/tree/main/libs/hierarchical-convert-to-moment#readme","keywords":["moment","date","duration","iso8601","converter","json","typescript"],"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git","directory":"libs/hierarchical-convert-to-moment"},"_npmVersion":"11.19.0","description":"Deep, in-place conversion of ISO 8601 dates and durations in JSON payloads into Moment values, plus a Moment backend for the Typewriter runtime.","directories":{},"maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.10.0","dependencies":{"@adaskothebeast/hierarchical-convert-core":"^11.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"moment":"^2.30.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hierarchical-convert-to-moment_11.0.1_1790749958657_0.8907410240560458"}}},"time":{"created":"2023-07-22T17:13:19.803Z","modified":"2026-09-30T06:32:39.074Z","1.0.0":"2023-07-22T17:13:20.034Z","1.1.0":"2023-07-24T07:38:44.966Z","1.2.0":"2023-08-02T22:38:00.341Z","2.0.0":"2023-11-11T14:58:21.380Z","3.0.0":"2024-01-06T16:20:07.274Z","4.0.1":"2024-05-28T17:52:32.358Z","5.0.0":"2025-01-03T10:23:48.029Z","6.0.0":"2025-06-21T13:57:14.792Z","7.0.0":"2025-10-12T11:28:02.683Z","8.0.0":"2025-11-22T17:47:42.708Z","9.0.0":"2026-01-04T15:09:27.080Z","9.0.1":"2026-01-04T15:18:48.634Z","9.1.0":"2026-04-04T06:37:30.078Z","10.0.0":"2026-07-28T13:55:58.103Z","10.0.2":"2026-07-28T15:25:11.669Z","11.0.0":"2026-09-27T23:21:58.280Z","11.0.1":"2026-09-30T06:32:38.753Z"},"bugs":{"url":"https://github.com/AdaskoTheBeAsT/date-interceptors/issues"},"author":{"url":"https://github.com/adaskothebeast","name":"Adam Pluciński","email":"adaskothebeast@gmail.com"},"license":"MIT","homepage":"https://github.com/AdaskoTheBeAsT/date-interceptors/tree/main/libs/hierarchical-convert-to-moment#readme","keywords":["moment","date","duration","iso8601","converter","json","typescript"],"repository":{"url":"git+https://github.com/AdaskoTheBeAsT/date-interceptors.git","type":"git","directory":"libs/hierarchical-convert-to-moment"},"description":"Deep, in-place conversion of ISO 8601 dates and durations in JSON payloads into Moment values, plus a Moment backend for the Typewriter runtime.","maintainers":[{"name":"adasko","email":"adaskothebeast@gmail.com"}],"readme":"# ⏱️ @adaskothebeast/hierarchical-convert-to-moment\n\n**Moment.js bindings for [date-interceptors](https://github.com/AdaskoTheBeAsT/date-interceptors): walk a parsed JSON payload and turn ISO 8601 strings into `Moment` and `moment.Duration` values, plus a schema-driven Moment backend for the typewriter runtime.**\n\n[![npm](https://img.shields.io/npm/v/%40adaskothebeast%2Fhierarchical-convert-to-moment?color=cb3837&logo=npm)](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-moment)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nPeer dependencies: `moment` and, for the backend export, `@adaskothebeast/typewriter-runtime`. Runtime dependency: the dependency-free `@adaskothebeast/hierarchical-convert-core`.\n\n---\n\n## 📦 Install\n\n```bash\nnpm i @adaskothebeast/hierarchical-convert-to-moment moment @adaskothebeast/typewriter-runtime\n```\n\nMoment ships its own typings, so no `@types/*` package is needed. `moment-timezone` is not used anywhere in this package; add it only if **your** code needs named IANA zones.\n\nThe runtime peer is only needed for `momentDateBackend`. If you use nothing but `hierarchicalConvertToMoment`, `moment` alone is enough.\n\n---\n\n## 🎯 What it does\n\nThe package ships two independent pieces.\n\n`hierarchicalConvertToMoment` is the **schema-less** path. It walks the arrays and plain objects of an already-parsed JSON value depth first and replaces every ISO 8601 date-time or duration string with a Moment object, **mutating the input in place** and returning `void`. Nothing is cloned. Traversal is shared with the other converters through `hierarchical-convert-core`: own `__proto__`, `constructor` and `prototype` keys are skipped so a hostile payload cannot reach `Object.prototype`, class instances (including existing Moments) are not entered, cycles are visited once, and the root plus 100 nested levels are walked. The full rules and a per-backend duration precision table are in the repository [conversion contract](https://github.com/AdaskoTheBeAsT/date-interceptors/blob/main/docs/conversion-contract.md#heuristic-date-conversion).\n\n`momentDateBackend` is the **schema-driven** path. It is a plain object (`{ name: 'moment', codecs }`) that satisfies the `DateBackend` contract from `@adaskothebeast/typewriter-runtime`, so you can hand it to `transformJson`, `createJsonTransformer`, `serializeJson` or `createJsonSerializer` as `options.dateBackend`. It deliberately advertises **only the four kinds Moment can represent faithfully**, so the runtime reports the rest as unsupported instead of quietly mangling them.\n\n---\n\n## 🧰 API\n\n| Export                                            | Signature / shape                                                                                              | Notes                                                                                         |\n| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `hierarchicalConvertToMoment(obj: unknown): void` | Mutates `obj` in place. (Before 11.0.0 the signature also exposed internal `depth` and `visited` parameters.)  | Returns `undefined`. Non-objects and `null` are ignored.                                      |\n| `momentDateBackend`                               | `{ readonly name: 'moment'; readonly codecs: { instant, 'plain-date', 'plain-date-time', duration, period } }` | Declared with `satisfies DateBackend`, so it is a value, not a class. Nothing to instantiate. |\n\n`momentDateBackend.codecs`:\n\n| Kind              | Moment type       | Wire form accepted by `parse`                               | `serialize` output                  |\n| ----------------- | ----------------- | ----------------------------------------------------------- | ----------------------------------- |\n| `instant`         | `moment.Moment`   | `2024-01-02T03:04:05.678+02:00`, offset or `Z` **required** | `clone().utc().toISOString()`       |\n| `plain-date`      | `moment.Moment`   | `2024-01-02` (strict `YYYY-MM-DD`)                          | `format('YYYY-MM-DD')`              |\n| `plain-date-time` | `moment.Moment`   | `2024-01-02T03:04`, `…:05`, `…:05.678` (no offset)          | `format('YYYY-MM-DDTHH:mm:ss.SSS')` |\n| `duration`        | `moment.Duration` | any signed ISO duration, for example `P1Y2M3DT4H5M6.7S`     | `value.toISOString()`               |\n| `period`          | `moment.Duration` | identical to `duration` (the same codec object is reused)   | `value.toISOString()`               |\n\nNot advertised, on purpose: `plain-time`, `zoned-date-time`, `plain-year-month`, `plain-month-day`. The unit tests assert their absence.\n\n`is` is `moment.isMoment` for the three instant-like codecs and `moment.isDuration` for the duration codec. `parse` throws `RangeError` on anything it cannot represent.\n\n---\n\n## ⚡ Usage\n\nSchema-less, over an Axios response:\n\n```ts\nimport { AxiosInstanceManager } from '@adaskothebeast/axios-interceptor';\nimport { hierarchicalConvertToMoment } from '@adaskothebeast/hierarchical-convert-to-moment';\n\nconst api = AxiosInstanceManager.createInstance(hierarchicalConvertToMoment);\n\nconst { data } = await api.get('/orders/42');\n// data.createdAt is a Moment, data.slaWindow is a moment.Duration\n```\n\nSchema-less, over an Angular `HttpClient` response:\n\n```ts\nimport { HIERARCHICAL_DATE_ADJUST_FUNCTION } from '@adaskothebeast/angular-date-http-interceptor';\nimport { hierarchicalConvertToMoment } from '@adaskothebeast/hierarchical-convert-to-moment';\n\nproviders: [{ provide: HIERARCHICAL_DATE_ADJUST_FUNCTION, useValue: hierarchicalConvertToMoment }];\n```\n\nDirect call on any parsed payload:\n\n```ts\nimport { hierarchicalConvertToMoment } from '@adaskothebeast/hierarchical-convert-to-moment';\n\nconst payload = JSON.parse(body) as unknown;\nhierarchicalConvertToMoment(payload);\n```\n\nSchema-driven, through the typewriter runtime:\n\n```ts\nimport { momentDateBackend } from '@adaskothebeast/hierarchical-convert-to-moment';\nimport { createJsonTransformer } from '@adaskothebeast/typewriter-runtime';\nimport { schema } from '@adaskothebeast/typewriter-schema';\nimport type moment from 'moment';\n\nconst orderSchema = schema.object<{ createdAt: moment.Moment; slaWindow: moment.Duration }>({\n  createdAt: schema.instant(),\n  slaWindow: schema.duration(),\n});\n\nconst toOrder = createJsonTransformer(orderSchema, undefined, {\n  mode: 'strict',\n  dateBackend: momentDateBackend,\n});\n\nconst order = toOrder({ createdAt: '2024-01-02T03:04:05.678+02:00', slaWindow: 'PT1H30M' });\n// order.createdAt is a Moment already switched to UTC mode\n```\n\n---\n\n## 🎛️ Options and configuration\n\n`hierarchicalConvertToMoment` has no options.\n\n`momentDateBackend` has no options either. It is a singleton value and is safe to share between transformers. Everything else is decided by the runtime:\n\n- `mode: 'strict'` makes an unparsable value, or a kind this backend does not advertise, throw `JsonTransformationError`; the default tolerant mode leaves the raw string in place.\n- `maxDepth` (runtime option, default `100`) caps schema recursion independently of the traversal cap above.\n- Omit `dateBackend` and the runtime falls back to its built-in `temporalDateBackend`.\n\n---\n\n## 📤 Output examples\n\n`hierarchicalConvertToMoment`:\n\n| Input value                       | Result                                                                                |\n| --------------------------------- | ------------------------------------------------------------------------------------- |\n| `'2023-07-17T23:06:00.000Z'`      | `moment('2023-07-17T23:06:00.000Z')` (local mode)                                     |\n| `'2023-07-17T23:06:00.000+01:00'` | `moment('2023-07-17T23:06:00.000+01:00')` (shifted to the local zone)                 |\n| `'2023-07-17T23:06:00'`           | `moment('2023-07-17T23:06:00')` (local time)                                          |\n| `'2023-02-30T00:00:00Z'`          | unchanged string (impossible calendar date)                                           |\n| `'-PT1,5S'`                       | `moment.duration(-1500)` (sign and decimal comma accepted natively)                   |\n| `'P0D'`                           | `moment.duration({ days: 0 })`                                                        |\n| `'P4W'`                           | `moment.duration({ weeks: 4 })`, stored internally as 28 days                         |\n| `'P1Y2M4DT2H3M2S'`                | `moment.duration({ years: 1, months: 2, days: 4, hours: 2, minutes: 3, seconds: 2 })` |\n| `'adam'`                          | unchanged                                                                             |\n\n```text\nin : { someNewObj: { text: 'adam', date: '2023-07-17T23:06:00.000Z' } }\nout: { someNewObj: { text: 'adam', date: Moment } }       // same object, mutated\n```\n\n`momentDateBackend`:\n\n```text\ninstant          '2024-01-02T03:04:05.678+02:00' -> UTC Moment -> '2024-01-02T01:04:05.678Z'\nplain-date       '2024-01-02'                    -> local midnight Moment -> '2024-01-02'\nplain-date-time  '2024-01-02T03:04:05.678'       -> local Moment -> '2024-01-02T03:04:05.678'\nplain-date-time  '2024-01-02T03:04'              -> local Moment -> '2024-01-02T03:04:00.000'\nduration         'P1Y2M3DT4H5M6.7S'              -> Duration -> 'P1Y2M3DT4H5M6.7S'\n```\n\n---\n\n## ⚠️ Edge cases\n\n- **In-place mutation.** The traversal rewrites your object graph and returns nothing. Clone the payload first if the caller must keep the raw strings.\n- **Prototype-pollution keys are skipped.** Own `__proto__`, `constructor` and `prototype` keys are never entered or written, and only own enumerable properties are visited.\n- **Only arrays and plain objects are entered (11.0.0).** Class instances, `Map`, `Set`, and existing Moments are left untouched, so running the converter twice is a no-op. Before 11.0.0 a second pass entered each Moment and rewrote its internal `_i` input field into another Moment. Frozen objects and read-only properties keep their strings instead of throwing.\n- **Depth cap.** The root plus 100 nested levels are walked; deeper branches are left untouched with no error.\n- **Cycles are visited once.** A repeated object reference is skipped on the second encounter.\n- **Seconds are required and fractions are truncated.** `2023-07-17T23:06` stays a string. One to nine fraction digits are accepted and truncated (never rounded) to milliseconds.\n- **No Moment deprecation warnings from the traversal.** Every candidate is validated by the shared ISO recogniser before `moment(v)` is called, so the library never falls back to `new Date(string)` and never prints the \"not in a recognized ISO format\" warning. That also means anything Moment could have salvaged loosely (`07/17/2023`, `2023-07-17 23:06`) is intentionally left alone.\n- **Durations are not validity checked by the traversal.** A recognised duration string is passed to `moment.duration` and assigned, unlike dates, which are assigned only when `isValid()` is true. The shared duration syntax is strict enough that this is safe in practice.\n- **The traversal duration syntax is narrower than Moment's.** Signed durations and fractional seconds with `.` or `,` convert, but fractions on larger units such as `P1.5D` stay strings, while `momentDateBackend.codecs.duration` accepts them. `toISOString()` renders sub-millisecond seconds as milliseconds (`PT0.123456789S` becomes `PT0.123S`).\n- **Moment carries units, so duration shapes change.** `moment.duration` normalizes on construction: 90 minutes becomes 1 hour 30 minutes, weeks are stored as days, and `toISOString()` therefore re-serializes `P1W` in day form rather than as weeks. Keep the original string next to the parsed value if the exact authored unit matters.\n- **Local versus UTC mode.** The traversal produces local-mode Moments, so `.format()` renders in the machine zone. The `instant` codec explicitly does `parseZone(..., ISO_8601, true).utc()`, so its results are already in UTC mode (`value.isUTC() === true`). `plain-date` and `plain-date-time` are parsed in local mode on purpose so that no zone shift can change the calendar day.\n- **`plain-date-time` serialization is asymmetric.** Input may omit seconds and milliseconds, but output is always `YYYY-MM-DDTHH:mm:ss.SSS`, so `2024-01-02T03:04` round-trips to `2024-01-02T03:04:00.000`. Its parse pattern also requires exactly three fractional digits when present, while `instant` accepts one to three.\n- **`is` does not check validity.** `moment.isMoment` is `true` for `moment('nope')` and `moment.invalid()`, so an invalid Moment already present in the input is passed through untouched by the runtime, and the failure only surfaces later as `RangeError: Invalid instant value` when you serialize.\n- **`is` cannot distinguish the three Moment kinds** from each other, so an `instant` value satisfies a `plain-date` node and vice versa. Only the string parse paths are strict.\n- **Four kinds are unsupported by design.** A `plain-time`, `zoned-date-time`, `plain-year-month` or `plain-month-day` schema node produces `Date backend \"moment\" does not support …`: a thrown `JsonTransformationError` in strict mode, or the untouched string in tolerant mode. Use [`-js-joda`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-js-joda) or [`-luxon`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-luxon) if you need them.\n- Moment is in maintenance mode upstream. For new code prefer the Luxon, Day.js or js-joda packages; both backends can coexist during a gradual migration because the choice is per transformer.\n\n---\n\n## 🔗 Related packages\n\n- Same job, other libraries: [`hierarchical-convert-to-date`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-date), [`-date-fns`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-date-fns), [`-dayjs`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-dayjs), [`-luxon`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-luxon), [`-js-joda`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-js-joda), [`-temporal`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-temporal)\n- Other value kinds: [`-decimal`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-decimal), [`-uuid`](https://www.npmjs.com/package/@adaskothebeast/hierarchical-convert-to-uuid)\n- Transports: [`angular-date-http-interceptor`](https://www.npmjs.com/package/@adaskothebeast/angular-date-http-interceptor), [`axios-interceptor`](https://www.npmjs.com/package/@adaskothebeast/axios-interceptor), [`react-redux-toolkit-hierarchical-date-hook`](https://www.npmjs.com/package/@adaskothebeast/react-redux-toolkit-hierarchical-date-hook)\n- Schema stack: [`typewriter-schema`](https://www.npmjs.com/package/@adaskothebeast/typewriter-schema), [`typewriter-runtime`](https://www.npmjs.com/package/@adaskothebeast/typewriter-runtime), [`typewriter-http-angular`](https://www.npmjs.com/package/@adaskothebeast/typewriter-http-angular), [`typewriter-http-axios`](https://www.npmjs.com/package/@adaskothebeast/typewriter-http-axios), [`typewriter-http-fetch`](https://www.npmjs.com/package/@adaskothebeast/typewriter-http-fetch)\n\nFull matrix and adapter recipes: [main README](https://github.com/AdaskoTheBeAsT/date-interceptors#readme).\n\n---\n\n## 📄 License\n\n[MIT](./LICENSE) © Adam Pluciński\n","readmeFilename":"README.md"}