Skip to content

Commit d0bf494

Browse files
chore(vendor): Update license and attribution style (#2949)
1 parent d7401ac commit d0bf494

File tree

3 files changed

+48
-35
lines changed

3 files changed

+48
-35
lines changed

src/js/vendor/buffer/LICENSE

-23
This file was deleted.

src/js/vendor/buffer/utf8ToBytes.ts

+24-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1+
// Adapted from https://github.com/feross/buffer/blob/795bbb5bda1b39f1370ebd784bea6107b087e3a7/index.js#L1956
2+
3+
// The MIT License (MIT)
4+
5+
// Copyright (c) Feross Aboukhadijeh, and other contributors.
6+
7+
// Permission is hereby granted, free of charge, to any person obtaining a copy
8+
// of this software and associated documentation files (the "Software"), to deal
9+
// in the Software without restriction, including without limitation the rights
10+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
// copies of the Software, and to permit persons to whom the Software is
12+
// furnished to do so, subject to the following conditions:
13+
14+
// The above copyright notice and this permission notice shall be included in
15+
// all copies or substantial portions of the Software.
16+
17+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
// THE SOFTWARE.
24+
125
/* eslint-disable */
226

327
/**
428
* Convert a string to a byte array
5-
*
6-
* This is a utf8ToBytes function from the buffer module (with added types)
7-
* https://github.com/feross/buffer/blob/795bbb5bda1b39f1370ebd784bea6107b087e3a7/index.js#L1956
8-
*
9-
* License: MIT (https://github.com/feross/buffer)
1029
*/
1130
export function utf8ToBytes(string: string, units?: number): number[] {
1231
units = units || Infinity;

test/vendor/buffer/utf8ToBytes.test.ts

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1+
// Adapted from https://github.com/feross/buffer/blob/795bbb5bda1b39f1370ebd784bea6107b087e3a7/index.js#L1956
2+
3+
// The MIT License (MIT)
4+
5+
// Copyright (c) Feross Aboukhadijeh, and other contributors.
6+
7+
// Permission is hereby granted, free of charge, to any person obtaining a copy
8+
// of this software and associated documentation files (the "Software"), to deal
9+
// in the Software without restriction, including without limitation the rights
10+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
// copies of the Software, and to permit persons to whom the Software is
12+
// furnished to do so, subject to the following conditions:
13+
14+
// The above copyright notice and this permission notice shall be included in
15+
// all copies or substantial portions of the Software.
16+
17+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
// THE SOFTWARE.
24+
125
import { utf8ToBytes } from '../../../src/js/vendor';
226

3-
/**
4-
* These test are taken over from encode-utf8 library to test the utf8ToBytes function
5-
*
6-
* https://github.com/LinusU/encode-utf8/blob/9c112ab99827e07667f9a349ca5498157479f68e/test.js
7-
*
8-
* License: MIT (https://github.com/LinusU/encode-utf8)
9-
*/
1027
describe('Buffer utf8 tests', () => {
1128
const testCases = [
1229
'゚・✿ヾ╲(。◕‿◕。)╱✿・゚',

0 commit comments

Comments
 (0)