{"name":"pvtsutils","version":"1.0.3","description":"pvtsutils is a set of common utility functions used in various Peculiar Ventures TypeScript based projects.","main":"dist/pvtsutils.js","module":"dist/pvtsutils.es.js","types":"index.d.ts","scripts":{"test":"mocha test/**/*.js","build":"npm run build:dist","build:es5":"rollup -c","build:map":"rollup -c -m","build:es2015":"rollup -c rollup.config.es.js","build:dist":"npm run build:es5 && npm run build:es2015","prepublish":"npm run build","pub":"npm version patch && npm publish && git push","precoverage":"npm run build:map","coverage":"nyc npm test","precoveragehtml":"npm run coverage","coveragehtml":"nyc report -r html","coveralls":"nyc report --reporter=text-lcov | coveralls"},"keywords":["typescript","helper","util","convert","hex","utf8","base64","base64url","binary","assign"],"author":{"name":"PeculiarVentures"},"contributors":[{"name":"Miroshin Stepan","email":"microshine@mail.ru"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/PeculiarVentures/pvtsutils.git"},"bugs":{"url":"https://github.com/PeculiarVentures/pvtsutils/issues"},"homepage":"https://github.com/PeculiarVentures/pvtsutils#readme","dependencies":{"@types/node":"^10.12.15","tslib":"^1.9.3"},"devDependencies":{"@types/mocha":"^5.2.5","coveralls":"^3.0.2","mocha":"^5.2.0","nyc":"^13.1.0","rollup":"^0.68.0","rollup-plugin-typescript":"^1.0.0","typescript":"^3.2.2"},"gitHead":"ed3b4ef2f26ddead53df4560421d3c5dbe899f94","_id":"pvtsutils@1.0.3","_npmVersion":"6.5.0","_nodeVersion":"10.13.0","_npmUser":{"name":"microshine","email":"microshine@mail.ru"},"dist":{"integrity":"sha512-tStF0bg63w6GwUsa3KUU6FmgFbON+CZJtcJJiwivuIw/+LFwAXRXZeqmt1aJq3czt3H5CCR916frulF81Asf6g==","shasum":"9278cdfe4a0881885a86513ea86a95283a08ed1a","tarball":"http://registry-npm.ywwl.com/pvtsutils/download/pvtsutils-1.0.3.tgz","fileCount":8,"unpackedSize":21805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcF4TKCRA9TVsSAnZWagAAsssP/3wKRnYsbBuAhqhbMQaB\nLjpgVJ9s3Ut615SL6umwXXtz8NVi4RvMN5pZ0dHFLhZhcDbRdrbmWepIjhBJ\nFbNFUpzG4rBMVFbAi9XnapadwH3/mlUDJkW0/2ToCTWPHRbsMJdO+Eo8c+KV\nzl4I9ngs9ueWKMq6EDoJfRe24QSB3LGMvgwTY1Cy/48EQCl6Hx9IgAjh6mqg\n1DbRhUBuA+nsOCscpxVK55YeQuTHxVCiS806Tr48tUv/bi5ossB2/LGVFKdF\njty1YtLVIKB5cflhEiQ1NdztPDYUtAdXBY3NMMWp6Zb96nl1sWHhoXgjZCZt\nEctk7v6QDOy2UymUni6Jba+gv6wPP02VMEXBtwZDN6ntzIPbK4eTDb9+lULi\nxOZgBAOHmJbvSdf8fKP6QnfB1bCPw4V+j3OpjwEVJohsXBFkiYeWhlVeLMhO\notQsYuZSzT8MoXuWhaDDsMCZR8pZqCDFlF2udUjo07i+7X6pj4J0vVDLakrP\nuW04BsdE+2L5Bwumx3pZOJiE0Wgn6kiPLbd9fzJZMNbTYohZpVYngL7DjMwc\n8fc2zb76A5plEzLx1uHrdOfki8zPfNjTf806TY5Xeht6YeW+0YRPMygIkGUV\n6MP2oYCc8MfuxPLPT+th5pUV1KVLMl/VfTPjghndUviUdwEUY9lbwPpxojIR\n3kjo\r\n=lxkz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJDOjoTpBJqZiHZFI2rKMleiJSOuxwiiP+D2zVI9TdKwIgFkj6awkwqICCjzSsLJVu43h0UJCU5T5ec0zidmhXOl8="}],"size":5527,"noattachment":false,"key":"/pvtsutils/-/pvtsutils-1.0.3.tgz"},"maintainers":[{"name":"microshine","email":"microshine@mail.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pvtsutils_1.0.3_1545045194316_0.041941090783290225"},"_hasShrinkwrap":false,"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Coverage Status](https://coveralls.io/repos/github/PeculiarVentures/pvtsutils/badge.svg?branch=master)](https://coveralls.io/github/PeculiarVentures/pvtsutils?branch=master)\n[![Test](https://github.com/PeculiarVentures/pvtsutils/actions/workflows/test.yml/badge.svg)](https://github.com/PeculiarVentures/pvtsutils/actions/workflows/test.yml)\n\n# pvtsutils\npvtsutils is a set of common utility functions used in various Peculiar Ventures TypeScript based projects.\n\n## Install\n\n```\nnpm install pvtsutils\n```\n\n## Using\n\n```javascript\nconst utils = require(\"pvtsutils\");\n```\n\nThe `pvtsutils` namespace will always be available globally and also supports AMD loaders.\n\n## Types\n\nThere is an [index.d.ts](./index.d.ts) file which makes easy to use current module as external\n\n## Helpers\n\n### Convert\n\nHelps to convert `string` to `ArrayBuffer` and back\n\nConvert support next encoding types `hex`, `utf8`, `binary`, `base64`, `base64url`. `utf8` is default.\n\n#### Examples\n\nConverts string to buffer\n\n```javascript\nconst buf = Convert.FromString(\"some string\", \"hex\");\n```\n\nConverts buffer to string\n\n```javascript\nconst str = Convert.ToString(buf, \"utf8\");\n```\n\n### assign\n\nCopies properties from objects to a target object. [More info](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n\n#### Example\n\n```javascript\nconst obj = assign({}, {name: \"Bob\"}, {age: 12}); // {name: \"Bob\", age: 12}\n```\n\n### isEqual\n\nReturns `true` if 2 ArrayBuffers are equal\n\n### combine\n\nCombines some `ArrayBuffer` values\n\n#### Example\n\n```javascript\nconst buf1 = new Uint8Array([1, 2, 3]);\nconst buf2 = new Uint8Array([4, 5, 6]);\nconst buf = combine(buf1, buf2); // [1, 2, 3, 4, 5, 6]\n```\n\nSome example capabilities included in pvtsutils include:\n\n- Converting values to adn from hex,\n- Converting values to and from base64,\n- Working with base64 url,\n- Working with binary data.\n- And more...\n","publish_time":1545045194399,"_cnpm_publish_time":1545045194399,"dist-tags":{"latest":"1.3.6"}}