forked from enviPath/enviPy
Current Dev State
This commit is contained in:
20
static/js/ketcher2/node_modules/string.fromcodepoint/LICENSE-MIT.txt
generated
vendored
Normal file
20
static/js/ketcher2/node_modules/string.fromcodepoint/LICENSE-MIT.txt
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright Mathias Bynens <http://mathiasbynens.be/>
|
||||
|
||||
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.
|
||||
49
static/js/ketcher2/node_modules/string.fromcodepoint/README.md
generated
vendored
Normal file
49
static/js/ketcher2/node_modules/string.fromcodepoint/README.md
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
# ES6 `String.fromCodePoint` polyfill [](https://travis-ci.org/mathiasbynens/String.fromCodePoint)
|
||||
|
||||
An robust & optimized ES3-compatible polyfill for [the `String.fromCodePoint` method in ECMAScript 6](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint).
|
||||
|
||||
Other polyfills for `String.fromCodePoint` are available:
|
||||
|
||||
* <http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/#String> by [Norbert Lindenberg](http://norbertlindenberg.com/) (passes all tests)
|
||||
* <https://gist.github.com/slevithan/2290602> by [Steven Levithan](http://stevenlevithan.com/) (fails 8 tests)
|
||||
* <https://github.com/paulmillr/es6-shim/blob/771e98e789292706d2435e4e10ffbe45edf40da6/es6-shim.js#L63-L83> by [Paul Miller](http://paulmillr.com/) (passes all tests)
|
||||
|
||||
## Installation
|
||||
|
||||
In a browser:
|
||||
|
||||
```html
|
||||
<script src="fromcodepoint.js"></script>
|
||||
```
|
||||
|
||||
Via [npm](http://npmjs.org/):
|
||||
|
||||
```bash
|
||||
npm install string.fromcodepoint
|
||||
```
|
||||
|
||||
Then, in [Node.js](http://nodejs.org/):
|
||||
|
||||
```js
|
||||
require('string.fromcodepoint');
|
||||
|
||||
// On Windows and on Mac systems with default settings, case doesn’t matter,
|
||||
// which allows you to do this instead:
|
||||
require('String.fromCodePoint');
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
[A polyfill + test suite for `String.prototype.codePointAt`](http://mths.be/codepointat) is available, too.
|
||||
|
||||
The tests for this repository [are now used by Mozilla](http://hg.mozilla.org/integration/mozilla-inbound/rev/2411714cd058), to help ensure their native `String.fromCodePoint` implementation is correct.
|
||||
|
||||
## Author
|
||||
|
||||
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
||||
|---|
|
||||
| [Mathias Bynens](http://mathiasbynens.be/) |
|
||||
|
||||
## License
|
||||
|
||||
This polyfill is available under the [MIT](http://mths.be/mit) license.
|
||||
62
static/js/ketcher2/node_modules/string.fromcodepoint/fromcodepoint.js
generated
vendored
Normal file
62
static/js/ketcher2/node_modules/string.fromcodepoint/fromcodepoint.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */
|
||||
if (!String.fromCodePoint) {
|
||||
(function() {
|
||||
var defineProperty = (function() {
|
||||
// IE 8 only supports `Object.defineProperty` on DOM elements
|
||||
try {
|
||||
var object = {};
|
||||
var $defineProperty = Object.defineProperty;
|
||||
var result = $defineProperty(object, object, object) && $defineProperty;
|
||||
} catch(error) {}
|
||||
return result;
|
||||
}());
|
||||
var stringFromCharCode = String.fromCharCode;
|
||||
var floor = Math.floor;
|
||||
var fromCodePoint = function(_) {
|
||||
var MAX_SIZE = 0x4000;
|
||||
var codeUnits = [];
|
||||
var highSurrogate;
|
||||
var lowSurrogate;
|
||||
var index = -1;
|
||||
var length = arguments.length;
|
||||
if (!length) {
|
||||
return '';
|
||||
}
|
||||
var result = '';
|
||||
while (++index < length) {
|
||||
var codePoint = Number(arguments[index]);
|
||||
if (
|
||||
!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
|
||||
codePoint < 0 || // not a valid Unicode code point
|
||||
codePoint > 0x10FFFF || // not a valid Unicode code point
|
||||
floor(codePoint) != codePoint // not an integer
|
||||
) {
|
||||
throw RangeError('Invalid code point: ' + codePoint);
|
||||
}
|
||||
if (codePoint <= 0xFFFF) { // BMP code point
|
||||
codeUnits.push(codePoint);
|
||||
} else { // Astral code point; split in surrogate halves
|
||||
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
||||
codePoint -= 0x10000;
|
||||
highSurrogate = (codePoint >> 10) + 0xD800;
|
||||
lowSurrogate = (codePoint % 0x400) + 0xDC00;
|
||||
codeUnits.push(highSurrogate, lowSurrogate);
|
||||
}
|
||||
if (index + 1 == length || codeUnits.length > MAX_SIZE) {
|
||||
result += stringFromCharCode.apply(null, codeUnits);
|
||||
codeUnits.length = 0;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
if (defineProperty) {
|
||||
defineProperty(String, 'fromCodePoint', {
|
||||
'value': fromCodePoint,
|
||||
'configurable': true,
|
||||
'writable': true
|
||||
});
|
||||
} else {
|
||||
String.fromCodePoint = fromCodePoint;
|
||||
}
|
||||
}());
|
||||
}
|
||||
67
static/js/ketcher2/node_modules/string.fromcodepoint/package.json
generated
vendored
Normal file
67
static/js/ketcher2/node_modules/string.fromcodepoint/package.json
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"_from": "string.fromcodepoint@^0.2.1",
|
||||
"_id": "string.fromcodepoint@0.2.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-jZeDM8C8klOPUPOD5IiPPlYZ1lM=",
|
||||
"_location": "/string.fromcodepoint",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "string.fromcodepoint@^0.2.1",
|
||||
"name": "string.fromcodepoint",
|
||||
"escapedName": "string.fromcodepoint",
|
||||
"rawSpec": "^0.2.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.2.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/svgicons2svgfont"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/string.fromcodepoint/-/string.fromcodepoint-0.2.1.tgz",
|
||||
"_shasum": "8d978333c0bc92538f50f383e4888f3e5619d653",
|
||||
"_spec": "string.fromcodepoint@^0.2.1",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/svgicons2svgfont",
|
||||
"author": {
|
||||
"name": "Mathias Bynens",
|
||||
"url": "http://mathiasbynens.be/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mathiasbynens/String.fromCodePoint/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "A robust & optimized `String.fromCodePoint` polyfill, based on the ECMAScript 6 specification.",
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE-MIT.txt",
|
||||
"fromcodepoint.js"
|
||||
],
|
||||
"homepage": "http://mths.be/fromcodepoint",
|
||||
"keywords": [
|
||||
"string",
|
||||
"unicode",
|
||||
"es6",
|
||||
"ecmascript",
|
||||
"polyfill"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://mths.be/mit"
|
||||
}
|
||||
],
|
||||
"main": "fromcodepoint.js",
|
||||
"name": "string.fromcodepoint",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mathiasbynens/String.fromCodePoint.git"
|
||||
},
|
||||
"scripts": {
|
||||
"cover": "istanbul cover --report html --verbose --dir coverage tests/tests.js",
|
||||
"test": "node tests/tests.js"
|
||||
},
|
||||
"version": "0.2.1"
|
||||
}
|
||||
Reference in New Issue
Block a user