forked from enviPath/enviPy
Current Dev State
This commit is contained in:
22
static/js/ketcher2/node_modules/microbuffer/LICENSE
generated
vendored
Normal file
22
static/js/ketcher2/node_modules/microbuffer/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
Copyright (c) 2015 Vitaly Puzrin.
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
48
static/js/ketcher2/node_modules/microbuffer/Makefile
generated
vendored
Normal file
48
static/js/ketcher2/node_modules/microbuffer/Makefile
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
PATH := ./node_modules/.bin:${PATH}
|
||||
|
||||
NPM_PACKAGE := $(shell node -e 'console.log(require("./package.json").name)')
|
||||
NPM_VERSION := $(shell node -e 'console.log(require("./package.json").version)')
|
||||
|
||||
TMP_PATH := /tmp/${NPM_PACKAGE}-$(shell date +%s)
|
||||
|
||||
REMOTE_NAME ?= origin
|
||||
REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url)
|
||||
|
||||
CURR_HEAD := $(firstword $(shell git show-ref --hash HEAD | cut -b -6) master)
|
||||
GITHUB_PROJ := fontello/${NPM_PACKAGE}
|
||||
|
||||
|
||||
help:
|
||||
echo "make help - Print this help"
|
||||
echo "make lint - Lint sources with JSHint"
|
||||
echo "make test - Lint sources and run all tests"
|
||||
echo "make publish - Set new version tag and publish npm package"
|
||||
|
||||
|
||||
lint:
|
||||
eslint --reset .
|
||||
|
||||
|
||||
test: lint
|
||||
mocha test.js
|
||||
|
||||
|
||||
publish:
|
||||
@if test 0 -ne `git status --porcelain | wc -l` ; then \
|
||||
echo "Unclean working tree. Commit or stash changes first." >&2 ; \
|
||||
exit 128 ; \
|
||||
fi
|
||||
@if test 0 -ne `git fetch ; git status | grep '^# Your branch' | wc -l` ; then \
|
||||
echo "Local/Remote history differs. Please push/pull changes." >&2 ; \
|
||||
exit 128 ; \
|
||||
fi
|
||||
@if test 0 -ne `git tag -l ${NPM_VERSION} | wc -l` ; then \
|
||||
echo "Tag ${NPM_VERSION} exists. Update package.json" >&2 ; \
|
||||
exit 128 ; \
|
||||
fi
|
||||
git tag ${NPM_VERSION} && git push origin ${NPM_VERSION}
|
||||
npm publish https://github.com/${GITHUB_PROJ}/tarball/${NPM_VERSION}
|
||||
|
||||
|
||||
.PHONY: publish lint test
|
||||
.SILENT: help lint test
|
||||
53
static/js/ketcher2/node_modules/microbuffer/README.md
generated
vendored
Normal file
53
static/js/ketcher2/node_modules/microbuffer/README.md
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
microbuffer
|
||||
===========
|
||||
|
||||
[](https://travis-ci.org/fontello/microbuffer)
|
||||
[](https://www.npmjs.org/package/microbuffer)
|
||||
|
||||
> Light implementation of binary buffer with helpers for easy access.
|
||||
|
||||
This library was written for fontello's font convertors -
|
||||
[svg2ttf](https://github.com/fontello/svg2ttf)
|
||||
[ttf2woff](https://github.com/fontello/ttf2woff)
|
||||
[ttf2eot](https://github.com/fontello/ttf2eot). Main features are:
|
||||
- good speed & compact size (no dependencies)
|
||||
- transparent typed arrays support in browsers
|
||||
- methods to simplify binary data read/write
|
||||
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
### Constructor
|
||||
|
||||
- `new MicroBuffer(microbuffer [, offset, length])` - wrap MicroBuffer
|
||||
instanse, sharing the same data.
|
||||
- `new MicroBuffer(Uint8Array|Array [, offset, length])` - wrap Uint8Array|Array.
|
||||
- `new MicroBuffer(size)` - create new MicroBuffer of specified size.
|
||||
|
||||
### Methods
|
||||
|
||||
- `.getUint8(pos)`
|
||||
- `.getUint16(pos, littleEndian)`
|
||||
- `.getUint32(pos, littleEndian)`
|
||||
- `.setUint8(pos, value)`
|
||||
- `.setUint16(pos, value, littleEndian)`
|
||||
- `.setUint32(pos, value, littleEndian)`
|
||||
|
||||
With position update:
|
||||
|
||||
- `.writeUint8(value)`
|
||||
- `.writeInt8(value)`
|
||||
- `.writeUint16(value, littleEndian)`
|
||||
- `.writeInt16(value, littleEndian)`
|
||||
- `.writeUint32(value, littleEndian)`
|
||||
- `.writeInt32(value, littleEndian)`
|
||||
- `.writeUint64(value)`
|
||||
|
||||
Other:
|
||||
|
||||
- `.seek(pos)`
|
||||
- `.fill(value)`
|
||||
- `.writeBytes(Uint8Array|Array)`
|
||||
- `.toString()`
|
||||
- `.toArray()`
|
||||
206
static/js/ketcher2/node_modules/microbuffer/index.js
generated
vendored
Normal file
206
static/js/ketcher2/node_modules/microbuffer/index.js
generated
vendored
Normal file
@ -0,0 +1,206 @@
|
||||
// Light implementation of binary buffer with helpers for easy access.
|
||||
//
|
||||
'use strict';
|
||||
|
||||
|
||||
var TYPED_OK = (typeof Uint8Array !== 'undefined');
|
||||
|
||||
function createArray(size) {
|
||||
return TYPED_OK ? new Uint8Array(size) : Array(size);
|
||||
}
|
||||
|
||||
|
||||
function MicroBuffer(buffer, start, length) {
|
||||
|
||||
var isInherited = buffer instanceof MicroBuffer;
|
||||
|
||||
this.buffer = isInherited ?
|
||||
buffer.buffer
|
||||
:
|
||||
(typeof buffer === 'number' ? createArray(buffer) : buffer);
|
||||
|
||||
this.start = (start || 0) + (isInherited ? buffer.start : 0);
|
||||
this.length = length || (this.buffer.length - this.start);
|
||||
this.offset = 0;
|
||||
|
||||
this.isTyped = !Array.isArray(this.buffer);
|
||||
}
|
||||
|
||||
|
||||
MicroBuffer.prototype.getUint8 = function (pos) {
|
||||
return this.buffer[pos + this.start];
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.getUint16 = function (pos, littleEndian) {
|
||||
var val;
|
||||
if (littleEndian) {
|
||||
throw new Error('not implemented');
|
||||
} else {
|
||||
val = this.buffer[pos + 1 + this.start];
|
||||
val += this.buffer[pos + this.start] << 8 >>> 0;
|
||||
}
|
||||
return val;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.getUint32 = function (pos, littleEndian) {
|
||||
var val;
|
||||
if (littleEndian) {
|
||||
throw new Error('not implemented');
|
||||
} else {
|
||||
val = this.buffer[pos + 1 + this.start] << 16;
|
||||
val |= this.buffer[pos + 2 + this.start] << 8;
|
||||
val |= this.buffer[pos + 3 + this.start];
|
||||
val += this.buffer[pos + this.start] << 24 >>> 0;
|
||||
}
|
||||
return val;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.setUint8 = function (pos, value) {
|
||||
this.buffer[pos + this.start] = value & 0xFF;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.setUint16 = function (pos, value, littleEndian) {
|
||||
var offset = pos + this.start;
|
||||
var buf = this.buffer;
|
||||
if (littleEndian) {
|
||||
buf[offset] = value & 0xFF;
|
||||
buf[offset + 1] = (value >>> 8) & 0xFF;
|
||||
} else {
|
||||
buf[offset] = (value >>> 8) & 0xFF;
|
||||
buf[offset + 1] = value & 0xFF;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.setUint32 = function (pos, value, littleEndian) {
|
||||
var offset = pos + this.start;
|
||||
var buf = this.buffer;
|
||||
if (littleEndian) {
|
||||
buf[offset] = value & 0xFF;
|
||||
buf[offset + 1] = (value >>> 8) & 0xFF;
|
||||
buf[offset + 2] = (value >>> 16) & 0xFF;
|
||||
buf[offset + 3] = (value >>> 24) & 0xFF;
|
||||
} else {
|
||||
buf[offset] = (value >>> 24) & 0xFF;
|
||||
buf[offset + 1] = (value >>> 16) & 0xFF;
|
||||
buf[offset + 2] = (value >>> 8) & 0xFF;
|
||||
buf[offset + 3] = value & 0xFF;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeUint8 = function (value) {
|
||||
this.buffer[this.offset + this.start] = value & 0xFF;
|
||||
this.offset++;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeInt8 = function (value) {
|
||||
this.setUint8(this.offset, (value < 0) ? 0xFF + value + 1 : value);
|
||||
this.offset++;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeUint16 = function (value, littleEndian) {
|
||||
this.setUint16(this.offset, value, littleEndian);
|
||||
this.offset += 2;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeInt16 = function (value, littleEndian) {
|
||||
this.setUint16(this.offset, (value < 0) ? 0xFFFF + value + 1 : value, littleEndian);
|
||||
this.offset += 2;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeUint32 = function (value, littleEndian) {
|
||||
this.setUint32(this.offset, value, littleEndian);
|
||||
this.offset += 4;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeInt32 = function (value, littleEndian) {
|
||||
this.setUint32(this.offset, (value < 0) ? 0xFFFFFFFF + value + 1 : value, littleEndian);
|
||||
this.offset += 4;
|
||||
};
|
||||
|
||||
|
||||
// get current position
|
||||
//
|
||||
MicroBuffer.prototype.tell = function () {
|
||||
return this.offset;
|
||||
};
|
||||
|
||||
|
||||
// set current position
|
||||
//
|
||||
MicroBuffer.prototype.seek = function (pos) {
|
||||
this.offset = pos;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.fill = function (value) {
|
||||
var index = this.length - 1;
|
||||
while (index >= 0) {
|
||||
this.buffer[index + this.start] = value;
|
||||
index--;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeUint64 = function (value) {
|
||||
// we canot use bitwise operations for 64bit values because of JavaScript limitations,
|
||||
// instead we should divide it to 2 Int32 numbers
|
||||
// 2^32 = 4294967296
|
||||
var hi = Math.floor(value / 4294967296);
|
||||
var lo = value - hi * 4294967296;
|
||||
this.writeUint32(hi);
|
||||
this.writeUint32(lo);
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.writeBytes = function (data) {
|
||||
var buffer = this.buffer;
|
||||
var offset = this.offset + this.start;
|
||||
if (this.isTyped) {
|
||||
buffer.set(data, offset);
|
||||
} else {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
buffer[i + offset] = data[i];
|
||||
}
|
||||
}
|
||||
this.offset += data.length;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.toString = function (offset, length) {
|
||||
// default values if not set
|
||||
offset = (offset || 0);
|
||||
length = length || (this.length - offset);
|
||||
|
||||
// add buffer shift
|
||||
var start = offset + this.start;
|
||||
var end = start + length;
|
||||
|
||||
var string = '';
|
||||
for (var i = start; i < end; i++) {
|
||||
string += String.fromCharCode(this.buffer[i]);
|
||||
}
|
||||
return string;
|
||||
};
|
||||
|
||||
|
||||
MicroBuffer.prototype.toArray = function () {
|
||||
if (this.isTyped) {
|
||||
return this.buffer.subarray(this.start, this.start + this.length);
|
||||
}
|
||||
|
||||
return this.buffer.slice(this.start, this.start + this.length);
|
||||
};
|
||||
|
||||
|
||||
module.exports = MicroBuffer;
|
||||
53
static/js/ketcher2/node_modules/microbuffer/package.json
generated
vendored
Normal file
53
static/js/ketcher2/node_modules/microbuffer/package.json
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"_from": "microbuffer@^1.0.0",
|
||||
"_id": "microbuffer@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-izgy7UDIfVH0e7I0kTppinVtGdI=",
|
||||
"_location": "/microbuffer",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "microbuffer@^1.0.0",
|
||||
"name": "microbuffer",
|
||||
"escapedName": "microbuffer",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/svg2ttf",
|
||||
"/ttf2eot",
|
||||
"/ttf2woff"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/microbuffer/-/microbuffer-1.0.0.tgz",
|
||||
"_shasum": "8b3832ed40c87d51f47bb234913a698a756d19d2",
|
||||
"_spec": "microbuffer@^1.0.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/svg2ttf",
|
||||
"bugs": {
|
||||
"url": "https://github.com/fontello/microbuffer/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Light implementation of binary buffer with helpers for easy access.",
|
||||
"devDependencies": {
|
||||
"eslint": "0.18.0",
|
||||
"eslint-plugin-nodeca": "^1.0.3",
|
||||
"lodash": "*",
|
||||
"mocha": "^2.2.4"
|
||||
},
|
||||
"homepage": "https://github.com/fontello/microbuffer#readme",
|
||||
"keywords": [
|
||||
"buffer"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "microbuffer",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/fontello/microbuffer.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
205
static/js/ketcher2/node_modules/microbuffer/test.js
generated
vendored
Normal file
205
static/js/ketcher2/node_modules/microbuffer/test.js
generated
vendored
Normal file
@ -0,0 +1,205 @@
|
||||
'use strict';
|
||||
|
||||
/*global describe, it*/
|
||||
|
||||
var assert = require('assert');
|
||||
var _ = require('lodash');
|
||||
var MicroBuffer = require('./');
|
||||
|
||||
|
||||
var mb;
|
||||
|
||||
|
||||
function cmpBuf(a, b) {
|
||||
if (a.length !== b.length) {
|
||||
throw new assert.AssertionError({
|
||||
actual: a,
|
||||
expected: b,
|
||||
operator: 'compare'
|
||||
});
|
||||
}
|
||||
|
||||
for (var i = 0; i < a.length; i++) {
|
||||
if (a[i] !== b[i]) {
|
||||
throw new assert.AssertionError({
|
||||
actual: a,
|
||||
expected: b,
|
||||
operator: 'compare'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
describe('MicroBuffer', function () {
|
||||
|
||||
it('create by size', function () {
|
||||
mb = new MicroBuffer(5);
|
||||
|
||||
assert.equal(mb.length, 5);
|
||||
assert.ok(_.isTypedArray(mb.buffer));
|
||||
});
|
||||
|
||||
|
||||
it('wrap array', function () {
|
||||
mb = new MicroBuffer([ 1, 2, 3, 4 ]);
|
||||
cmpBuf(mb.toArray(), [ 1, 2, 3, 4 ]);
|
||||
|
||||
mb = new MicroBuffer([ 1, 2, 3, 4 ], 1, 2);
|
||||
cmpBuf(mb.toArray(), [ 2, 3 ]);
|
||||
});
|
||||
|
||||
|
||||
it('wrap typed array', function () {
|
||||
mb = new MicroBuffer(new Uint8Array([ 1, 2, 3, 4 ]));
|
||||
cmpBuf(mb.toArray(), [ 1, 2, 3, 4 ]);
|
||||
|
||||
mb = new MicroBuffer(new Uint8Array([ 1, 2, 3, 4 ]), 1, 2);
|
||||
cmpBuf(mb.toArray(), [ 2, 3 ]);
|
||||
});
|
||||
|
||||
|
||||
it('wrap MicroBuffer', function () {
|
||||
mb = new MicroBuffer(new MicroBuffer([ 1, 2, 3, 4 ]));
|
||||
cmpBuf(mb.toArray(), [ 1, 2, 3, 4 ]);
|
||||
|
||||
mb = new MicroBuffer(new MicroBuffer([ 1, 2, 3, 4 ]), 1, 2);
|
||||
cmpBuf(mb.toArray(), [ 2, 3 ]);
|
||||
});
|
||||
|
||||
|
||||
it('get/set numbers', function () {
|
||||
mb = new MicroBuffer(4);
|
||||
mb.setUint8(0, 0xAA);
|
||||
mb.setUint8(1, 0x55);
|
||||
mb.setUint16(2, 0x88EE);
|
||||
|
||||
assert.equal(mb.getUint8(0), 0xAA);
|
||||
assert.equal(mb.getUint8(1), 0x55);
|
||||
assert.equal(mb.getUint8(2), 0x88);
|
||||
assert.equal(mb.getUint8(3), 0xEE);
|
||||
|
||||
assert.equal(mb.getUint16(0), 0xAA55);
|
||||
assert.equal(mb.getUint16(2), 0x88EE);
|
||||
|
||||
assert.equal(mb.getUint32(0), 0xAA5588EE);
|
||||
|
||||
mb = new MicroBuffer(4);
|
||||
mb.setUint32(0, 0xAA5588EE);
|
||||
|
||||
assert.equal(mb.getUint32(0), 0xAA5588EE);
|
||||
});
|
||||
|
||||
|
||||
it('get/set numbers LE', function () {
|
||||
mb = new MicroBuffer(4);
|
||||
mb.setUint16(0, 0x88EE, true);
|
||||
|
||||
assert.equal(mb.getUint16(0), 0xEE88);
|
||||
|
||||
mb = new MicroBuffer(4);
|
||||
mb.setUint32(0, 0xAA5588EE, true);
|
||||
|
||||
assert.equal(mb.getUint32(0), 0xEE8855AA);
|
||||
});
|
||||
|
||||
|
||||
it('write numbers', function () {
|
||||
mb = new MicroBuffer(14);
|
||||
|
||||
mb.writeUint8(1);
|
||||
assert.equal(mb.tell(), 1);
|
||||
|
||||
mb.writeInt8(-1);
|
||||
assert.equal(mb.tell(), 2);
|
||||
|
||||
mb.writeUint16(0xAA55);
|
||||
assert.equal(mb.tell(), 4);
|
||||
|
||||
mb.writeInt16(-2);
|
||||
assert.equal(mb.tell(), 6);
|
||||
|
||||
mb.writeUint32(0xEE33AA55);
|
||||
assert.equal(mb.tell(), 10);
|
||||
|
||||
mb.writeInt32(-3);
|
||||
assert.equal(mb.tell(), 14);
|
||||
|
||||
cmpBuf(mb.toArray(), [
|
||||
1,
|
||||
0xFF,
|
||||
0xAA, 0x55,
|
||||
0xFF, 0xFE,
|
||||
0xEE, 0x33, 0xAA, 0x55,
|
||||
0xFF, 0xFF, 0xFF, 0xFD
|
||||
]);
|
||||
|
||||
});
|
||||
|
||||
|
||||
it('write numbers LE', function () {
|
||||
mb = new MicroBuffer(4);
|
||||
|
||||
mb.writeUint16(0xAA55, true);
|
||||
mb.writeInt16(-2, true);
|
||||
|
||||
cmpBuf(mb.toArray(), [
|
||||
0x55, 0xAA,
|
||||
0xFE, 0xFF
|
||||
]);
|
||||
|
||||
mb = new MicroBuffer(8);
|
||||
|
||||
mb.writeUint32(0xEE33AA55, true);
|
||||
mb.writeInt32(-3, true);
|
||||
|
||||
cmpBuf(mb.toArray(), [
|
||||
0x55, 0xAA, 0x33, 0xEE,
|
||||
0xFD, 0xFF, 0xFF, 0xFF
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
it('write Uint64', function () {
|
||||
mb = new MicroBuffer(8);
|
||||
|
||||
mb.writeUint64(0x112233445566);
|
||||
cmpBuf(mb.toArray(), [
|
||||
0x00, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
it('seek/fill', function () {
|
||||
mb = new MicroBuffer(4);
|
||||
|
||||
mb.fill(0x99);
|
||||
mb.seek(2);
|
||||
mb.writeUint16(0xAA55);
|
||||
|
||||
assert.equal(mb.getUint32(0), 0x9999AA55);
|
||||
});
|
||||
|
||||
|
||||
it('writeBytes', function () {
|
||||
mb = new MicroBuffer(4);
|
||||
|
||||
mb.writeBytes([ 0x00, 0xFF ]);
|
||||
mb.writeBytes(new Uint8Array([ 0xAA, 0x55 ]));
|
||||
|
||||
assert.equal(mb.getUint32(0), 0x00FFAA55);
|
||||
});
|
||||
|
||||
|
||||
it('toString', function () {
|
||||
mb = new MicroBuffer([ 0xAA, 0x55, 0x00, 0xFF ]);
|
||||
|
||||
var str = mb.toString();
|
||||
|
||||
assert.equal(str.charCodeAt(0), 0xAA);
|
||||
assert.equal(str.charCodeAt(1), 0x55);
|
||||
assert.equal(str.charCodeAt(2), 0x00);
|
||||
assert.equal(str.charCodeAt(3), 0xFF);
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user