mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
6
node_modules/es5-ext/string/from-code-point/implement.js
generated
vendored
Normal file
6
node_modules/es5-ext/string/from-code-point/implement.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
if (!require('./is-implemented')()) {
|
||||
Object.defineProperty(String, 'fromCodePoint', { value: require('./shim'),
|
||||
configurable: true, enumerable: false, writable: true });
|
||||
}
|
||||
5
node_modules/es5-ext/string/from-code-point/index.js
generated
vendored
Normal file
5
node_modules/es5-ext/string/from-code-point/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./is-implemented')()
|
||||
? String.fromCodePoint
|
||||
: require('./shim');
|
||||
7
node_modules/es5-ext/string/from-code-point/is-implemented.js
generated
vendored
Normal file
7
node_modules/es5-ext/string/from-code-point/is-implemented.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function () {
|
||||
var fromCodePoint = String.fromCodePoint;
|
||||
if (typeof fromCodePoint !== 'function') return false;
|
||||
return fromCodePoint(0x1D306, 0x61, 0x1D307) === '\ud834\udf06a\ud834\udf07';
|
||||
};
|
||||
30
node_modules/es5-ext/string/from-code-point/shim.js
generated
vendored
Normal file
30
node_modules/es5-ext/string/from-code-point/shim.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// Based on:
|
||||
// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/
|
||||
// and:
|
||||
// https://github.com/mathiasbynens/String.fromCodePoint/blob/master
|
||||
// /fromcodepoint.js
|
||||
|
||||
'use strict';
|
||||
|
||||
var floor = Math.floor, fromCharCode = String.fromCharCode;
|
||||
|
||||
module.exports = function (codePoint/*, …codePoints*/) {
|
||||
var chars = [], l = arguments.length, i, c, result = '';
|
||||
for (i = 0; i < l; ++i) {
|
||||
c = Number(arguments[i]);
|
||||
if (!isFinite(c) || c < 0 || c > 0x10FFFF || floor(c) !== c) {
|
||||
throw new RangeError("Invalid code point " + c);
|
||||
}
|
||||
|
||||
if (c < 0x10000) {
|
||||
chars.push(c);
|
||||
} else {
|
||||
c -= 0x10000;
|
||||
chars.push((c >> 10) + 0xD800, (c % 0x400) + 0xDC00);
|
||||
}
|
||||
if (i + 1 !== l && chars.length <= 0x4000) continue;
|
||||
result += fromCharCode.apply(null, chars);
|
||||
chars.length = 0;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user