Socket
Socket
Sign inDemoInstall

sha1-file

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

5

package.json

@@ -6,5 +6,6 @@ {

"index.js",
"test.js"
"test.js",
"LICENSE.md"
],
"version": "0.0.2",
"version": "0.0.3",
"description": "return an sha1sum of a given file",

@@ -11,0 +12,0 @@ "keywords": [

9

README.md

@@ -1,7 +0,5 @@

# sha1-file
# sha1-file [![Build Status](https://travis-ci.org/roryrjb/sha1-file.svg?branch=master)](https://travis-ci.org/roryrjb/sha1-file)
### Overview
> Simply return an `sha1` sum of a given file.
Simply return an `sha1` sum of a given file.
### Installation

@@ -53,1 +51,4 @@

### LICENSE
MIT
'use strict';
var sha1 = require('./index');
var assert = require('assert');
console.log('sha1 (1) ' + sha1('./README.md'));
assert.equal(sha1('./LICENSE.md'), '635cf3c238455570c909d24a5237050cbb1837e9');
sha1.async('./README.md', function (data) {
console.log('sha1 (2) ' + data);
sha1.async('./LICENSE.md', function (data) {
assert.equal(data, '635cf3c238455570c909d24a5237050cbb1837e9');
});
sha1.async('./README.md', function (data) {
console.log('sha1 (3) ' + data);
sha1.async('./LICENSE.md', function (data) {
assert.equal(data, '635cf3c238455570c909d24a5237050cbb1837e9');
}, true);

@@ -19,9 +20,4 @@

sha1.async('./null', function (data) {
console.log('sha1 (4) ' + data);
assert.equal(data.code, 'ENOENT');
});
// strict: will throw an error
sha1.async('./null', function (data) {
console.log('sha1 (5) ' + data);
}, true);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc