{"name":"sri-toolbox","version":"0.2.0","description":"Subresource Integrity tools","author":{"name":"Neftaly Hernandez","email":"neftaly.hernandez@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/neftaly/npm-sri-toolbox.git"},"main":"main","scripts":{"test":"mocha"},"keywords":["sri-toolbox","SRI","Subresource Integrity","integrity","security"],"dependencies":{},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.6","mocha":"^2.1.0"},"engines":{"node":">= 0.10.4"},"gitHead":"aaa89ac18127d0119f6e2bff86cf9e49099f9049","bugs":{"url":"https://github.com/neftaly/npm-sri-toolbox/issues"},"homepage":"https://github.com/neftaly/npm-sri-toolbox#readme","_id":"sri-toolbox@0.2.0","_shasum":"a7fea5c3fde55e675cf1c8c06f3ebb5c2935835e","_from":".","_npmVersion":"2.13.0","_nodeVersion":"0.10.39","_npmUser":{"name":"neftaly","email":"neftaly.hernandez@gmail.com"},"dist":{"shasum":"a7fea5c3fde55e675cf1c8c06f3ebb5c2935835e","tarball":"http://registry-npm.ywwl.com/sri-toolbox/download/sri-toolbox-0.2.0.tgz","integrity":"sha512-DQIMWCAr/M7phwo+d3bEfXwSBEwuaJL+SJx9cuqt1Ty7K96ZFoHpYnSbhrQZEr0+0/GtmpKECP8X/R4RyeTAfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKj7KsnY5RJNkaY9w3RhHoO/275prWl3GkeI2fNKo6kgIgaHWFQqaYTGxK6EXjqYzSlNlkVH5eNTF4TKNGDyoWqbI="}],"size":35950,"noattachment":false,"key":"/sri-toolbox/-/sri-toolbox-0.2.0.tgz"},"maintainers":[{"name":"neftaly","email":"neftaly.hernandez@gmail.com"}],"directories":{},"readme":"# sri-toolbox [![Build Status](https://travis-ci.org/neftaly/npm-sri-toolbox.svg?branch=master)](https://travis-ci.org/neftaly/npm-sri-toolbox) [![Coverage Status](https://coveralls.io/repos/neftaly/npm-sri-toolbox/badge.svg?branch=master)](https://coveralls.io/r/neftaly/npm-sri-toolbox?branch=master)\n\n[Subresource Integrity](http://www.w3.org/TR/SRI/) tools.\n\n**SemVer note:** As the SRI spec has not yet been finalized, minor releases < 1.0.0 will contain breaking changes.\n\nInstall\n-------\n```shell\nnpm install sri-toolbox\n```\n\nUsage\n-----\n```js\nvar sriToolbox = require(\"sri-toolbox\");\n\nvar jquerySourceCode = file(\"jquery-1.10.2.min.js\");\n\nvar integrity = sriToolbox.generate({\n    algorithms: [\"sha256\"]\n}, jquerySourceCode);\n//=> \"sha256-C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg=\"\n```\n\nYou may also access the data used to build the integrity attribute, using the option \"full\":\n```js\nvar integrityObject = sriToolbox.generate({\n    full: true\n}, jquerySourceCode);\n//=> object\n```\n```json\n{\n    \"hashes\": {\n        \"sha256\": \"C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg=\"\n    },\n    \"integrity\": \"sha256-C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg=\"\n}\n```\n\nAPI\n-------\n\n### generate\n\nGenerate creates a Sub-resource Integrity attribute from a data string.\n\n#### Options\n\nKey: type **name** *= default*  \n\n* array **algorithms** *= [\"sha256\"]*  \n    List of hashing algorithms\n\n* string **delimiter** *= \" \"*  \n    Integrity attribute delimiter\n\n* boolean **full** *= false*  \n    Return a string if false, object if true. See example.\n","publish_time":1436789173324,"_cnpm_publish_time":1436789173324,"dist-tags":{"latest":"0.2.0"}}