{"name":"pvtsutils","version":"1.3.2","description":"pvtsutils is a set of common utility functions used in various Peculiar Ventures TypeScript based projects.","main":"build/index.js","module":"build/index.es.js","browser":"build/index.js","types":"build/index.d.ts","scripts":{"test":"mocha","clear":"rimraf build/*","rebuild":"npm run clear && npm run build","build":"rollup -c","lint":"tslint -p .","lint:fix":"tslint --fix -p .","prepub":"npm run lint && npm run rebuild","pub":"npm version patch && npm publish","postpub":"git push && git push --tags origin master","prepub:next":"npm run lint && npm run rebuild","pub:next":"npm version prerelease --preid=next && npm publish --tag next","postpub:next":"git push","coverage":"nyc npm test","coveralls":"nyc report --reporter=text-lcov | coveralls"},"keywords":["typescript","helper","util","convert","hex","utf8","utf16","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":{"tslib":"^2.4.0"},"devDependencies":{"@types/mocha":"^9.1.1","@types/node":"^17.0.31","coveralls":"^3.1.1","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","rollup":"^2.71.1","rollup-plugin-dts":"^4.2.1","rollup-plugin-typescript2":"^0.31.2","ts-node":"^10.7.0","tslint":"^6.1.3","typescript":"^4.6.4"},"gitHead":"db288e49c83a6c66680b45597d4f8572331aac5b","_id":"pvtsutils@1.3.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==","shasum":"9f8570d132cdd3c27ab7d51a2799239bf8d8d5de","tarball":"http://registry-npm.ywwl.com/pvtsutils/download/pvtsutils-1.3.2.tgz","fileCount":6,"unpackedSize":38008,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdv3f+qQJmmH6q3pOpkhZ4dd1e+ZWxF2/mn/SMx73fOwIgBiojmqRdLUwrZDh3lys4r0qN52pvS3UxyCyjHaMVPeY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJic42kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+NA//QnG3zFCPkhsQNhgOPxnvEI+uVUG8mj2wA/K7MK5qJcFsmjUC\r\nCmcHxs3uodC3e2AwNlTW1I2jfBiNX0VqTOTra784ds/nckCbUIS2u4R1shx9\r\nSB4n9dPqaAGVPQWwzb6VTTYOnrrSPWDZPnWnQuHUEZS6piHrYADVzzMH6UCQ\r\nx27C5zie2IA6mlMoaoNbAq+GPczKG7W4qhuPh48WOHfMOfTgP3UU9zn/rNln\r\nYXV+sAF6ODZGj3eNExXLYz2JHiuMhoQhQWlPqDw8qUncgkBkz1V9cJ/ZrdQE\r\n2pXybytC5k4FdXDquLccAdVcQt557rGhll0a8+jSz+F41nW2V+8N2O14NgT2\r\nBRWUYiQmF30HREl4sV5eORShknvtk4uvv4167Skgmg1YHoeOFNUHIUeJwvkA\r\n+RCZHhDuCFW/MRVcVs1MMD4iM0lhk6Nerp+RnWSUZcKu/l3nXB6K/0caD7AG\r\n0M6WNNDdvEAr+Pq5XdUZPL83RhvIeGxHXw0DsKeTZN7VKtzvkhP75qTtDtzu\r\nmUlggXbAW1nWjcvJkHlPjtnHpsen76+sUcDnyLOamrP6MEjkA3baumTZlkbP\r\n0c8LrnVMkOS9mBI1P6cr/rZjraPxNEMK0wOuAohgFFNFi8kSFMPi2xpquRqP\r\nDXJs7Qs5y6v6Ffm3SdCgCRvFCLJP7ZEGcNU=\r\n=Cmf8\r\n-----END PGP SIGNATURE-----\r\n","size":6141,"noattachment":false,"key":"/pvtsutils/-/pvtsutils-1.3.2.tgz"},"_npmUser":{"name":"microshine","email":"microshine@mail.ru"},"directories":{},"maintainers":[{"name":"microshine","email":"microshine@mail.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pvtsutils_1.3.2_1651740068235_0.2056474837463682"},"_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":1651740068420,"_cnpm_publish_time":1651740068420,"dist-tags":{"latest":"1.3.6"}}