8000 Renamed other relevant parts · protobufjs/bytebuffer.js@ffd2d49 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffd2d49

Browse files
committed
Renamed other relevant parts
1 parent 5146495 commit ffd2d49

14 files changed

+50
-59
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
![ByteBuffer.js - The swiss army knife for binary data in JavaScript.](https://raw.github.com/dcodeIO/ByteBuffer.js/master/bytebuffer.png)
1+
![bytebuffer.js - The swiss army knife for binary data in JavaScript.](https://raw.github.com/dcodeIO/bytebuffer.js/master/bytebuffer.png)
22
======================================
33
A fast and complete ByteBuffer implementation using either ArrayBuffers in the browser or node Buffers under node.js,
44
generated from a single source tree through [MetaScript](https://github.com/dcodeIO/MetaScript).
55

6-
[![Build Status](https://travis-ci.org/dcodeIO/ByteBuffer.js.svg?branch=master)](https://travis-ci.org/dcodeIO/ByteBuffer.js)
7-
[![Donate](https://raw.githubusercontent.com/dcodeIO/Long.js/master/donate.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=info%40code-emitter.com&item_name=Open%20Source%3A%20ByteBuffer.js)
6+
[![Build Status](https://travis-ci.org/dcodeIO/bytebuffer.js.svg?branch=master)](https://travis-ci.org/dcodeIO/bytebuffer.js)
7+
[![Donate](https://raw.githubusercontent.com/dcodeIO/bytebuffer.js/master/donate.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=dcode%40dcode.io&item_name=Open%20Source%3A%20bytebuffer.js)
88

99
Features
1010
--------
@@ -34,26 +34,26 @@ var ByteBuffer = require("bytebuffer");
3434
var bb = new ByteBuffer()
3535
.writeIString("Hello world!")
3636
.flip();
37-
console.log(bb.readIString()+" from ByteBuffer.js");
37+
console.log(bb.readIString()+" from bytebuffer.js");
3838
```
3939

40-
In the browser, 64 bit integer support is optional and present only if [Long.js](https://github.com/dcodeIO/Long.js) has
41-
been loaded prior to ByteBuffer.js.
40+
In the browser, 64 bit integer support is optional and present only if [Long.js](https://github.com/dcodeIO/long.js) has
41+
been loaded prior to bytebuffer.js.
4242

4343
API
4444
---
45-
* [View the API documentation](https://github.com/dcodeIO/ByteBuffer.js/wiki/API)
46-
* [Check the wiki](https://github.com/dcodeIO/ByteBuffer.js/wiki)
45+
* [View the API documentation](https://github.com/dcodeIO/bytebuffer.js/wiki/API)
46+
* [Check the wiki](https://github.com/dcodeIO/bytebuffer.js/wiki)
4747

4848
Downloads
4949
---------
50-
* [Distributions](https://github.com/dcodeIO/ByteBuffer.js/tree/master/dist)
51-
* [ZIP-Archive](https://github.com/dcodeIO/ByteBuffer.js/archive/master.zip)
52-
* [Tarball](https://github.com/dcodeIO/ByteBuffer.js/tarball/master)
50+
* [Distributions](https://github.com/dcodeIO/bytebuffer.js/tree/master/dist)
51+
* [ZIP-Archive](https://github.com/dcodeIO/bytebuffer.js/archive/master.zip)
52+
* [Tarball](https://github.com/dcodeIO/bytebuffer.js/tarball/master)
5353

5454
Support for IE<10, FF<15, Chrome<9 etc.
5555
---------------------------------------
56-
* Use bytebuffer-dataview with a polyfill ([see](https://github.com/dcodeIO/ByteBuffer.js/tree/master/dist))
56+
* Use bytebuffer-dataview with a polyfill ([see](https://github.com/dcodeIO/bytebuffer.js/tree/master/dist))
5757

5858
Contributors
5959
------------

bytebuffer.png

47 Bytes
Loading

dist/bytebuffer-dataview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616

1717
/**
18-
* @license ByteBuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
19-
* [BUILD] ByteBufferAB - Backing buffer: ArrayBuffer, Accessor: DataView
18+
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
19+
* Backing buffer: ArrayBuffer, Accessor: DataView
2020
* Released under the Apache License, Version 2.0
21-
* see: https://github.com/dcodeIO/ByteBuffer.js for details
21+
* see: https://github.com/dcodeIO/bytebuffer.js for details
2222
*/
2323
(function(global, factory) {
2424

dist/bytebuffer-dataview.min.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/bytebuffer-dataview.min.js.gz

-12 Bytes
Binary file not shown.

dist/bytebuffer-node.js

Lines changed: 3 additions & 3 deletions
F438
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616

1717
/**
18-
* @license ByteBuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
19-
* [BUILD] ByteBufferNB - Backing buffer / Accessor: node Buffer
18+
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
19+
* Backing buffer / Accessor: node Buffer
2020
* Released under the Apache License, Version 2.0
21-
* see: https://github.com/dcodeIO/ByteBuffer.js for details
21+
* see: https://github.com/dcodeIO/bytebuffer.js for details
2222
*/
2323
module.exports = (function() {
2424
"use strict";

dist/bytebuffer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616

1717
/**
18-
* @license ByteBuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
19-
* [BUILD] ByteBufferAB - Backing buffer: ArrayBuffer, Accessor: Uint8Array
18+
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
19+
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
2020
* Released under the Apache License, Version 2.0
21-
* see: https://github.com/dcodeIO/ByteBuffer.js for details
21+
* see: https://github.com/dcodeIO/bytebuffer.js for details
2222
*/
2323
(function(global, factory) {
2424

dist/bytebuffer.min.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/bytebuffer.min.js.gz

-11 Bytes
Binary file not shown.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "5.0.0",
44
"author": "Daniel Wirtz <dcode@dcode.io>",
55
"description": "The swiss army knife for binary data in JavaScript.",
6-
"main": "./dist/bytebuffer-node.js",
7-
"browser": "./dist/bytebuffer.js",
6+
"main": "dist/bytebuffer-node.js",
7+
"browser": "dist/bytebuffer.js",
88
"repository": {
99
"type": "git",
1010
"url": "https://github.com/dcodeIO/bytebuffer.js.git"

scripts/build.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
/**
18-
* @overview ByteBuffer.js Build Script (c) 2013 Daniel Wirtz <dcode@dcode.io>
19-
* Released under the Apache License, Version 2.0
20-
* see: https://github.com/dcodeIO/ByteBuffer.js for details
21-
*/ //
22-
var MetaScript = require("../../MetaScript/MetaScript.js"),
17+
var MetaScript = require("metascript"),
2318
path = require("path"),
2419
fs = require("fs");
2520

@@ -80,15 +75,15 @@ var scope = {
8075

8176
if (!scope.UTF8) scope.STRINGS = false;
8277

83-
// Build node ByteBuffer using Buffers
78+
// Build node version using Buffers
8479
scope.NODE = true;
8580
console.log("Building bytebuffer-node with scope", JSON.stringify(scope, null, 2));
8681
fs.writeFileSync(
8782
path.join(distDir, "bytebuffer-node.js"),
8883
MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "wrap-node.js")), filename, scope, srcDir)
8984
);
9085

91-
// Build browser ByteBuffer using Typed Arrays
86+
// Build browser version using Typed Arrays
9287
scope.NODE = false;
9388
scope.DATAVIEW = false;
9489
delete scope.BUFFERVIEW;
@@ -98,7 +93,7 @@ fs.writeFileSync(
9893
MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "wrap.js")), filename, scope)
9994
);
10095

101-
// Build alternative browser ByteBuffer using a DataView
96+
// Build alternative browser version using a DataView
10297
scope.NODE = false;
10398
scope.DATAVIEW = true;
10499
console.log("Building bytebuffer-dataview with scope", JSON.stringify(scope, null, 2));

src/wrap-node.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
//? NODE = true;
1717

1818
/**
19-
* @license ByteBuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
20-
* [BUILD] ByteBufferNB - Backing buffer / Accessor: node Buffer
19+
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
20+
* Backing buffer / Accessor: node Buffer
2121
* Released under the Apache License, Version 2.0
22-
* see: https://github.com/dcodeIO/ByteBuffer.js for details
22+
* see: https://github.com/dcodeIO/bytebuffer.js for details
2323
*/
2424
module.exports = (function() {
2525
"use strict";

src/wrap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
*/
1616

1717
/**
18-
* @license ByteBuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
18+
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
1919
//? if (DATAVIEW)
20-
* [BUILD] ByteBufferAB - Backing buffer: ArrayBuffer, Accessor: DataView
20+
* Backing buffer: ArrayBuffer, Accessor: DataView
2121
//? else
22-
* [BUILD] ByteBufferAB - Backing buffer: ArrayBuffer, Accessor: Uint8Array
22+
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
2323
* Released under the Apache License, Version 2.0
24-
* see: https://github.com/dcodeIO/ByteBuffer.js for details
24+
* see: https://github.com/dcodeIO/bytebuffer.js for details
2525
*/
2626
(function(global, factory) {
2727

tests/suite.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@
1414
limitations under the License.
1515
*/
1616

17-
/**
18-
* ByteBuffer.js Test Suite.
19-
* @author Daniel Wirtz <dcode@dcode.io>
20-
*/ //
2117
var ByteBuffer = require("../dist/bytebuffer-node.js");
22-
var ByteBufferNB = ByteBuffer.ByteBufferNB = ByteBuffer;
23-
var ByteBufferAB = ByteBuffer.ByteBufferAB = require("../dist/bytebuffer.min.js");
24-
var ByteBufferAB_DataView = ByteBuffer.ByteBufferAB_DataView = require("../dist/bytebuffer-dataview.min.js");
18+
var ByteBufferNode = ByteBuffer;
19+
var ByteBufferBrowser = require("../dist/bytebuffer.min.js");
20+
var ByteBufferBrowser_DataView = require("../dist/bytebuffer-dataview.min.js");
2521
var pkg = require("../package.json");
2622

2723
/**
@@ -57,12 +53,12 @@ function makeSuite(ByteBuffer) {
5753

5854
suite.init = function(test) {
5955
test.ok(require("../index.js"));
60-
if (ByteBuffer == ByteBufferNB)
56+
if (ByteBuffer == ByteBufferNode)
6157
test.log("\n\n --- ByteBufferNB ---\n".bold.white),
6258
test.log("[optional] node-memcpy is "+(ByteBuffer.memcpy ? "present" : "not present"));
63-
else if (ByteBuffer == ByteBufferAB)
59+
else if (ByteBuffer == ByteBufferBrowser)
6460
test.log("\n\n --- ByteBufferAB ---\n".bold.white);
65-
else if (ByteBuffer == ByteBufferAB_DataView)
61+
else if (ByteBuffer == ByteBufferBrowser_DataView)
6662
test.log("\n\n --- ByteBufferAB_DataView ---\n".bold.white);
6763
test.ok(type === Buffer || type === ArrayBuffer);
6864
test.ok(typeof ByteBuffer == "function");
@@ -959,7 +955,7 @@ function makeSuite(ByteBuffer) {
959955

960956
if (type === ArrayBuffer) {
961957
suite.debug.printDebugVisual = function(test) {
962-
var bb = ByteBuffer.wrap("Hello world! from ByteBuffer.js. This is just a last visual test of ByteBuffer#printDebug.");
958+
var bb = ByteBuffer.wrap("Hello world! from byteBuffer.js. This is just a last visual test of ByteBuffer#printDebug.");
963959
console.log("");
964960
bb.printDebug(console.log);
965961
test.done();
@@ -974,7 +970,7 @@ module.exports = {
974970
test.log("Version "+ByteBuffer.VERSION+", "+new Date().toISOString()+"\n");
975971
test.done();
976972
},
977-
"NB": makeSuite(ByteBufferNB),
978-
"AB": makeSuite(ByteBufferAB),
979-
"AB_DataView": makeSuite(ByteBufferAB_DataView)
973+
"node": makeSuite(ByteBufferNode),
974+
"browser": makeSuite(ByteBufferBrowser),
975+
"dataview": makeSuite(ByteBufferBrowser_DataView)
980976
};

0 commit comments

Comments
 (0)
0