sri-create
v0.0.3
Published
create sri from local file or remote file
Downloads
4,920
Maintainers
Readme
sri-create
create sri from local file or remote file
usage
use in terminal
npm i sri-create -g
create-sri <file-url|file-path>
## for example
create-sri https://raw.githubusercontent.com/Youjingyu/sri-create/master/index.js
## output: sha384-ZUyT6D39ELzG6ROLqGHl2YFZux5Itck7tyrrXZIPpIlnI6z2Npm6QYe14vMKXFdJ
## or
create-sri /utils/index.js
use in script
npm i sri-create --save
const createSri = require('sri-create')
createSri('https://github.com/Youjingyu/sri-create/blob/master/index.js').then((res) => {
console.log(res)
}).catch((err) => {
console.log(err)
})