Permalink
Browse files

Minimal documentation for micromodules

  • Loading branch information...
dcodeIO committed Dec 11, 2016
1 parent f3a9589 commit 11d844c010c5a22eff9d5824714fb67feca77b26

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
BIN +0 Bytes (100%) dist/protobuf.min.js.gz
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,7 +2,7 @@
"name": "protobufjs",
"version": "6.1.0",
"description": "Protocol Buffers for JavaScript.",
"author": "Daniel Wirtz",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"license": "Apache-2.0",
"repository": {
"type": "git",
@@ -1,5 +1,19 @@
@protobufjs/base64
==================
[![npm](https://img.shields.io/npm/v/@protobufjs/base64.svg)](https://www.npmjs.com/package/@protobufjs/base64)
A minimal base64 implementation for number arrays.
API
---
* **base64.length(string: `string`): `number`**<br />
Calculates the byte length of a base64 encoded string.
* **base64.encode(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**<br />
Encodes a buffer to a base64 encoded string.
* **base64.decode(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**<br />
Decodes a base64 encoded string to a buffer.
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
@@ -8,7 +8,7 @@
var base64 = exports;
/**
* Calculates the base64 byte length of a string.
* Calculates the byte length of a base64 encoded string.
* @param {string} string Base64 encoded string
* @returns {number} Byte length
*/
@@ -2,7 +2,7 @@
"name": "@protobufjs/base64",
"description": "A minimal base64 implementation for number arrays.",
"version": "1.0.0",
"author": "Daniel Wirtz <dcode@dcode.io>",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
"type": "git",
"url": "https://github.com/dcodeIO/protobuf.js.git"
@@ -1,5 +1,19 @@
@protobufjs/codegen
===================
[![npm](https://img.shields.io/npm/v/@protobufjs/codegen.svg)](https://www.npmjs.com/package/@protobufjs/codegen)
A closure for generating functions programmatically.
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
API
---
* **codegen(...params: `string`): `function(format: string, ...args: string): self`**<br />
Begins generating a function programmatically.
* **codegen#str([name: `string`]): `string`**<br />
Stringifies the so far generated function source.
* **codegen#eof([name?: `string`], [scope: `Object`]): `function`**<br />
Ends generation and builds the function whilst applying a scope.
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
@@ -2,7 +2,7 @@
"name": "@protobufjs/codegen",
"description": "A closure for generating functions programmatically.",
"version": "1.0.0",
"author": "Daniel Wirtz <dcode@dcode.io>",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
"type": "git",
"url": "https://github.com/dcodeIO/protobuf.js.git"
@@ -1,5 +1,22 @@
@protobufjs/eventemitter
========================
[![npm](https://img.shields.io/npm/v/@protobufjs/eventemitter.svg)](https://www.npmjs.com/package/@protobufjs/eventemitter)
A minimal event emitter.
API
---
* **new EventEmitter()**<br />
Constructs a new event emitter instance.
* **EventEmitter#on(evt: `string`, fn: `function`, [ctx: `Object`]): `EventEmitter`**<br />
Registers an event listener.
* **EventEmitter#off([evt: `string`], [fn: `function`]): `EventEmitter`**<br />
Removes an event listener or any matching listeners if arguments are omitted.
* **EventEmitter#emit(evt: `string`, ...args: `*`): `EventEmitter`**<br />
Emits an event by calling its listeners with the specified arguments.
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
@@ -36,7 +36,7 @@ EventEmitterPrototype.on = function on(evt, fn, ctx) {
};
/**
* Removes an event listener.
* Removes an event listener or any matching listeners if arguments are omitted.
* @param {string} [evt] Event name. Removes all listeners if omitted.
* @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
* @returns {util.EventEmitter} `this`
@@ -2,7 +2,7 @@
"name": "@protobufjs/eventemitter",
"description": "A minimal event emitter.",
"version": "1.0.0",
"author": "Daniel Wirtz <dcode@dcode.io>",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
"type": "git",
"url": "https://github.com/dcodeIO/protobuf.js.git"
@@ -1,5 +1,13 @@
@protobufjs/pool
================
[![npm](https://img.shields.io/npm/v/@protobufjs/pool.svg)](https://www.npmjs.com/package/@protobufjs/pool)
A general purpose buffer pool.
API
---
* **pool(alloc: `function(size: number): Uint8Array`, slice: `function(this: Uint8Array, start: number, end: number): Uint8Array`, [size=8192: `number`]): `function(size: number): Uint8Array`**<br />
Creates a pooled allocator.
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
@@ -2,7 +2,7 @@
"name": "@protobufjs/pool",
"description": "A general purpose buffer pool.",
"version": "1.0.0",
"author": "Daniel Wirtz <dcode@dcode.io>",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
"type": "git",
"url": "https://github.com/dcodeIO/protobuf.js.git"
@@ -1,5 +1,20 @@
@protobufjs/utf8
================
[![npm](https://img.shields.io/npm/v/@protobufjs/utf8.svg)](https://www.npmjs.com/package/@protobufjs/utf8)
A minimal UTF8 implementation for number arrays.
API
---
* **utf8.length(string: `string`): `number`**<br />
Calculates the UTF8 byte length of a string.
* **utf8.read(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**<br />
Reads UTF8 bytes as a string.
* **utf8.write(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**<br />
Writes a string as UTF8 bytes.
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
@@ -2,7 +2,7 @@
"name": "@protobufjs/utf8",
"description": "A minimal UTF8 implementation for number arrays.",
"version": "1.0.0",
"author": "Daniel Wirtz <dcode@dcode.io>",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
"type": "git",
"url": "https://github.com/dcodeIO/protobuf.js.git"
@@ -1,6 +1,6 @@
/*
* protobuf.js v6.1.0 TypeScript definitions
* Generated Sat, 10 Dec 2016 23:38:42 UTC
* Generated Sun, 11 Dec 2016 00:46:04 UTC
*/
declare module "protobufjs" {
@@ -1657,7 +1657,7 @@ declare module "protobufjs" {
*/
module base64 {
/**
* Calculates the base64 byte length of a string.
* Calculates the byte length of a base64 encoded string.
* @param {string} string Base64 encoded string
* @returns {number} Byte length
*/
@@ -1721,7 +1721,7 @@ declare module "protobufjs" {
on(evt: string, fn: (() => any), ctx?: Object): util.EventEmitter;
/**
* Removes an event listener.
* Removes an event listener or any matching listeners if arguments are omitted.
* @param {string} [evt] Event name. Removes all listeners if omitted.
* @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
* @returns {util.EventEmitter} `this`

0 comments on commit 11d844c

Please sign in to comment.