{"name":"pvtsutils","version":"1.0.6","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":{"prepare":"npm run build","test":"mocha","build":"rollup -c","prepub":"npm run build","pub":"npm version patch && npm publish && git push","coverage":"nyc npm test","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.14.17","tslib":"^1.10.0"},"devDependencies":{"@types/mocha":"^5.2.7","coveralls":"^3.0.6","mocha":"^6.2.0","nyc":"^14.1.1","rollup":"^1.20.3","rollup-plugin-typescript":"^1.0.1","ts-node":"^8.3.0","typescript":"^3.6.2"},"nyc":{"extension":[".ts",".tsx"],"include":["src/**/*.ts"],"exclude":["**/*.d.ts"],"reporter":["text-summary","html"]},"gitHead":"a9cf96e85297ac15b08e8884cf8ab02c5486f6bf","_id":"pvtsutils@1.0.6","_nodeVersion":"10.16.0","_npmVersion":"6.11.2","dist":{"integrity":"sha512-0yNrOdJyLE7FZzmeEHTKanwBr5XbmDAd020cKa4ZiTYuGMBYBZmq7vHOhcOqhVllh6gghDBbaz1lnVdOqiB7cw==","shasum":"e3883fd77abdd4c124131f6a49f3914cd9f21290","tarball":"http://registry-npm.ywwl.com/pvtsutils/download/pvtsutils-1.0.6.tgz","fileCount":6,"unpackedSize":17957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdb0iDCRA9TVsSAnZWagAAYY0P/RH1EIyprRN9iG8Zmj1h\nlMp4/pRP+6+McCqlI/w0rI80OG+gQLi0o4ktWN7DmlstqRQg3V4cpRcisTYR\nYPzVpu2sBPJ2rLsj12VqfbrHa4QQ3NrBiiOZKsufHW5pjngIkqW66bflaXE3\nbMGbp6C1vA/PlTYTUNKPc8xg8LZGCzLIAP8AqvWUMEzrR8WigYebDqoiMpOh\nsAAHnE7/u4L+xg9jqRUq/7pn2cc2TVFgLc9Ri354QCwhUeBCPcbyjJOSN8kg\nzJkJScRZMjVF4ynI8OEw0T4QhAVmT7OrlpC7X5ASXyTUiILVcJz2U7I2fz7t\nhFiRVQxMg50JoLjJcASW0JtI+6p9W2HFx7aRo3bCPzi9HBiQOHWGmDnudsMW\nW173PQWRws0Pvi6XUVFIu4Ldt8jSvIWlLlHzwamDgcviFcecSDCjEKJSI+55\n53d+rU8Kzivv4GUHlFzpsC4cDZpJfxMPI4y4FFL8rpkn38gPD7o2yW3Zuu05\nK9nvFRO9KYCDCMPXQOwF+l1SQ9XStAVoFZzDTwb6BWOJAX1juhTbeCVlZ+MG\nf3jAydl1bCS3rtt3ygmPjqoJcVIjyqm5P6nYiy4jRwafsb3Tg3NQLD16svBw\nYHHg1kcEGRJ3PyN9ISNzQ0Rg++jVrKyP42j/pjGU8Skw2IKjSZGC8bCTEqWm\nbgpw\r\n=V48Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0usNOsChsmRjVwxWT3h1zTh3YLH2WpkcbmG3m5gFdDAiAsSk5uHsWrKoM9AgLxlJI0bVuObiDESwlcjJsdM92/3A=="}],"size":4712,"noattachment":false,"key":"/pvtsutils/-/pvtsutils-1.0.6.tgz"},"maintainers":[{"name":"microshine","email":"microshine@mail.ru"}],"_npmUser":{"name":"microshine","email":"microshine@mail.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pvtsutils_1.0.6_1567574146478_0.17004471747450944"},"_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":1567574146613,"_cnpm_publish_time":1567574146613,"dist-tags":{"latest":"1.3.6"}}