{"name":"pvtsutils","version":"1.2.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/types/index.d.ts","scripts":{"prepare":"npm run build","test":"mocha","build":"npm run build:module && npm run build:types","clear":"rimraf build/*","rebuild":"npm run clear && npm run build","build:module":"rollup -c","build:types":"tsc -p tsconfig.types.json","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.3.1"},"devDependencies":{"@types/mocha":"^9.0.0","@types/node":"^14.17.19","coveralls":"^3.1.1","mocha":"^9.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","rollup":"^2.67.3","rollup-plugin-typescript2":"^0.31.2","ts-node":"^10.5.0","tslint":"^6.1.3","typescript":"^4.5.5"},"nyc":{"extension":[".ts",".tsx"],"include":["src/**/*.ts"],"exclude":["**/*.d.ts"],"reporter":["text-summary","html"]},"mocha":{"require":"ts-node/register","extension":["ts"],"watch-files":["test/**/*.ts"]},"gitHead":"82f9bfcafb7702dc6a2cc0324c7fec6af8d54f23","_id":"pvtsutils@1.2.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-OALo5ZEdqiI127i64+CXwkCOyFHUA+tCQgaUO/MvRDFXWPr53f2sx28ECNztUEzuyu5xvuuD1EB/szg9mwJoGA==","shasum":"62ef6bc0513cbc255ee02574dedeaa41272d6101","tarball":"http://registry-npm.ywwl.com/pvtsutils/download/pvtsutils-1.2.2.tgz","fileCount":9,"unpackedSize":33057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD7RmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpglg//b32nIWTb3Zs0S7jUhTSGzNUZ9ebPOT6Y2plg94yYjcjFNh/d\r\nDefxOVwApH2FVBD+iza/p9G/ZZyBfFguYEHm4+V0s2POO85qlF+J4z0vQ27P\r\ni/Hvy8YxSJkAdlRlwx3vMfwYSMtxKeK1Jp/4hxxgeey6dhunW1M3jGNA3+No\r\nXbGyQFx3AFNoXY8cLvE1zHHj9fqmQ1aj9+r5ABwmyebW5yri0kvH8sW/9WoV\r\nH/vawPbO/VMuJzw9o56cqg2+YFM50dTF0L/Gr1yo4ON0DzY4YpLQqASNNHih\r\nXfkcgU3ACvzDgt1AfrW5X7d6HN+jhTeySMRa2XU0RS8gDmGX0Aj97WQT2MmZ\r\nKgvocEooqShieXcOwGYVH39KhfAJUfund1hpS1zZMmGtcI64nWsNjc0czA2x\r\nJ4Ve+tkZ8pcJ37XKpKSCmsizFEeq5YFnriYoONRRR4CpTIlnU6Rs+FdfzkgC\r\nxNHOeA7jlqGowpPkhBgToYPBhJbwQ8erXHxXNitiKRXTiMyHV89YfzeqOhve\r\n0TZZh4HjPeeHMLry16mlnXFUNpct61u/N9NRqhKlMpMTf3JBQEjComL98oGx\r\nquanRqN5GbMKvUj6yXB9trjkc+wiHzUg9PoHLCFbHe1xQg2PJsc6Sxq9/gEx\r\nAvkkoSxbIfkPYiO/b4Vf4gKfDq5HZzUD0JE=\r\n=mqSc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKs9vre5yBYWGF/e1Syb+NHX5f4BsiyMzn11H5V+Ya3AiEAs4fmMpm7Z6yYmqSHsE+CQJgnM3obDksvUyw/nyLv1Mo="}],"size":6821,"noattachment":false,"key":"/pvtsutils/-/pvtsutils-1.2.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.2.2_1645196389876_0.14764970138986966"},"_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":1645196390031,"_cnpm_publish_time":1645196390031,"dist-tags":{"latest":"1.3.6"}}