{"_id":"@arturdoruch/helper","_rev":"5-83cf92447d75c0fb4e651c3c539b8842","time":{"1.0.0":"2020-07-10T23:16:28.559Z","created":"2020-07-11T02:31:18.773Z","1.0.1":"2020-07-11T02:31:19.171Z","modified":"2022-04-04T15:40:37.798Z","1.0.3":"2020-09-13T02:51:50.515Z"},"name":"@arturdoruch/helper","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@arturdoruch/helper","description":"A collection of helpers ad wrappers","keywords":["ajax request notice","ajax request json","local storage encoding item"],"version":"1.0.1","type":"module","dependencies":{"@arturdoruch/process-noticer":"^1.0"},"repository":{"type":"git","url":"git+https://github.com/arturdoruch/js-helper.git"},"author":{"name":"Artur Doruch","email":"arturdoruch@interia.pl"},"license":"MIT","gitHead":"52ac9b71c24df5f18ae611f54cee7ab918d0bfd5","bugs":{"url":"https://github.com/arturdoruch/js-helper/issues"},"homepage":"https://github.com/arturdoruch/js-helper#readme","_id":"@arturdoruch/helper@1.0.1","scripts":{},"_shasum":"51394b75ee0dee14fbe703d54f9f9b6e594f77e3","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"arturdoruch1","email":"arturdoruch@interia.pl"},"dist":{"shasum":"51394b75ee0dee14fbe703d54f9f9b6e594f77e3","tarball":"https://registry.npmjs.org/@arturdoruch/helper/-/helper-1.0.1.tgz","integrity":"sha512-vnQxCYm33Kj9raJ2Gazt+6H3NIYY7TU5nOE+9ozUl35iw5IoLkEPYmcHk+t1Rq7yIOie/Ec8g5gaMuKKZgB/jA==","fileCount":4,"unpackedSize":6070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCSR3CRA9TVsSAnZWagAAhg4P/3a3Sy86gXqGOqdgX/b1\nlL5wLTq546mQ0U4PEx+UxA9xgf9syTtOX4yknIsrNz9kJPFkmX+l6KE/u43B\nzQRbZ3SP4awC7BYKDBGuEqj4RmJPRqTzy4tKo1cVRncWORaTzh+uP/74WvNs\nI+/C9nKLy3tKGpQY5lLitVIjtLrnJ/QLvKTpJ2IG4n3hnjddRbYCOZBqry/8\nP0v9VPo9S5wKMpEYS3FBCH6+AkFEDsruZlMtPdZMp/mv7LYtASpfLcN6nEQs\nbkMzqzm9kyfjzKPuaCka5C4bml3fPCRAxo00F8yZLU/Nv1mQTbB92GJ5CDr4\ny4uoLLuyDILcOb2Fqo/KhSyfQLjhC8tMmV6s5uGGm2g5GekWfS8PEZLOthmi\n5OOIWnmVfNcAUCcLyR+zZl+Chw/LuSLjoXCzum1VIMb0lZH/Gf8xq4DebPCr\nwHnHHRO+9df0fsy0EieQr4cCU6wYTq4/yvXGfX6FsWr8rU1EJW/kPz6lCKnC\nDXw9z7dkVQFLpvIcK8BUrgzVWYtYptg+v+WuaIv1Uf2FwWmFJmbfvkFQu2A0\nk2QzmWDXPZ5Crmdh8AFDCT/DNGIBSDcUofIALgACvjVuOPFMGHqSenV66xeD\nkhTUkzb5gVZ9sJYgvy0qZqQhESFb5hsALtzKdO7rpnbKZTRf+1DrxeTUOkfi\ndD8b\r\n=gMgR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEta6T3egZqvqZdkRs8pnUaWG3K6gD81ksGPMZ+j9P3QIhALYKOsM26Jch7FNcSUpI739eGVmzjjdEDUtJ9W4Z92b6"}]},"maintainers":[{"name":"arturdoruch1","email":"arturdoruch@interia.pl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/helper_1.0.1_1594434679045_0.8047178615247168"},"_hasShrinkwrap":false},"1.0.3":{"name":"@arturdoruch/helper","description":"A collection of helpers ad wrappers","keywords":["ajax request notice","ajax request json","local storage encoding item"],"version":"1.0.3","type":"module","dependencies":{"@arturdoruch/process-noticer":"^1.2.2"},"repository":{"type":"git","url":"git+https://github.com/arturdoruch/js-helper.git"},"author":{"name":"Artur Doruch","email":"arturdoruch@interia.pl"},"license":"MIT","gitHead":"d2eb9b1ac22316a94e38762cb2b4b5656de44449","bugs":{"url":"https://github.com/arturdoruch/js-helper/issues"},"homepage":"https://github.com/arturdoruch/js-helper#readme","_id":"@arturdoruch/helper@1.0.3","scripts":{},"_shasum":"720d6c0c5462cb62fa0bf9f10376d65809d87e4d","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"arturdoruch1","email":"arturdoruch@interia.pl"},"dist":{"shasum":"720d6c0c5462cb62fa0bf9f10376d65809d87e4d","tarball":"https://registry.npmjs.org/@arturdoruch/helper/-/helper-1.0.3.tgz","integrity":"sha512-2URaCUVf7l3lB6G/lsV5OVgQp27EFTMYqjbQNG8txPIPGDiW8eFnkxfSW08XvNzrUSkr6FQ0RhHWrh9gKvx16A==","fileCount":4,"unpackedSize":6563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXYlGCRA9TVsSAnZWagAAJgAP/23URA9tmIE6t2ZVLjDc\nbuT5RKDE/ruTYKTDxrQWJb5/7CFSzBCGm5VPOoCQ2hVzrTOKISOD1ibGMgGO\nNaI8FR3LvMs66wczwzDEPz4i8K99tysfDEk2MaAGnCU7wj1pHK9zD+OwLFdx\nqPBjcjEnK6AVKSh55RPDaGypPF5hF2/TUjMHR9Q8wn/x4lCBZOzJeoZFRciT\n6wlddWEo1MHaY9+cpWa4RkNIlGdQutqkzHSvMG1tNgRyWm7bQQ58jY4NQRtY\ntjjVazUM2rmEDfm6bTFT/IKX8NCOZQp1f/3i0AdbhShWctMfL/y4I4bILNmQ\nCrLjFVCXnlmQ67n3b1miDCD3qbrbtwPqowsoK6e4QrMBKgU8aKjikCjRjLd8\nB2iQ74kYzwTheaRgiGc0F6prCqxDNc+NqDmxxvVcNO7Fn76Rrbcfb809m2KV\nLOW5Ma8Y6jXuY+rS6Ur+GczCVNxnA0xeAH3BrixRvrX855tLACJq7eBA8heN\nAR2b84AzkIpcHsDjpVhzUu7FoJuszpcEd2e3d3ZShARpzcx7cPTxx4RCnEUW\ngcGHc855zu3MPFTjYtd+thQzr+KPRi93ZUgkx9i64KucgnHr7KA7L5S73Tb7\n683pq3yHc7r0rKi17dYh172R4WnzsuyxzZ9QP3vDIJ3w+30c+77UvYFaeajl\nI79i\r\n=sYyc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmDYVCPCwNc6dNv7bl/+MfpWiT/QZ4M1CftJfWIZ217AiEApfUhTwp0lKc64RQG0JbHMokCSzo19nQRRyxXPJ1R+u8="}]},"maintainers":[{"name":"arturdoruch1","email":"arturdoruch@interia.pl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/helper_1.0.3_1599965510367_0.868002454692488"},"_hasShrinkwrap":false}},"maintainers":[{"name":"arturdoruch1","email":"arturdoruch@interia.pl"}],"description":"A collection of helpers ad wrappers","homepage":"https://github.com/arturdoruch/js-helper#readme","keywords":["ajax request notice","ajax request json","local storage encoding item"],"repository":{"type":"git","url":"git+https://github.com/arturdoruch/js-helper.git"},"author":{"name":"Artur Doruch","email":"arturdoruch@interia.pl"},"bugs":{"url":"https://github.com/arturdoruch/js-helper/issues"},"license":"MIT","readme":"# Helper\r\n\r\nA collection of helpers and wrappers.\r\n\r\n## Installation\r\n\r\n```\r\nyarn add @arturdoruch/helper\r\n```\r\n\r\n## Contents\r\n\r\n### Ajax\r\n  \r\njQuery AJAX request wrapper. Adds functionalities:\r\n\r\n* Displaying notice message and loader while request is sending.\r\n* Request options:\r\n    * `json` - Adding option for specifying JSON data to send. If is specify request `Content-Type` header\r\n      is automatically set to `application/json; charset=UTF-8`.\r\n      If specified JSON is an object, then will be encoded into string.   \r\n    * `method` - If not specified and the `data` or `json` option is set, then option `method`\r\n      will be automatically set to `POST`.   \r\n\r\n#### Usage\r\n   \r\n<a name=\"ajax-setting-process-noticer\"></a>Set (optionally) ProcessNoticer to display notice message and loader while sending request.\r\n\r\n```js\r\nimport '@arturdoruch/process-noticer/styles/process-notice.css';\r\nimport ProcessNoticer from '@arturdoruch/process-noticer';\r\n\r\n// Set ProcessNoticer without options\r\najax.setProcessNoticer(); \r\n\r\n// or set ProcessNoticer instance with specified options.\r\nconst options = {}; // See available options https://github.com/arturdoruch/js-process-noticer#instance-options.\r\najax.setProcessNoticer(new ProcessNoticer(options)); \r\n```         \r\n   \r\n<a name=\"ajax-sending-request\"></a>Sending request   \r\n   \r\n```js\r\nimport ajax from '@arturdoruch/tool/lib/ajax';\r\n\r\n// Send POST request with JSON data and header \"Content-Type: application/json; charset=UTF-8\".\r\najax.send({\r\n    url: \"https://httpbin.org/post\",\r\n    json: {}   \r\n})\r\n    .done(function (responseContent) {\r\n        console.log(responseContent);\r\n    });\r\n\r\n// Send request and display notice message and loader.\r\najax.send(\"https://httpbin.org/get\", 'Request notice', true);\r\n```   \r\n      \r\n### Local storage\r\n\r\nA wrapper for localStorage.\r\nAdds encoding object and array into string of the setting localStorage item.\r\n\r\n#### Usage\r\n\r\n```js\r\nimport _localStorage from '@arturdoruch/tool/lib/local-storage';\r\n\r\n_localStorage.setItem('object', {\"foo\": \"bar\"});\r\n_localStorage.setItem('array', ['foo', 'bar']);\r\n\r\nconsole.log(_localStorage.getItem('object'));\r\nconsole.log(_localStorage.getItem('array'));\r\n```      ","readmeFilename":"README.md"}