{"_id":"pg-camelcase","_rev":"8-fde1abb8b46111d51d6443d2e716e165","name":"pg-camelcase","description":"camel-casing for postgres result field names","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"pg-camelcase","version":"0.0.1","description":"camel-casing for postgres result field names","main":"index.js","scripts":{"runTests":"mocha --reporter list","test":"npm run lint && npm run runTests","lint":"jshint --verbose *.js"},"keywords":["pg","postgres","camelCase","result"],"author":{"name":"Hannes Hörl","email":"hannes.hoerl+pgcamelcase@snowreporter.com"},"license":"ISC","devDependencies":{"mocha":"^1.20.0","jshint":"^2.5.1"},"optionalDependencies":{"pg":"*","pg.js":"*"},"dependencies":{"pg":"*","pg.js":"*"},"_id":"pg-camelcase@0.0.1","dist":{"shasum":"846af52a387d561584e0a96759b72f1dacccb57e","tarball":"https://registry.npmjs.org/pg-camelcase/-/pg-camelcase-0.0.1.tgz","integrity":"sha512-hGzaqfKbnEO1F8s1x8Fl7b8DeKbfIO0TQl0Ew0cUA6CcahQhdaWLYpsLST3pFT4UvcAEvvqxTRAWWLgypRK9Zw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfu4NqPl+CTRq30+hcayuwc4ScVOSfEYEG5DQUJf565AIgXHEoQGweTQ9FWAPUaDZbDI5m989KnscilKl8YikgVfg="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"},"maintainers":[{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"}]},"0.0.2":{"name":"pg-camelcase","version":"0.0.2","description":"camel-casing for postgres result field names","main":"index.js","scripts":{"runTests":"mocha --reporter list","test":"npm run lint && npm run runTests","lint":"jshint --verbose *.js"},"keywords":["pg","postgres","camelCase","result"],"author":{"name":"Hannes Hörl","email":"hannes.hoerl+pgcamelcase@snowreporter.com"},"license":"ISC","devDependencies":{"mocha":"^1.20.0","jshint":"^2.5.1"},"optionalDependencies":{"pg":"*","pg.js":"*"},"bugs":{"url":"https://github.com/hoegaarden/pg-camelcase/issues"},"repository":{"type":"git","url":"https://github.com/hoegaarden/pg-camelcase.git"},"homepage":"https://github.com/hoegaarden/pg-camelcase","dependencies":{"pg":"*","pg.js":"*"},"_id":"pg-camelcase@0.0.2","dist":{"shasum":"1438d8a64e236187d15751217e5b06f43a5dcb77","tarball":"https://registry.npmjs.org/pg-camelcase/-/pg-camelcase-0.0.2.tgz","integrity":"sha512-rKT0Ylnlt64zSW82ajUEr+m+sxJT9/CR8zKfXhukPbVtIzQwElnaJ3zKXAbxAJTQWfft4pX8TjUdFMZj8Vy2KA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlelDvexq8XuxY9aZ/XCdpm/7EUxzn0bW0X9x836cS8wIgP9EU5ITEcxUvuhoNeHIimJBgKqDYErz/tKkoEZ2AdQ0="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"},"maintainers":[{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"}]},"0.0.3":{"name":"pg-camelcase","version":"0.0.3","description":"camel-casing for postgres result field names","main":"index.js","scripts":{"runTests":"mocha --reporter list","test":"npm run lint && npm run runTests","lint":"jshint --verbose *.js"},"keywords":["pg","postgres","camelCase","result"],"author":{"name":"Hannes Hörl","email":"hannes.hoerl+pgcamelcase@snowreporter.com"},"license":"ISC","devDependencies":{"mocha":"^1.20.0","jshint":"^2.5.1"},"optionalDependencies":{"pg":"*","pg.js":"*"},"bugs":{"url":"https://github.com/hoegaarden/pg-camelcase/issues"},"repository":{"type":"git","url":"https://github.com/hoegaarden/pg-camelcase.git"},"homepage":"https://github.com/hoegaarden/pg-camelcase","dependencies":{"pg":"*","pg.js":"*"},"_id":"pg-camelcase@0.0.3","dist":{"shasum":"b2c5e05b34be5f8211ac46b212dd4e7f2107eb59","tarball":"https://registry.npmjs.org/pg-camelcase/-/pg-camelcase-0.0.3.tgz","integrity":"sha512-FTD4YSs8OYNRKMwpEb0rPdNAIHIjVDKHv3u6kFGAjFMpw8CJwe5lWNKms2J2nRaEXKbvZfdZyWgE72bg/KKkIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4DxUd833bveKEE5SPz5LblcKA64a+vfVIV16xh1apAAiBjt4pJKWeG8cs65o+OnKnOymQwpYOGHCUAIhHo9IklwQ=="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"},"maintainers":[{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"}]}},"readme":"`pg-camelcase`\n==============\n\nAbout\n-----\n\nChanges the fieldnames of a query result from snake_case_nameing to camelCaseNaming.\nThe module exposes two functions:\n\n- `#inject(pg)`: changes the internals of pg to change the result as\ndesribed. Also, it returns a function which can be called to revert\nthis change\n- `#camelCase(str)`: returns the string `str` converted to camel case\n\nExample:\n\n```js\nvar pg = require('pg');\nvar pgCamelCase = require('pg-camelcase');\nvar revertCamelCase = pgCamelCaser(pg);\n\npg.connect(function(err, client, done){\n    client.query('select 1 as \"some_snake_case\"', function(err, res){\n        // should return all field names camel-cased\n        assert.strictEqual(res.row[0].someSnakeCase, 1);\n        done();\n    });\n});\n\nrevertCamelCase(); // deactivate/revert the camel casing\n\npg.connect(function(err, client, done){\n    client.query('select 1 as \"some_snake_case\"', function(err, res){\n        // should not camel case anymore\n        assert.strictEqual(res.row[0].some_snake_case, 1);\n        done();\n    });\n});\n```\n\nTests\n-----\n\nIf you run `npm test` and\n\n- the environment variable `TEST_PG_CONNECTION` is set\n- `pg` or `pg.js` is installed\n\ntests a running against an real server and the real result is checked.\nThis should be the default for the tests on travis.\n","maintainers":[{"name":"hoegaarden","email":"hannes.hoerl+npm@snowreporter.com"}],"time":{"modified":"2022-06-23T19:35:13.260Z","created":"2014-06-01T22:23:50.760Z","0.0.1":"2014-06-01T22:23:50.760Z","0.0.2":"2014-06-01T22:41:20.040Z","0.0.3":"2014-06-02T23:46:11.747Z"},"keywords":["pg","postgres","camelCase","result"],"author":{"name":"Hannes Hörl","email":"hannes.hoerl+pgcamelcase@snowreporter.com"},"license":"ISC","readmeFilename":"README.md","homepage":"https://github.com/hoegaarden/pg-camelcase","repository":{"type":"git","url":"https://github.com/hoegaarden/pg-camelcase.git"},"bugs":{"url":"https://github.com/hoegaarden/pg-camelcase/issues"}}