Skip to content

Commit c519662

Browse files
committed
Meta tweaks
1 parent 43895e0 commit c519662

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- '14'
34
- '12'
45
- '10'
56
- '8'

license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
"description": "Tiny hashing module that uses the native crypto API in Node.js and the browser",
55
"license": "MIT",
66
"repository": "sindresorhus/crypto-hash",
7+
"funding": "https://github.com/sponsors/sindresorhus",
78
"author": {
89
"name": "Sindre Sorhus",
910
"email": "sindresorhus@gmail.com",
10-
"url": "sindresorhus.com"
11+
"url": "https://sindresorhus.com"
1112
},
1213
"engines": {
1314
"node": ">=8"

readme.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# crypto-hash [![Build Status](https://travis-ci.org/sindresorhus/crypto-hash.svg?branch=master)](https://travis-ci.org/sindresorhus/crypto-hash)
1+
# crypto-hash [![Build Status](https://travis-ci.com/sindresorhus/crypto-hash.svg?branch=master)](https://travis-ci.com/github/sindresorhus/crypto-hash)
22

33
> Tiny hashing module that uses the native crypto API in Node.js and the browser
44
@@ -8,14 +8,12 @@ In Node.js it uses [`require('crypto')`](https://nodejs.org/api/crypto.html#cryp
88

99
The browser version is only ~300 bytes minified & gzipped.
1010

11-
1211
## Install
1312

1413
```
1514
$ npm install crypto-hash
1615
```
1716

18-
1917
## Usage
2018

2119
```js
@@ -27,13 +25,12 @@ const {sha256} = require('crypto-hash');
2725
})();
2826
```
2927

30-
3128
## API
3229

33-
### sha1(input, [options])
34-
### sha256(input, [options])
35-
### sha384(input, [options])
36-
### sha512(input, [options])
30+
### sha1(input, options?)
31+
### sha256(input, options?)
32+
### sha384(input, options?)
33+
### sha512(input, options?)
3734

3835
Returns a `Promise<string>` with a hex-encoded hash.
3936

@@ -51,13 +48,12 @@ Type: `object`
5148

5249
##### outputFormat
5350

54-
Type: `string`<br>
55-
Values: `hex` `buffer`<br>
56-
Default: `hex`
51+
Type: `string`\
52+
Values: `'hex' | 'buffer'`\
53+
Default: `'hex'`
5754

5855
Setting this to `buffer` makes it return an `ArrayBuffer` instead of a `string`.
5956

60-
6157
## Related
6258

6359
- [hasha](https://github.com/sindresorhus/hasha) - Hashing in Node.js made simple

test-browser.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ it('buffer output', async () => {
3535
const result = await sha1('🦄', {outputFormat: 'buffer'});
3636
expect(is(result)).toEqual('ArrayBuffer');
3737
});
38-

0 commit comments

Comments
 (0)