{"name":"pvtsutils","version":"1.1.4","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","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.2.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^12.19.15","coveralls":"^3.1.0","mocha":"^8.3.2","nyc":"^15.1.0","rimraf":"^3.0.2","rollup":"^2.45.2","rollup-plugin-typescript2":"^0.30.0","ts-node":"^9.1.1","tslint":"^6.1.3","typescript":"^4.2.4"},"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":"3239058b51d5eb161bede85ee09d71d0fe5f008d","_id":"pvtsutils@1.1.4","_nodeVersion":"14.15.4","_npmVersion":"7.5.3","dist":{"integrity":"sha512-SDKiVEJhRtZafLzzu2Zh2Zi0OLH4v/zuwWTcNEdQS7pIyr0NObAsP545LvKyeBEMZXKSVe4ADFpB59lLj7S9Og==","shasum":"482c3ad79f494da7b78945993331c740df2866bd","tarball":"http://registry-npm.ywwl.com/pvtsutils/download/pvtsutils-1.1.4.tgz","fileCount":9,"unpackedSize":25653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiD3FCRA9TVsSAnZWagAAqbcP/0aiq61FsD9O+A/6guJa\n5+UD157TqBSdh1ucAuX5t44OG5Xe1MRRYoFDFvhD6J2kR38CAurHGC779aSI\nZ28JmfbqRi0gIJz+EhQO/92UdsG3OVSCOz+DY+SQ8C6LcfzpQ8G5z4bGGf1E\nIPpxsU135/P/F2bCNGUujqkBorLVgypjk/L1O/DxqjBeOoz5b5uB6tK2alUE\nCgpz3LiY1ERzGh43XNJi5yPQusNRBfj8eo/MO2GzNZ7dFoumJz1Dcmn5ImJM\n/huyn754kCmg393AypljpOsrdViBoTiY2aoGFM+nTmvBWar2lkorecgyEfso\nGN3p1SMr22Jr1Mb2qne9iKk+i/OBrQ5FKcfF9bDep8DP2XDgd9hZ5OCLEPpG\nov+QPCTbzKGzMoI8XDaFtFbgXeALjYinTIejANl2KNGjnWSAKkFbV4Tkj+bF\nnMpKyhCmxDWQh9/083JJ2Fz8AcPE1lIgVR3/7x92dL5NbM6UfKoQSgrR+63N\njkcCyxHPDiUs15ZyXwG+YNMleRB9o1mpinKzfGZLSCK9rBBxSxgaOCsQfwL8\nWiIKuJAz8oi3EXfWRFSQIywRFKe/PF9lQntsS6vJuIZNc11o8nDdPsbU4vkM\ncF341GlgiLN1Qb4m7vIc8erMsoCgXjerm5z8STJtlHJGitBuDquudlc18fiV\n+dun\r\n=z+tw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBP/EIl1hLSDqqpRvVKMVyHbDkc4kGUrySjcJZuq9EvAiBZxWgEOV3ynZy4c1Nd7sx5DUMVy27YuZYIxITp0iZ2eg=="}],"size":6006,"noattachment":false,"key":"/pvtsutils/-/pvtsutils-1.1.4.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.1.4_1619541444711_0.18212789950820674"},"_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":1619541444817,"_cnpm_publish_time":1619541444817,"dist-tags":{"latest":"1.3.6"}}