{"name":"sri-toolbox","version":"0.1.3","description":"Subresource Integrity tools","author":{"name":"Neftaly Hernandez","email":"neftaly.hernandez@gmail.com"},"license":"MIT","repository":{"type":"git","url":"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":"31bb3e4626adca8e40315173724c332387f19789","bugs":{"url":"https://github.com/neftaly/npm-sri-toolbox/issues"},"homepage":"https://github.com/neftaly/npm-sri-toolbox","_id":"sri-toolbox@0.1.3","_shasum":"8844999ee6d67988ec8b1f92330e2cf2168d0f09","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"neftaly","email":"neftaly.hernandez@gmail.com"},"maintainers":[{"name":"neftaly","email":"neftaly.hernandez@gmail.com"}],"dist":{"shasum":"8844999ee6d67988ec8b1f92330e2cf2168d0f09","tarball":"http://registry-npm.ywwl.com/sri-toolbox/download/sri-toolbox-0.1.3.tgz","integrity":"sha512-FFMjaaRMvfUq3sWuyvEVHK/wfVEwrMR+SS6noZKDhG2pK/g+yXzDEJgbr0TXcO9V+vFquEnMtaPY+DpdosIQVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/QYduQ/L1pIF2zOqPeHnCnhetYeeChV0WDWlNfa9GHAiAIMZLso89c0BM2H8BR4ik4pt34shhY3hJPSxBfv/SZeA=="}],"size":36142,"noattachment":false,"key":"/sri-toolbox/-/sri-toolbox-0.1.3.tgz"},"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":1425329169861,"_cnpm_publish_time":1425329169861,"dist-tags":{"latest":"0.2.0"}}