{"name":"pvtsutils","version":"1.0.4","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.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","ts-node":"^8.0.2","typescript":"^3.2.2"},"nyc":{"extension":[".ts",".tsx"],"include":["src/**/*.ts"],"exclude":["**/*.d.ts"],"reporter":["text-summary","html"]},"gitHead":"0fe320ba11982b0554ef6a034ac159f73f43715a","_id":"pvtsutils@1.0.4","_nodeVersion":"10.13.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-lBDyLfPIWZjxHr6Nnl83/iaZgVLczDcpEqWdqRnghzBKXifRU/7D5T6JPYWUAm0sJdFeF9+sNTKto6dj/3P/Kg==","shasum":"eaa4f232f054c53adc1e585d4b6f425143734877","tarball":"http://registry-npm.ywwl.com/pvtsutils/download/pvtsutils-1.0.4.tgz","fileCount":6,"unpackedSize":17730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJca9YZCRA9TVsSAnZWagAA/wkP/1BMXQFcvYQ/BDcxEHFP\nBOeWYSNGLO/AJbSyVM1BRXqCtK+khkRbDJyR/lZ2WHda+67uDc1bIzJXiCRY\n0URhNdm+geRlEBoqE6J3GKC72l4RW8Fz/oTK0YCergmM0GlPTsN6EVkgwvrs\n6Zjbbv8IHq52vOS1OwRxIf6828fzZIBQSvmXXZIkjtaIJxgTwWGqFn9FNP7Z\nwbqT7T0qv6WDCuHLjCL1Ojqvc+f38fy/0p9aMc14MrbqLDLpX2raN0PkfYRL\nDBnjpCNAa4VHKg2VSfFpKPYE3sz/0Emk3wS+VJ6P8wJ5vjuQ27RVdPCiLURB\nQVdEew5ut6JrYZzjtMOMGfq5bGx/obvRTogIUWPu3HtfWrtenvlBgrDoumpg\nrJnP5yDo1d3NS9JjvFgFVWhiv18NqByNdgLrGKUganae1Je3tOasT0cNlk4+\n465CHySaQECTGZVPHyI72ublFgh9oJJoAMsukxX+RBCEK8gbTn3OvduRLgdh\np9YpI/nvuI1v5fhLAyhIXa1YbGe0ckneuIqoO5zkWKmZ6DjkkpIP/QsASijf\n2cWnoD2kwaPyGZra3qPoDbJaYokuvb4cYjQXLEdo5MRrvZu9EQm30FsKk7Db\n3/mFjy1DRbeG10FRNGadjW6emzBYbVH1e2993qsODFLdJFZlDNQ83GucmyJg\nE14d\r\n=y84E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmG6aDj7CTu60clLozocSd0tCMmofmayqJAwyYXzniRAiBhJTuPLZm1pFD5j/U7ZY46gEc9xCikDhmTilZiazEOjQ=="}],"size":4649,"noattachment":false,"key":"/pvtsutils/-/pvtsutils-1.0.4.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.4_1550571032870_0.37796595096610863"},"_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":1550571033018,"_cnpm_publish_time":1550571033018,"dist-tags":{"latest":"1.3.6"}}