mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Update sha1-tests.ts
This commit is contained in:
@@ -7,7 +7,7 @@ import sha1 = require("sha1");
|
||||
* sha1(message)
|
||||
* message -- String or Buffer
|
||||
* returns String
|
||||
*
|
||||
*
|
||||
* Usage
|
||||
****************************************************
|
||||
* var sha1 = require('sha1'); *
|
||||
@@ -15,10 +15,10 @@ import sha1 = require("sha1");
|
||||
****************************************************
|
||||
* This will print the following
|
||||
* 6f9b9af3cd6e8b8a73c2cdced37fe9f59226e27d
|
||||
*
|
||||
*
|
||||
* It supports buffers, too
|
||||
****************************************************
|
||||
* var fs = require('fs'); *
|
||||
****************************************************
|
||||
* var fs = require('fs'); *
|
||||
* var sha1 = require('sha1'); *
|
||||
* *
|
||||
* fs.readFile('example.txt', function(err, buf) { *
|
||||
@@ -32,5 +32,5 @@ const testTwo = sha1('message', {asString: true});
|
||||
const testThree = sha1('message', {asBytes: true});
|
||||
|
||||
fs.readFile('sha1.d.ts', function(err: Error, buf: Buffer) {
|
||||
console.log(sha1(buf));
|
||||
console.log(sha1(buf));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user