{"name":"sri-toolbox","version":"0.1.0","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":{"mocha":"^2.1.0"},"engines":{"node":">= 0.10.4"},"gitHead":"099a0e50b498e46c75ff983b61c8f8b6ced068fb","bugs":{"url":"https://github.com/neftaly/npm-sri-toolbox/issues"},"homepage":"https://github.com/neftaly/npm-sri-toolbox","_id":"sri-toolbox@0.1.0","_shasum":"c3131ed3960981a21d0090a011bef3f6ac608fe0","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"neftaly","email":"neftaly.hernandez@gmail.com"},"maintainers":[{"name":"neftaly","email":"neftaly.hernandez@gmail.com"}],"dist":{"shasum":"c3131ed3960981a21d0090a011bef3f6ac608fe0","tarball":"http://registry-npm.ywwl.com/sri-toolbox/download/sri-toolbox-0.1.0.tgz","integrity":"sha512-ttFgHJbf0Rm3sScbKmICgpHsbHTwMBJmjG++NAL7ublim4sFxFkIMHCRSYS7izl+hWYGcXjekHEyPUlraUExHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyXiaSEdU9VMXBUMVD38mY7pL4SCAVBPUzIAyiH1Jo3wIhAM+0wmtftLlMqwHfaYxSdPkgK2zBbHOlzRxtxfTPx+a2"}],"size":35440,"noattachment":false,"key":"/sri-toolbox/-/sri-toolbox-0.1.0.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":1424386657827,"_cnpm_publish_time":1424386657827,"dist-tags":{"latest":"0.2.0"}}