{"_id":"@allure-ai/ts-case-convert","_rev":"1-e825eb574c4edb618179f020df265760","name":"@allure-ai/ts-case-convert","dist-tags":{"latest":"2.0.3"},"versions":{"0.0.0":{"name":"@allure-ai/ts-case-convert","description":"Typescript type-preserving conversion of objects between camelCase and snake_case","repository":{"type":"git","url":"git+https://github.com/allure-ai/ts-case-convert.git"},"scripts":{"clobber":"npx projen clobber","compile":"npx projen compile","test:compile":"npx projen test:compile","test":"npx projen test","build":"npx projen build","test:watch":"npx projen test:watch","test:update":"npx projen test:update","bump":"npx projen bump","unbump":"npx projen unbump","upgrade-dependencies":"npx projen upgrade-dependencies","upgrade-projen":"npx projen upgrade-projen","default":"npx projen default","watch":"npx projen watch","package":"npx projen package","eslint":"npx projen eslint","projen":"npx projen","start":"npx projen start"},"author":{"name":"Ross Williams","email":"ross@UniversalConstructor.co.uk"},"devDependencies":{"@types/jest":"^26.0.23","@types/node":"^10.17.0","@typescript-eslint/eslint-plugin":"^4.28.1","@typescript-eslint/parser":"^4.28.1","eslint":"^7.29.0","eslint-import-resolver-node":"^0.3.4","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-import":"^2.23.4","jest":"^27.0.6","jest-junit":"^12","json-schema":"^0.3.0","npm-check-updates":"^11","projen":"^0.24.17","standard-version":"^9","ts-jest":"^27.0.3","typescript":"4.3.5"},"keywords":["PascalCase","camel-case","camelCase","conversion","pascal-case","snake-case","snake_case","typescript"],"main":"lib/index.js","license":"Apache-2.0","version":"0.0.0","jest":{"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"clearMocks":true,"collectCoverage":true,"coverageReporters":["json","lcov","clover","text"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":["/node_modules/"],"testPathIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":["/node_modules/"],"reporters":["default",["jest-junit",{"outputDirectory":"test-reports"}]],"preset":"ts-jest","globals":{"ts-jest":{"tsconfig":"tsconfig.jest.json"}}},"types":"lib/index.d.ts","//":"~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".","bundleDependencies":[],"bugs":{"url":"https://github.com/allure-ai/ts-case-convert/issues"},"homepage":"https://github.com/allure-ai/ts-case-convert#readme","_id":"@allure-ai/ts-case-convert@0.0.0","_integrity":"sha512-Fqjsq3j6UhilidDCJr0DSa1xsEfg0GDwyYREb2O5oz143Xez/frq8NCbAkhjiFIpQLeOdIYP5ozEb24KzSxrqA==","_resolved":"/Users/mhilmy/Documents/GitHub/ts-case-convert/dist/js/allure-ai-ts-case-convert-v0.0.0.tgz","_from":"file:dist/js/allure-ai-ts-case-convert-v0.0.0.tgz","_nodeVersion":"16.13.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-Fqjsq3j6UhilidDCJr0DSa1xsEfg0GDwyYREb2O5oz143Xez/frq8NCbAkhjiFIpQLeOdIYP5ozEb24KzSxrqA==","shasum":"5c5633c28618c3f87491c7b7892e86b3ba14a1d1","tarball":"https://registry.npmjs.org/@allure-ai/ts-case-convert/-/ts-case-convert-0.0.0.tgz","fileCount":13,"unpackedSize":49608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIApe2qfz8wMysX6LoI5F4LBpaqkrxqaTod9WDCJrqiALAiEArjFS96LLORaZubLps6/zDUIXqrf8/aDakQCBYacDCrA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjr700ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoo+g//TbqY64S3yvEMvBsmBaQIiETpj2Rv7IfYwOn3xmPvmUu/z8z4\r\nb6RGvKeFnvriQ3hmeLcNWD+lNXnV/PWVZx9kuyrLKDENPRRqoH/aNf+qAlrK\r\nhp94BBu1OxnW8JKitOYqebFxTFVZ2cAsGc0CyMUDFsRAJDJozfdzfoBFlGh9\r\nmKdDld+7O9mkQXQ84WWnTuXIO1tbvXBYTmPwdKMcmptpTAIr5xz2z5qIgFPz\r\nN/lRQpiVCTesjAx+cs0P9f4j2AQBygDvSxyszobFEpPYNbh8Ec3q/gBNdzNh\r\n9wvLmLDzxDAOMCGiOmgm5p9T+NmIBhH9lQ8mYTn/t5ubUoapdhGeL3m5CXO4\r\nKoEiEe95Wo5UyRrNe75EOLLIN69XADnb8DwO6f9zl9//8nnm0BxUdjmwMAOT\r\nC558doU/VARLWv1M3bb13a2bAZVS9QzfuGKzEubDMKw4+mYdfcT84PtUez8x\r\nHNfo+7U83Wd4VURNUcO29JTKFgzFTxnvzVrMRY/7nxlQEA4w/3CDAg+mjMSV\r\ndPw8QKMUTPb34886HWfTSCksrn13Y1Abbn1eAiFhVvVWH4ROV4S/3cz903Nt\r\nOju7hC5FXjvB0/+NdSG6HSUD0VjAJoqVZgAAuPW9Gkoo24ymU5hYNHE97z+P\r\nuyzcnm/dy8SMzYwU5jP8OnBX6cxpX9Qg61o=\r\n=zxQZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"didithilmy","email":"npm@hilmy.org"},"directories":{},"maintainers":[{"name":"didithilmy","email":"npm@hilmy.org"},{"name":"allureai","email":"opensource@allure.id"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-case-convert_0.0.0_1672461620707_0.4855351971967745"},"_hasShrinkwrap":false},"2.0.3":{"name":"@allure-ai/ts-case-convert","description":"Typescript type-preserving conversion of objects between camelCase and snake_case","repository":{"type":"git","url":"git+https://github.com/allure-ai/ts-case-convert.git"},"scripts":{"clobber":"npx projen clobber","compile":"npx projen compile","test:compile":"npx projen test:compile","test":"npx projen test","build":"npx projen build","test:watch":"npx projen test:watch","test:update":"npx projen test:update","bump":"npx projen bump","unbump":"npx projen unbump","upgrade-dependencies":"npx projen upgrade-dependencies","upgrade-projen":"npx projen upgrade-projen","default":"npx projen default","watch":"npx projen watch","package":"npx projen package","eslint":"npx projen eslint","projen":"npx projen","start":"npx projen start"},"author":{"name":"Ross Williams","email":"ross@UniversalConstructor.co.uk"},"devDependencies":{"@types/jest":"^26.0.23","@types/node":"^10.17.0","@typescript-eslint/eslint-plugin":"^4.28.1","@typescript-eslint/parser":"^4.28.1","eslint":"^7.29.0","eslint-import-resolver-node":"^0.3.4","eslint-import-resolver-typescript":"^2.4.0","eslint-plugin-import":"^2.23.4","jest":"^27.0.6","jest-junit":"^12","json-schema":"^0.3.0","npm-check-updates":"^11","projen":"^0.24.17","standard-version":"^9","ts-jest":"^27.0.3","typescript":"4.3.5"},"keywords":["PascalCase","camel-case","camelCase","conversion","pascal-case","snake-case","snake_case","typescript"],"main":"lib/index.js","license":"Apache-2.0","version":"2.0.3","jest":{"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"clearMocks":true,"collectCoverage":true,"coverageReporters":["json","lcov","clover","text"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":["/node_modules/"],"testPathIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":["/node_modules/"],"reporters":["default",["jest-junit",{"outputDirectory":"test-reports"}]],"preset":"ts-jest","globals":{"ts-jest":{"tsconfig":"tsconfig.jest.json"}}},"types":"lib/index.d.ts","//":"~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".","bundleDependencies":[],"gitHead":"81d4449f5d34349278f1597b5ba6a8e3bd72cbb4","bugs":{"url":"https://github.com/allure-ai/ts-case-convert/issues"},"homepage":"https://github.com/allure-ai/ts-case-convert#readme","_id":"@allure-ai/ts-case-convert@2.0.3","_nodeVersion":"16.13.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-7m+DpsaOPwXJCrZCb84+KMhs3Xqe5S/oV0BUTNxgBfrjKsLczncIxcCbDmeRZFCRm2p6KWlCCT/eXq2GCmDT4w==","shasum":"c5ca3edba375ee01b57262932f947c6652ff09c9","tarball":"https://registry.npmjs.org/@allure-ai/ts-case-convert/-/ts-case-convert-2.0.3.tgz","fileCount":11,"unpackedSize":49609,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxqZs6l57mL9BT7OcbUffJJrsXsHZ2ag6ukB893qIX4AiA4R8CDFKXX8gfOMVXfUKvv/hea/Qt+KSw0jYgQ/I7G+w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjr75SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0uA//bp3vdG6lNccAI/d7DBnIbF+YZ8pylSh6pp5Bu+omEQ4GImiU\r\neYHwReTpjys5JeVBWobDmkpq/LXAgXGGGuJ+FQmbf7AOTTVGve70u4AcClpT\r\nhbBll3Awb0zfZ2qhGy5cHqIwQfl3jLzqTIPphfhY022i6X10YHiSBaiOsVBD\r\nSR6LYbLT0fpj0kFn0CrwYNzRSvaqe6cJSR69PAqhSXO3YgGTa3LM7+Ko4oVF\r\ntdFibFBA3WeyE9xyItARVeKF0xMW2NEplB86wQitdURaatzjN0wLHJGIC5EN\r\nhiQUReSq2YSWM4t3myAYfwWSmJGY18ediAPUPnz7rbxmVMD2AJ5BfAGoFjIJ\r\n5heP8l9AzoQ3exYFzpZ1MzMG2DwwMyiyXjRwp2jUW+ifyCiTT7DWN7hKjQbh\r\n00aNiAXL7/+yssDqTZcfa2bExCZpDOoh5QygiLn7LUa28fYAbiDpBbVzfo9l\r\n9QL3jiA5PI25ZS9lRwAKu9SrdC/jNUNGNPCtMs9JIGnd61D4h8gB+Jclaq/q\r\ngmC9ECLD36ryN6pbBLTLoEsqlhRjebEkrYPA7zNOlvS8/WT8xn4epxYcgSuy\r\noqg/ccRJJzuHpBsQ/CwLc2dG8rLv/UVJ81ctC4UEZ5C3nfOiRK6cMwqT8Awy\r\nTVjrmLBFT+C4jB7RgYoQY/AcwG43HjrU3fo=\r\n=nZNz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"didithilmy","email":"npm@hilmy.org"},"directories":{},"maintainers":[{"name":"didithilmy","email":"npm@hilmy.org"},{"name":"allureai","email":"opensource@allure.id"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-case-convert_2.0.3_1672461906049_0.30400203054006947"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-31T04:40:20.652Z","0.0.0":"2022-12-31T04:40:20.897Z","modified":"2022-12-31T04:45:06.301Z","2.0.3":"2022-12-31T04:45:06.211Z"},"maintainers":[{"name":"didithilmy","email":"npm@hilmy.org"},{"name":"allureai","email":"opensource@allure.id"}],"description":"Typescript type-preserving conversion of objects between camelCase and snake_case","homepage":"https://github.com/allure-ai/ts-case-convert#readme","keywords":["PascalCase","camel-case","camelCase","conversion","pascal-case","snake-case","snake_case","typescript"],"repository":{"type":"git","url":"git+https://github.com/allure-ai/ts-case-convert.git"},"author":{"name":"Ross Williams","email":"ross@UniversalConstructor.co.uk"},"bugs":{"url":"https://github.com/allure-ai/ts-case-convert/issues"},"license":"Apache-2.0","readme":"<h1 align=\"center\">ts-case-convert</h1>\n<p>\n  <a href=\"https://codecov.io/gh/RossWilliams/ts-case-convert\">\n    <img src=\"https://codecov.io/gh/RossWilliams/ts-case-convert/branch/main/graph/badge.svg?token=LO2GB8K44W\"/>\n  </a>\n  <a href=\"https://badge.fury.io/js/ts-case-convert\"><img src=\"https://badge.fury.io/js/ts-case-convert.svg\" alt=\"npm version\" height=\"18\"></a>\n  <img alt=\"npm bundle size\" src=\"https://img.shields.io/bundlephobia/minzip/ts-case-convert?style=flat\">\n  <img alt=\"npm type definitions\" src=\"https://img.shields.io/npm/types/ts-case-convert?style=flat\">\n  <img alt=\"GitHub package.json dependency version (dev dep on branch)\" src=\"https://img.shields.io/github/package-json/dependency-version/rosswilliams/ts-case-convert/dev/typescript\">\n  <a href=\"https://github.com/RossWilliams/ts-case-convert#readme\" target=\"_blank\">\n    <img alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" />\n  </a>\n  <a href=\"https://github.com/RossWilliams/ts-case-convert/graphs/commit-activity\" target=\"_blank\">\n    <img alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" />\n  </a>\n  <a href=\"https://github.com/RossWilliams/ts-case-convert/blob/master/LICENSE\" target=\"_blank\">\n    <img alt=\"License: Apache--2.0\" src=\"https://img.shields.io/github/license/RossWilliams/ts-case-convert\" />\n  </a>\n</p>\n\nts-case-convert converts object keys between camelCase and snake_case while preserving Typescript type information, code completion, and type validation. See tests for detailed conversion tests.\n\n## Usage\n\n```typescript\nconst camel = objectToCamel({\n  hello_world: 'helloWorld',\n  a_number: 5,\n  an_array: [1, 2, 4],\n  null_object: null,\n  undef_object: undefined,\n  an_array_of_objects: [{ a_b: 'ab', a_c: 'ac' }],\n  an_object: {\n    a_1: 'a1',\n    a_2: 'a2',\n  },\n});\n\ntype CheckCamel = typeof camel.anArrayOfObjects[0]['aB']; // -> 'string'\nconst ab: CheckCamel = camel.anArrayOfObjects[0]['aB']; // -> valid\nconsole.log(camel.anArrayOfObjects.aB); // -> 'ab'\n\nconst snake = objectToSnake({\n  helloWorld: 'helloWorld',\n  aNumber: 5,\n  anArray: [1, 2, 4],\n  nullObject: null,\n  undefObject: undefined,\n  anArrayOfObjects: [{ aB: 'ab', aC: 'ac' }],\n  anObject: {\n    A1: 'a_1',\n    A2: 'a_2',\n  },\n});\n\ntype CheckSnake = typeof snake.an_array_of_objects[0]['a_b']; // -> 'string'\nconst ab: CheckSnake = snake.an_array_of_objects[0]['a_b']; // -> valid\nconsole.log(snake.an_array_of_objects.a_b); // -> 'ab'\n```\n\n## Run tests\n\n```sh\nyarn run test\n```\n\n## Documentation\n\nSee [tests](./test/caseConvert.test.ts).\n\n## 📝 License\n\nCopyright © 2021 [Ross Williams](https://github.com/RossWilliams).<br />\nThis project is [Apache--2.0](https://github.com/RossWilliams/ts-case-convert/blob/master/LICENSE) licensed.\n","readmeFilename":"README.md"}