Skip to content

Commit 11d844c

Browse files
committed
Minimal documentation for micromodules
1 parent f3a9589 commit 11d844c

File tree

19 files changed

+86
-18
lines changed

19 files changed

+86
-18
lines changed

dist/protobuf.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js.gz

0 Bytes
Binary file not shown.

dist/protobuf.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "protobufjs",
33
"version": "6.1.0",
44
"description": "Protocol Buffers for JavaScript.",
5-
"author": "Daniel Wirtz",
5+
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
66
"license": "Apache-2.0",
77
"repository": {
88
"type": "git",

src/util/base64/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
@protobufjs/base64
22
==================
3+
[![npm](https://img.shields.io/npm/v/@protobufjs/base64.svg)](https://www.npmjs.com/package/@protobufjs/base64)
4+
35
A minimal base64 implementation for number arrays.
46

7+
API
8+
---
9+
10+
* **base64.length(string: `string`): `number`**<br />
11+
Calculates the byte length of a base64 encoded string.
12+
13+
* **base64.encode(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**<br />
14+
Encodes a buffer to a base64 encoded string.
15+
16+
* **base64.decode(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**<br />
17+
Decodes a base64 encoded string to a buffer.
18+
519
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

src/util/base64/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
var base64 = exports;
99

1010
/**
11-
* Calculates the base64 byte length of a string.
11+
* Calculates the byte length of a base64 encoded string.
1212
* @param {string} string Base64 encoded string
1313
* @returns {number} Byte length
1414
*/

src/util/base64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@protobufjs/base64",
33
"description": "A minimal base64 implementation for number arrays.",
44
"version": "1.0.0",
5-
"author": "Daniel Wirtz <dcode@dcode.io>",
5+
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/dcodeIO/protobuf.js.git"

src/util/codegen/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
@protobufjs/codegen
22
===================
3+
[![npm](https://img.shields.io/npm/v/@protobufjs/codegen.svg)](https://www.npmjs.com/package/@protobufjs/codegen)
4+
35
A closure for generating functions programmatically.
46

5-
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
7+
API
8+
---
9+
10+
* **codegen(...params: `string`): `function(format: string, ...args: string): self`**<br />
11+
Begins generating a function programmatically.
12+
13+
* **codegen#str([name: `string`]): `string`**<br />
14+
Stringifies the so far generated function source.
15+
16+
* **codegen#eof([name?: `string`], [scope: `Object`]): `function`**<br />
17+
Ends generation and builds the function whilst applying a scope.
18+
19+
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

0 commit comments

Comments
 (0)