{"_id":"tg-resources-react-native","_rev":"27-11ebe52c707c40904cd671de369e1dd8","name":"tg-resources-react-native","time":{"modified":"2022-06-27T05:52:53.173Z","created":"2016-06-15T18:02:39.249Z","0.4.0-a2":"2016-06-15T18:02:39.249Z","0.4.0-a3":"2016-06-15T18:20:01.474Z","0.4.0-a4":"2016-06-15T19:26:05.162Z","0.4.0-a5":"2016-06-16T11:32:12.958Z","0.4.0-a6":"2016-06-16T12:05:36.732Z","0.4.0-a7":"2016-06-16T14:15:46.283Z","1.0.0-alpha-1":"2016-06-16T20:30:49.256Z","1.0.0-alpha-2":"2016-06-23T10:28:58.976Z","1.0.0-alpha-3":"2016-06-23T11:09:04.351Z","1.0.0-alpha-4":"2016-09-12T11:55:34.234Z","1.0.0-alpha-5":"2016-09-28T19:00:22.526Z","1.0.0-alpha-6":"2016-11-21T12:07:16.272Z","1.0.0-alpha-7":"2016-11-21T14:46:44.341Z","1.0.0":"2016-12-12T16:55:45.832Z"},"maintainers":[{"email":"jorgen.ader@gmail.com","name":"metsavaht"},{"email":"jyrno42@gmail.com","name":"jyrno42"},{"email":"hi@thorgate.eu","name":"thorgate-main"}],"dist-tags":{"latest":"1.0.0"},"description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","readme":"# tg-resources\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Dependency Status][depstat-image]][depstat-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![Downloads][download-badge]][npm-url]\n\n> Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.\n> Targeted mostly against `DRF` running on `Django` so some logic might not be applicable for\n> other frameworks.\n\n## Install\n\n```sh\nnpm i tg-resources\n```\n\n### react-native\n\nFor react-native please use `tg-resources-react-native` which does not depend on babel-runtime.\n\n#### Migrating to 1.0.0\n\nsee the [Changelog](CHANGELOG.md#migratingto100)\n\n## Basic Usage\n\n```js\nimport Router, { Resource } from \"tg-resources\"\n\nconst onLoad = result => console.log(result);\nconst onError = result => console.error(result);\n\n\nconst api = new Router({\n    cats: new Resource('/cats'),\n    cat: new Resource('/cats/${pk}')\n}, {\n    apiRoot: '/api/v1' // Set api root\n});\n\n// Do a get request to /api/v1/cats?gender=M\napi.cats.fetch(null, {gender: 'M'}).then(onLoad, onError);\n\n// Do a head request to /api/v1/cats?gender=M\napi.cats.head(null, {gender: 'M'}).then(onLoad, onError);\n\n// Do a post request to /api/v1/cats with data: {name: 'Twinky', gender: 'M'}\napi.cats.post(null, null, {name: 'Twinky', gender: 'M'}).then(onLoad, onError);\n\n// Do a patch request to /api/v1/cats/1 with data: {name: 'Tinkelberg'}\napi.cat.patch({pk: 1}, null, {name: 'Tinkelberg'}).then(onLoad, onError);\n\n// Do a put request to /api/v1/cats with data: {pk: 1, name: 'Twinky'}\napi.cats.put(null, null, {pk: 1, name: 'Twinky', gender: 'M'}).then(onLoad, onError);\n\n// Do a delete request to /api/v1/cats/1 with data: {'free':'yes'}\napi.cat.del({pk: 1}, null, {free: 'yes'}).then(onLoad, onError);\n```\n\nPlease note that the router is useful for providing default configuration and grouping\nendpoints. It's still possible to use Resources without a router(see [Resource api](#resource-api))\n\n## <a name=\"configuration\"></a>Configuration\n\n- ``apiRoot`` *(String)*: Base for all resource paths\n- ``headers`` *(Object|Function: Object)*: Optional Function or Object which can be used to add any additional headers to requests.\n- ``cookies`` *(Object|Function)*: Optional Function or Object which can be used to add any additional cookies to requests. Please note\n                                   that in modern browsers this is disabled due to security concerns.\n- ``mutateResponse`` *(Function)*: Optional function with signature `response => response` which can be used to mutate response before\n                                   resolving it.\n- ``statusSuccess`` *(Array[int])*: Array (or a single value) of status codes to treat as a success. Default: [200, 201, 204]\n- ``statusValidationError`` *(Array[int])*: Array (or a single value) of status codes to treat as ValidationError. Default: [400]\n- ``defaultHeaders`` *(Object)*: Object of headers which should be added to all requests: Default: `{ Accept: 'application/json' }`\n- ``parseErrors`` *(int)*: Function used to parse response errors into a ValidationError object. The default handler is built for Django/DRF\n                           errors.\n- ``prepareError`` *(int)*: Function used to normalize a single error. The default handler is built for Django/DRF errors.\n\n## Error handling\n\nWith tg-resources, all errors are Rejected. The logic is best described with an example:\n\n```js\nconst resource = new Resource('user/login');\n\nconst payload = {\n    user: 'foo',\n    passwrod: 'bar'\n};\n\nresource.post(null, payload).then(user => {\n    console.log({\n        type: 'LOGGED_IN',\n        data: {\n            user: user\n        }\n    });\n}, error => {\n    // Network error occurred\n    if (error.isNetworkError) {\n        console.error({\n            type: 'NETWORK_FAILED',\n            data: {\n                error: error\n            }\n        });\n    } else {\n        // Validation error occurred (e.g.: wrong credentials)\n        if (error.isValidationError) {\n            console.error({\n                type: 'LOGIN_FAILED',\n                data: {\n                    message: error.firstError(true),\n                    error: error\n                }\n            });\n\n        } else {\n            // As a last resort, also handle invalid response codes\n            console.error({\n                type: 'SERVER_ERROR',\n                data: {\n                    error: error\n                }\n            });\n        }\n    }\n});\n```\n\n## API\n\n### <a name=\"resource-api\"></a>``Resource``\n\nConstruct a new resource for loading data from a single (or dynamic) endpoint\n\n#### Arguments\n\n1. `apiEndpoint` *(string)*: Endpoint used for this resource. Supports ES6 token syntax, e.g: \"/foo/bar/${pk}\"\n2. `options` *(Object)*: Object containing options for this resource. see [Configuration](#configuration)\n\n#### Tokenized endpoints\n\nThe Resource module also supports dynamic urls by supporting ES6 token syntax. Request methods\ncan then provide values as an object using the first argument `kwargs`.\n\nSo for example:\n\n```js\nnew Resource('/foo/bar/${pk}').get({pk: 1}).then(x => x);\n```\n\nWould result in a GET request to `/foo/bar/1`\n\n#### Returns\n\n*(Resource)*:  Returns instance of `Resource`.\n\n### ``Resource.fetch``\n\nDo a get request to the resource endpoint with optional kwargs and query parameters.\n\n#### Arguments\n\n1. `kwargs={}` *(Object)*: Object containing the replacement values if the resource uses tokenized urls\n2. `query={}` *(Object|string)*: Query parameters to use when doing the request.\n\n#### Returns\n\n*(Promise)*:  Returns a `Promise` that resolves to the remote result or throws if errors occur.\n\n### ``Resource.post``\n\nDo a `method` request to the resource endpoint with optional kwargs and query parameters.\n\n#### Arguments\n\n1. `kwargs={}` *(Object)*: Object containing the replacement values if the resource uses tokenized urls\n2. `data={}` *(Object|string)*: Query parameters to use when doing the request.\n3. `query={}` *(Object|string)*: Query parameters to use when doing the request.\n4. `method='post'` *(string)*: Lowercase name of the HTTP method that will be used for this request.\n\n#### Returns\n*(Promise)*:  Returns a `Promise` that resolves to the remote result or throws if errors occur.\n\n### ``Resource.patch``\n\nAlias for `Resource.post(kwargs, data, query, 'patch')`\n\n### ``Resource.put``\n\nAlias for `Resource.post(kwargs, data, query, 'put')`\n\n### ``Resource.del``\n\nAlias for `Resource.post(kwargs, data, query, 'del')`\n\n### ``BaseResourceError``\n\nGeneric base class for all errors that can happen during requests\n\n#### Attributes\n\n- ``isNetworkError`` *(bool)*: Always ``false``\n- ``isInvalidResponseCode`` *(bool)*: Always ``false``\n- ``isValidationError`` *(bool)*: Always ``false``\n\n### ``NetworkError``\n\nError class used for all network related errors\n\n#### Extends ``BaseResourceError`` and overwrites:\n\n- ``isNetworkError`` *(bool)*: Always ``true``\n\n#### Attributes\n\n- ``error`` *(Error)*: Original Error object that occured during network transport\n\n### ``InvalidResponseCode``\n\nError class used when unexpected response code occurs\n\n#### Extends ``BaseResourceError`` and overwrites:\n\n- ``isInvalidResponseCode`` *(bool)*: Always ``true``\n\n#### Attributes\n\n- ``statusCode`` *(string)*: Response status code\n- ``responseText`` *(int)*: Response body text\n\n### ``ValidationError``\n\nError class used when backend respons with a ``errorStatus``. This object can also be extended via\n``Config.ValidationErrorExtras``.\n\n#### Extends ``InvalidResponseCode`` and overwrites:\n\n- ``isInvalidResponseCode`` *(bool)*: Always ``false``\n- ``isValidationError`` *(bool)*: Always ``true``\n\n#### Methods\n\n##### ``getError``\n\nGet field specific error\n\n###### Arguments\n\n1. ``fieldName`` *(string)*: Field name\n2. ``[allowNonField=false]`` *(bool)*: If true, also check for nonFieldErrors if the specified field does not have an error\n\n###### Returns\n\n*(any)*:  Returns a normalized error for ``fieldName`` or ``null``\n\n##### ``getFieldError``\n\n**Deprecated** alias of ``getError``\n\n##### ``firstError``\n\nGet first error normalized to a string for this ValidationError\n\n###### Arguments\n\n1. ``[allowNonField=false]`` *(bool)*: If true, also check for nonFieldErrors\n\n###### Returns\n\n*(any)*:  First error as a ``string`` or ``null``\n\n## License\n\nMIT © [Thorgate](http://github.com/thorgate)\n\n[npm-url]: https://npmjs.org/package/tg-resources\n[npm-image]: https://img.shields.io/npm/v/tg-resources.svg?style=flat-square\n\n[travis-url]: https://travis-ci.org/thorgate/tg-resources\n[travis-image]: https://img.shields.io/travis/thorgate/tg-resources.svg?style=flat-square\n\n[depstat-url]: https://david-dm.org/thorgate/tg-resources\n[depstat-image]: https://david-dm.org/thorgate/tg-resources.svg?style=flat-square\n\n[coveralls-url]: https://coveralls.io/github/thorgate/tg-resources?branch=master\n[coveralls-image]: https://coveralls.io/repos/github/thorgate/tg-resources/badge.svg?branch=master\n\n[download-badge]: http://img.shields.io/npm/dm/tg-resources.svg?style=flat-square\n","versions":{"1.0.0-alpha-1":{"name":"tg-resources-react-native","version":"1.0.0-alpha-1","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"index.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"NODE_ENV= node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","chai":"3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","rimraf":"^2.5.2","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-1","_shasum":"f76c26a0f19dff2ad5b28de06beac8f883a39592","_from":".","_npmVersion":"2.9.0","_nodeVersion":"4.4.2","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"f76c26a0f19dff2ad5b28de06beac8f883a39592","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-1.tgz","integrity":"sha512-/3yAFKRJMyeF0s/WqSPWdZXUdqkJ62Eemd0NZlscaQQRIrU0dBR9gAkEIrxUORNT8JLXEwa+ZQDlY3EGBZD/rw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5Z/yLs04XOuBzQr5W0mveWbYzoaKTjaVl85bXFE6BPgIhALL0qwFcKOYlkKqmwJ8yjeBt//1VSCvXt+95IzRnIX7W"}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-1.tgz_1466109048212_0.16664567892439663"},"directories":{}},"1.0.0-alpha-2":{"name":"tg-resources-react-native","version":"1.0.0-alpha-2","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","chai":"3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","rimraf":"^2.5.2","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-2","_shasum":"57ea70be4a9f45e1dca20f997981ac5fab648fa6","_from":".","_npmVersion":"2.9.0","_nodeVersion":"4.4.2","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"57ea70be4a9f45e1dca20f997981ac5fab648fa6","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-2.tgz","integrity":"sha512-v0z1bn6Qt59EI/wLYmfWSWIFIppF3o91ZP0Dx/2LxhDN5r608UXwBbxKtIhgsx93IdmcnBmFWawk8dXAFvOKtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe9lhuhpEWHQUaBiVxUi2kmFHrxpvh28W7gQRmPeFbSQIgUz0oxP4Yg4MoZIFCtR2D603m92CbWf3Slu5yir9z9MY="}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-2.tgz_1466677737003_0.14886960457079113"},"directories":{}},"1.0.0-alpha-3":{"name":"tg-resources-react-native","version":"1.0.0-alpha-3","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","chai":"3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","rimraf":"^2.5.2","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-3","_shasum":"e039d73264d5a4aba4d8ed6877acb6836b9bc5b4","_from":".","_npmVersion":"2.9.0","_nodeVersion":"4.4.2","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"e039d73264d5a4aba4d8ed6877acb6836b9bc5b4","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-3.tgz","integrity":"sha512-7hI1T3lCGKZywTKmC1hoWvc9KgK2tYBz+56+/+GkpMKb/tQiZSu9yTrolz2F3HjBNzWfxOhCrBAoo+P5xszOlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNf34pC17akmjYETQpwV6/5MLlxST4fzW8GrgynjyadwIgCfqpf8+d/mtvZesmx2KkZwLB04ns9bx5v6B4QNDU3Ss="}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-3.tgz_1466680142090_0.3653361420147121"},"directories":{}},"1.0.0-alpha-4":{"name":"tg-resources-react-native","version":"1.0.0-alpha-4","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","chai":"3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","rimraf":"^2.5.2","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-4","_shasum":"e111e4f0c729b9ae27a279f05b3b8cdc60f8f85a","_from":".","_npmVersion":"2.9.0","_nodeVersion":"4.4.2","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"e111e4f0c729b9ae27a279f05b3b8cdc60f8f85a","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-4.tgz","integrity":"sha512-lVJ+JZWonI4Im86ozAS5zU17CnauXaaL8ut1LgaFouqBeMS7dApIa/IoBvTiX/cR09WyKqZ9CuOKyZUwBNCgVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD591jfkf6xaEl8YPnmeXb30m8B9R95NMXGk+Eklq1IGAIgXdS8DShOaVmBnnE6DZFMmc51b7lRrEF11u375iJ/N1w="}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-4.tgz_1473681332399_0.5195825400296599"},"directories":{}},"1.0.0-alpha-5":{"name":"tg-resources-react-native","version":"1.0.0-alpha-5","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-class-properties":"^6.11.5","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","babel-runtime":"*","chai":"^3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","lodash.template":"*","mocha":"^3.1.0","rimraf":"^2.5.2","superagent":">=1.4.0","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-5","_shasum":"1547fa970ef9b26d3672780974cc312849dc525b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"1547fa970ef9b26d3672780974cc312849dc525b","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-5.tgz","integrity":"sha512-uM691XH7srEg5ad4OauxwVhXOjcdBWogkwaM5silz/oQodHuGiH61X1OPHi59G2oLXPIQV95ijahrHVHCU6H1A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGItVEl4MC27bwFMkCsuZpQS43Vt5KH52JHW1QiFHsz9AiAnGQVDlqPMNLNlfBMopoUQkfnlbBWGrY1xk4hBTyb+/Q=="}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-5.tgz_1475089221831_0.34919476322829723"},"directories":{}},"1.0.0-alpha-6":{"name":"tg-resources-react-native","version":"1.0.0-alpha-6","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-class-properties":"^6.11.5","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","babel-runtime":"*","chai":"^3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","lodash.template":"*","mocha":"^3.1.0","rimraf":"^2.5.2","superagent":">=1.4.0","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-6","_shasum":"d9a0f8520221818fab848771528152cfaa703a3c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"d9a0f8520221818fab848771528152cfaa703a3c","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-6.tgz","integrity":"sha512-uUNmZMarHYI+T+iDI6mP1tV2oEh7I6EomwvWA+FzUgB9jTqPBKfDm1d21y+a4YZlt0G9Sc4wYyeyPo/oQi+aEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE28hn63YLGZCYpajNt2+zQyJkz3tMquy3IWwosVUSZgIhAJ9ZSxqrH3YnZ8G9rWq92XeUN3rJxMXd9c3EirnQfzsQ"}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-6.tgz_1479730034200_0.8445272555109113"},"directories":{}},"1.0.0-alpha-7":{"name":"tg-resources-react-native","version":"1.0.0-alpha-7","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"mocha -u exports test/*.js --compilers js:babel-register","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-transform-class-properties":"^6.11.5","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","babel-runtime":"*","chai":"^3.2.0","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","fs-extra":"*","isparta":"*","lodash.template":"*","mocha":"^3.1.0","rimraf":"^2.5.2","superagent":">=1.4.0","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"_id":"tg-resources-react-native@1.0.0-alpha-7","_shasum":"16774d206b0b472924600c660553dac58de71ea2","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"16774d206b0b472924600c660553dac58de71ea2","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0-alpha-7.tgz","integrity":"sha512-UCMvltFc3LEzJEaY95y0wpK0SKIGcXcHd0cllaJDCb5/5Q3pRJtzHB2T9uLjPnfPzojDxvoWmyDkyITkLSxyCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMbbhknhGeXQBEoUgJF67JN+WnsYKX6a7MTidh5ut7TQIhAInY9j0JtUexOTxX8rTjt2ePbbNoOHHPgUY+B+k9aavN"}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0-alpha-7.tgz_1479739602017_0.9531234330497682"},"directories":{}},"1.0.0":{"name":"tg-resources-react-native","version":"1.0.0","description":"Abstractions on-top of `superagent` (or other Ajax libaries) for communication with REST.","main":"lib.js","files":["dist/","src/","lib.js","index.js"],"scripts":{"clean":"rimraf dist","lint":"eslint src test","check":"npm run lint -s","watch":"watch 'npm run build' src test","test":"NODE_ENV=test nyc --require babel-register mocha -u exports test/*.js","coverage":"nyc report && nyc report --reporter=html","coveralls":"nyc report --reporter=text-lcov | coveralls","prebuild":"npm run clean -s","build":"babel  src -d dist","postbuild":"npm run check -s && npm run test","deploy":"git pull --rebase origin master && git push origin master","toc":"doctoc --github --title \"# Changelog\" CHANGELOG.md","prerelease":"npm run build -s","release":"node ./scripts/release.js"},"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"keywords":["api","request","http","ajax"],"author":{"name":"Thorgate","email":"info@thorgate.eu"},"license":"MIT","bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"homepage":"https://github.com/thorgate/tg-resources#readme","devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"*","babel-plugin-istanbul":"^3.0.0","babel-plugin-transform-class-properties":"^6.11.5","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-es2015":"^6.9.0","babel-register":"^6.9.0","babel-runtime":"*","body-parser":"^1.15.2","chai":"^3.2.0","cookie-parser":"^1.4.3","coveralls":"*","debug":"^2.2.0","doctoc":"*","eslint":"*","eslint-config-airbnb-base":"^11.0.0","eslint-plugin-import":"^2.2.0","express":"^4.14.0","fs-extra":"*","isparta":"*","lodash.template":"*","mocha":"^3.1.0","nyc":"^10.0.0","rimraf":"^2.5.2","superagent":">=1.4.0","watch":"*"},"peerDependencies":{"superagent":">=1.4.0","lodash.template":"*"},"dependencies":{"cookie":"0.2.2"},"nyc":{"sourceMap":false,"instrument":false},"_id":"tg-resources-react-native@1.0.0","_shasum":"f76136d470954a8947f55b2181ee348fe554389b","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"thorgate","email":"hi@thorgate.eu"},"dist":{"shasum":"f76136d470954a8947f55b2181ee348fe554389b","tarball":"https://registry.npmjs.org/tg-resources-react-native/-/tg-resources-react-native-1.0.0.tgz","integrity":"sha512-il7E97TPUF93pi0BRktulPKWOmYZjcmrgHVm7Dz8yAB82uNbzr7qHnam2vY2RfF2+iOHJx/rnKkA8UbmLlq5RA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6SXtywFo+BUCs3q/pwdB4WBnz1cZitRmkQGk4nl7+mQIgPWKWcgg0y+YJU2NuXxrbI4o0zEz/6PzvZlQSigqAt+Y="}]},"maintainers":[{"name":"thorgate","email":"hi@thorgate.eu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tg-resources-react-native-1.0.0.tgz_1481561743372_0.9006858998909593"},"directories":{},"deprecated":"Please use tg-resources@2 (https://www.npmjs.com/package/tg-resources)."}},"homepage":"https://github.com/thorgate/tg-resources#readme","keywords":["api","request","http","ajax"],"repository":{"type":"git","url":"git+https://github.com/thorgate/tg-resources.git"},"author":{"name":"Thorgate","email":"info@thorgate.eu"},"bugs":{"url":"https://github.com/thorgate/tg-resources/issues"},"license":"MIT","readmeFilename":"README.md"}