code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Tries to keep input at up to `lineWidth` characters, splitting only on spaces
not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
terminated with `\n` and started with `indent`.
@param {string} text
@param {string} indent
@param {string} [mode='flow'] `'block'` prevents more-indented lines
from... | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolve(str, frac) {
const node = new _Scalar.default(parseFloat(str));
if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;
return node;
} | Tries to keep input at up to `lineWidth` characters, splitting only on spaces
not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
terminated with `\n` and started with `indent`.
@param {string} text
@param {string} indent
@param {string} [mode='flow'] `'block'` prevents more-indented lines
from... | resolve | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Tries to keep input at up to `lineWidth` characters, splitting only on spaces
not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
terminated with `\n` and started with `indent`.
@param {string} text
@param {string} indent
@param {string} [mode='flow'] `'block'` prevents more-indented lines
from... | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function parsePairs(doc, cst) {
const seq = (0, _parseSeq.default)(doc, cst);
for (let i = 0; i < seq.items.length; ++i) {
let item = seq.items[i];
if (item instanceof _Pair.default) continue;else if (item instanceof _Map$1.default) {
if (item.items.length > 1) {
const msg = 'Each... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parsePairs | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function createPairs(schema, iterable, ctx) {
const pairs = new _Seq.default(schema);
pairs.tag = 'tag:yaml.org,2002:pairs';
for (const it of iterable) {
let key, value;
if (Array.isArray(it)) {
if (it.length === 2) {
key = it[0];
value = it[1];
} else throw... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | createPairs | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _defineProperty | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
constructor() {
super();
_defineProperty(this, "add", _Map$1.default.prototype.add.bind(this));
_defineProperty(this, "delete", _Map$1.default.prototype.delete.bind(this));
_defineProperty(this, "get", _Map$1.default.prototype.get.bind(this));
_defineProperty(this, "has", _Map$1.defaul... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
toJSON(_, ctx) {
const map = new Map();
if (ctx && ctx.onCreate) ctx.onCreate(map);
for (const pair of this.items) {
let key, value;
if (pair instanceof _Pair.default) {
key = (0, _toJSON.default)(pair.key, '', ctx);
value = (0, _toJSON.default)(pair.value, key, c... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | toJSON | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function parseOMap(doc, cst) {
const pairs$1 = (0, pairs.parsePairs)(doc, cst);
const seenKeys = [];
for (const {
key
} of pairs$1.items) {
if (key instanceof _Scalar.default) {
if (seenKeys.includes(key.value)) {
const msg = 'Ordered maps must not include duplicate keys';... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseOMap | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function createOMap(schema, iterable, ctx) {
const pairs$1 = (0, pairs.createPairs)(schema, iterable, ctx);
const omap = new YAMLOMap();
omap.items = pairs$1.items;
return omap;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | createOMap | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _getRequireWildcardCache() {
if (typeof WeakMap !== "function") return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _getRequireWildcardCache | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
retu... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireWildcard | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _defineProperty | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
constructor() {
super();
this.tag = YAMLSet.tag;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
add(key) {
const pair = key instanceof _Pair.default ? key : new _Pair.default(key);
const prev = (0, _Map$1.findPair)(this.items, pair.key);
if (!prev) this.items.push(pair);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | add | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
get(key, keepPair) {
const pair = (0, _Map$1.findPair)(this.items, key);
return !keepPair && pair instanceof _Pair.default ? pair.key instanceof _Scalar.default ? pair.key.value : pair.key : pair;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | get | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
set(key, value) {
if (typeof value !== 'boolean') throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
const prev = (0, _Map$1.findPair)(this.items, key);
if (prev && !value) {
this.items.splice(this.items.indexOf(prev), 1);
} else if (!prev ... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | set | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
toJSON(_, ctx) {
return super.toJSON(_, ctx, Set);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | toJSON | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
toString(ctx, onComment, onChompKeep) {
if (!ctx) return JSON.stringify(this);
if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | toString | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function parseSet(doc, cst) {
const map = (0, _parseMap.default)(doc, cst);
if (!map.hasAllNullValues()) throw new errors.YAMLSemanticError(cst, 'Set items must all have null values');
return Object.assign(new YAMLSet(), map);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseSet | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function createSet(schema, iterable, ctx) {
const set = new YAMLSet();
for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));
return set;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | createSet | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
parseSexagesimal = (sign, parts) => {
const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);
return sign === '-' ? -n : n;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseSexagesimal | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
parseSexagesimal = (sign, parts) => {
const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);
return sign === '-' ? -n : n;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseSexagesimal | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
stringifySexagesimal = ({
value
}) => {
if (isNaN(value) || !isFinite(value)) return (0, stringify.stringifyNumber)(value);
let sign = '';
if (value < 0) {
sign = '-';
value = Math.abs(value);
}
const parts = [value % 60]; // seconds, including ms
if (value < 60) {
par... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | stringifySexagesimal | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
stringifySexagesimal = ({
value
}) => {
if (isNaN(value) || !isFinite(value)) return (0, stringify.stringifyNumber)(value);
let sign = '';
if (value < 0) {
sign = '-';
value = Math.abs(value);
}
const parts = [value % 60]; // seconds, including ms
if (value < 60) {
par... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | stringifySexagesimal | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
boolStringify = ({
value
}) => value ? options.boolOptions.trueStr : options.boolOptions.falseStr | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | boolStringify | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
boolStringify = ({
value
}) => value ? options.boolOptions.trueStr : options.boolOptions.falseStr | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | boolStringify | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolve(str, frac) {
const node = new _Scalar.default(parseFloat(str.replace(/_/g, '')));
if (frac) {
const f = frac.replace(/_/g, '');
if (f[f.length - 1] === '0') node.minFractionDigits = f.length;
}
return node;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolve | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _getRequireWildcardCache() {
if (typeof WeakMap !== "function") return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _getRequireWildcardCache | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
retu... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireWildcard | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _defineProperty | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
isMap = ({
type
}) => type === constants.Type.FLOW_MAP || type === constants.Type.MAP | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | isMap | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
isMap = ({
type
}) => type === constants.Type.FLOW_MAP || type === constants.Type.MAP | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | isMap | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
isSeq = ({
type
}) => type === constants.Type.FLOW_SEQ || type === constants.Type.SEQ | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | isSeq | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
isSeq = ({
type
}) => type === constants.Type.FLOW_SEQ || type === constants.Type.SEQ | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | isSeq | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
constructor({
customTags,
merge,
schema,
sortMapEntries,
tags: deprecatedCustomTags
}) {
this.merge = !!merge;
this.name = schema;
this.sortMapEntries = sortMapEntries === true ? (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0 : sortMapEntries || null;
this... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
createNode(value, wrapScalars, tag, ctx) {
if (value instanceof _Node.default) return value;
let tagObj;
if (tag) {
if (tag.startsWith('!!')) tag = Schema.defaultPrefix + tag.slice(2);
const match = this.tags.filter(t => t.tag === tag);
tagObj = match.find(t => !t.format) || m... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | createNode | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
createPair(key, value, ctx) {
const k = this.createNode(key, ctx.wrapScalars, null, ctx);
const v = this.createNode(value, ctx.wrapScalars, null, ctx);
return new _Pair.default(k, v);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | createPair | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveScalar(str, tags) {
if (!tags) tags = this.tags;
for (let i = 0; i < tags.length; ++i) {
const {
format,
test,
resolve
} = tags[i];
if (test) {
const match = str.match(test);
if (match) {
let res = resolve.apply(... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveScalar | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveNode(doc, node, tagName) {
const tags = this.tags.filter(({
tag
}) => tag === tagName);
const generic = tags.find(({
test
}) => !test);
if (node.error) doc.errors.push(node.error);
try {
if (generic) {
let res = generic.resolve(doc, node);
... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveNode | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveNodeWithFallback(doc, node, tagName) {
const res = this.resolveNode(doc, node, tagName);
if (Object.prototype.hasOwnProperty.call(node, 'resolved')) return res;
const fallback = isMap(node) ? Schema.defaultTags.MAP : isSeq(node) ? Schema.defaultTags.SEQ : Schema.defaultTags.STR;
/* istanb... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveNodeWithFallback | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
getTagObject(item) {
if (item instanceof _Alias.default) return _Alias.default;
if (item.tag) {
const match = this.tags.filter(t => t.tag === item.tag);
if (match.length > 0) return match.find(t => t.format === item.format) || match[0];
}
let tagObj, obj;
if (item instan... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | getTagObject | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
stringifyProps(node, tagObj, {
anchors,
doc
}) {
const props = [];
const anchor = doc.anchors.getName(node);
if (anchor) {
anchors[anchor] = node;
props.push(`&${anchor}`);
}
if (node.tag) {
props.push(doc.stringifyTag(node.tag));
} else if (... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | stringifyProps | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
stringify(item, ctx, onComment, onChompKeep) {
let tagObj;
if (!(item instanceof _Node.default)) {
const createCtx = {
aliasNodes: [],
onTagObj: o => tagObj = o,
prevObjects: new Map()
};
item = this.createNode(item, true, null, createCtx);
cons... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | stringify | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _getRequireWildcardCache() {
if (typeof WeakMap !== "function") return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _getRequireWildcardCache | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
retu... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireWildcard | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _defineProperty | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
constructor(options) {
this.anchors = new _Anchors.default(options.anchorPrefix);
this.commentBefore = null;
this.comment = null;
this.contents = null;
this.directivesEndMarker = null;
this.errors = [];
this.options = options;
this.schema = null;
this.tagPrefixes = ... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
assertCollectionContents() {
if (this.contents instanceof _Collection.default) return true;
throw new Error('Expected a YAML collection as document contents');
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | assertCollectionContents | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
add(value) {
this.assertCollectionContents();
return this.contents.add(value);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | add | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
addIn(path, value) {
this.assertCollectionContents();
this.contents.addIn(path, value);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | addIn | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
delete(key) {
this.assertCollectionContents();
return this.contents.delete(key);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | delete | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
deleteIn(path) {
if ((0, _Collection.isEmptyPath)(path)) {
if (this.contents == null) return false;
this.contents = null;
return true;
}
this.assertCollectionContents();
return this.contents.deleteIn(path);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | deleteIn | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
getDefaults() {
return Document.defaults[this.version] || Document.defaults[this.options.version] || {};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | getDefaults | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
get(key, keepScalar) {
return this.contents instanceof _Collection.default ? this.contents.get(key, keepScalar) : undefined;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | get | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
getIn(path, keepScalar) {
if ((0, _Collection.isEmptyPath)(path)) return !keepScalar && this.contents instanceof _Scalar.default ? this.contents.value : this.contents;
return this.contents instanceof _Collection.default ? this.contents.getIn(path, keepScalar) : undefined;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | getIn | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
has(key) {
return this.contents instanceof _Collection.default ? this.contents.has(key) : false;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | has | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
hasIn(path) {
if ((0, _Collection.isEmptyPath)(path)) return this.contents !== undefined;
return this.contents instanceof _Collection.default ? this.contents.hasIn(path) : false;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | hasIn | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
set(key, value) {
this.assertCollectionContents();
this.contents.set(key, value);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | set | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
setIn(path, value) {
if ((0, _Collection.isEmptyPath)(path)) this.contents = value;else {
this.assertCollectionContents();
this.contents.setIn(path, value);
}
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | setIn | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
setSchema(id, customTags) {
if (!id && !customTags && this.schema) return;
if (typeof id === 'number') id = id.toFixed(1);
if (id === '1.0' || id === '1.1' || id === '1.2') {
if (this.version) this.version = id;else this.options.version = id;
delete this.options.schema;
} else i... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | setSchema | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
parse(node, prevDoc) {
if (this.options.keepCstNodes) this.cstNode = node;
if (this.options.keepNodeTypes) this.type = 'DOCUMENT';
const {
directives = [],
contents = [],
directivesEndMarker,
error,
valueRange
} = node;
if (error) {
if (!err... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parse | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
parseDirectives(directives, prevDoc) {
const directiveComments = [];
let hasDirectives = false;
directives.forEach(directive => {
const {
comment,
name
} = directive;
switch (name) {
case 'TAG':
this.resolveTagDirective(directive);
... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseDirectives | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
copyTagPrefix = ({
handle,
prefix
}) => ({
handle,
prefix
}) | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | copyTagPrefix | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
copyTagPrefix = ({
handle,
prefix
}) => ({
handle,
prefix
}) | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | copyTagPrefix | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
parseContents(contents) {
const comments = {
before: [],
after: []
};
const contentNodes = [];
let spaceBefore = false;
contents.forEach(node => {
if (node.valueRange) {
if (contentNodes.length === 1) {
const msg = 'Document is not valid YAML (... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseContents | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveTagDirective(directive) {
const [handle, prefix] = directive.parameters;
if (handle && prefix) {
if (this.tagPrefixes.every(p => p.handle !== handle)) {
this.tagPrefixes.push({
handle,
prefix
});
} else {
const msg = 'The %TAG dir... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveTagDirective | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveYamlDirective(directive) {
let [version] = directive.parameters;
if (directive.name === 'YAML:1.0') version = '1.0';
if (this.version) {
const msg = 'The %YAML directive must only be given at most once per document.';
this.errors.push(new errors.YAMLSemanticError(directive, msg... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveYamlDirective | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveTagName(node) {
const {
tag,
type
} = node;
let nonSpecific = false;
if (tag) {
const {
handle,
suffix,
verbatim
} = tag;
if (verbatim) {
if (verbatim !== '!' && verbatim !== '!!') return verbatim;
... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveTagName | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
resolveNode(node) {
if (!node) return null;
const {
anchors,
errors: errors$1,
schema
} = this;
let hasAnchor = false;
let hasTag = false;
const comments = {
before: [],
after: []
};
const props = isCollectionItem(node.context.paren... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | resolveNode | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
listNonDefaultTags() {
return (0, _listTagNames.default)(this.contents).filter(t => t.indexOf(_schema.default.defaultPrefix) !== 0);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | listNonDefaultTags | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
setTagPrefix(handle, prefix) {
if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');
if (prefix) {
const prev = this.tagPrefixes.find(p => p.handle === handle);
if (prev) prev.prefix = prefix;else this.tagPrefixes.push({
h... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | setTagPrefix | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
stringifyTag(tag) {
if ((this.version || this.options.version) === '1.0') {
const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
if (priv) return '!' + priv[1];
const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);
return vocab ? `!${vocab[1]}/${vocab[2... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | stringifyTag | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
toJSON(arg) {
const {
keepBlobsInJSON,
mapAsMap,
maxAliasCount
} = this.options;
const keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof _Scalar.default));
const ctx = {
doc: this,
keep,
mapAsMap: keep && !!mapAsMap,
... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | toJSON | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
toString() {
if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');
this.setSchema();
const lines = [];
let hasDirectives = false;
if (this.version) {
let vd = '%YAML 1.2';
if (this.schema.name === 'yaml-1.1') {
if (this.versi... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | toString | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function createNode(value, wrapScalars = true, tag) {
if (tag === undefined && typeof wrapScalars === 'string') {
tag = wrapScalars;
wrapScalars = true;
}
const options = Object.assign({}, _Document.default.defaults[defaultOptions.version], defaultOptions);
const schema = new _schema.defaul... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | createNode | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
constructor(options) {
super(Object.assign({}, defaultOptions, options));
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function parseAllDocuments(src, options) {
const stream = [];
let prev;
for (const cstDoc of (0, _parse.default)(src)) {
const doc = new Document(options);
doc.parse(cstDoc, prev);
stream.push(doc);
prev = doc;
}
return stream;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseAllDocuments | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function parseDocument(src, options) {
const cst = (0, _parse.default)(src);
const doc = new Document(options).parse(cst[0]);
if (cst.length > 1) {
const errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';
doc.errors.unshift(new errors.YAMLSemanticError(cst[1], e... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parseDocument | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function parse(src, options) {
const doc = parseDocument(src, options);
doc.warnings.forEach(warning => (0, warnings.warn)(warning));
if (doc.errors.length > 0) throw doc.errors[0];
return doc.toJSON();
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | parse | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function stringify(value, options) {
const doc = new Document(options);
doc.contents = value;
return String(doc);
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | stringify | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
loadJs = function loadJs(filepath) {
if (importFresh$1 === undefined) {
importFresh$1 = importFresh;
}
const result = importFresh$1(filepath);
return result;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | loadJs | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
loadJs = function loadJs(filepath) {
if (importFresh$1 === undefined) {
importFresh$1 = importFresh;
}
const result = importFresh$1(filepath);
return result;
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | loadJs | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
loadJson = function loadJson(filepath, content) {
if (parseJson === undefined) {
parseJson = parseJson$1;
}
try {
const result = parseJson(content);
return result;
} catch (error) {
error.message = `JSON Error in ${filepath}:\n${error.message}`;
throw error;
}
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | loadJson | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
loadJson = function loadJson(filepath, content) {
if (parseJson === undefined) {
parseJson = parseJson$1;
}
try {
const result = parseJson(content);
return result;
} catch (error) {
error.message = `JSON Error in ${filepath}:\n${error.message}`;
throw error;
}
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | loadJson | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
loadYaml = function loadYaml(filepath, content) {
if (yaml$1 === undefined) {
yaml$1 = yaml;
}
try {
const result = yaml$1.parse(content, {
prettyErrors: true
});
return result;
} catch (error) {
error.message = `YAML Error in ${filepath}:\n${error.message}`;
... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | loadYaml | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
loadYaml = function loadYaml(filepath, content) {
if (yaml$1 === undefined) {
yaml$1 = yaml;
}
try {
const result = yaml$1.parse(content, {
prettyErrors: true
});
return result;
} catch (error) {
error.message = `YAML Error in ${filepath}:\n${error.message}`;
... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | loadYaml | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function getPropertyByPath(source, path) {
if (typeof path === 'string' && Object.prototype.hasOwnProperty.call(source, path)) {
return source[path];
}
const parsedPath = typeof path === 'string' ? path.split('.') : path; // eslint-disable-next-line @typescript-eslint/no-explicit-any
return pars... | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | getPropertyByPath | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | _interopRequireDefault | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
constructor(options) {
if (options.cache === true) {
this.loadCache = new Map();
this.searchCache = new Map();
}
this.config = options;
this.validateConfig();
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | constructor | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
clearLoadCache() {
if (this.loadCache) {
this.loadCache.clear();
}
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | clearLoadCache | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
clearSearchCache() {
if (this.searchCache) {
this.searchCache.clear();
}
} | Returns a Buffer in node and an Uint8Array in browsers
To use the resulting buffer as an image, you'll want to do something like:
const blob = new Blob([buffer], { type: 'image/jpeg' })
document.querySelector('#photo').src = URL.createObjectURL(blob) | clearSearchCache | javascript | douyu/juno | assets/public/js/prettier/v2.0.5/third-party.js | https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/third-party.js | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.