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 filterSince(object) {
return showUnreleased || !("since" in object) || object.since && semver$1.gte(version, object.since);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
filterSince
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function filterDeprecated(object) {
return showDeprecated || !("deprecated" in object) || object.deprecated && semver$1.lt(version, object.deprecated);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
filterDeprecated
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function mapInternal(object) {
if (showInternal) {
return object;
}
const newObject = _objectWithoutPropertiesLoose(object, ["cliName", "cliCategory", "cliDescription"]);
return newObject;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
mapInternal
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
_extendStatics = function extendStatics(d, b) {
_extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
};
return _extendStatics(d, b);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
_extendStatics
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __extends(d, b) {
_extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__extends
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __() {
this.constructor = d;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
_assign = function __assign() {
_assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return _assign.apply(this, arguments);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
_assign
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__rest
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __decorate(decorators, target, key, desc) {
var c = arguments.length,
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__decorate
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __param(paramIndex, decorator) {
return function (target, key) {
decorator(target, key, paramIndex);
};
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__param
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__metadata
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__awaiter
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function adopt(value) {
return value instanceof P ? value : new P(function (resolve) {
resolve(value);
});
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
adopt
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
fulfilled
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
rejected
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
step
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __generator(thisArg, body) {
var _ = {
label: 0,
sent: function sent() {
if (t[0] & 1) throw t[1];
return t[1];
},
trys: [],
ops: []
},
f,
y,
t,
g;
return g = {
next: verb(0),
"throw": verb(1),
"return": verb(2)
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
return this;
}), g;
function verb(n) {
return function (v) {
return step([n, v]);
};
}
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return {
value: op[1],
done: false
};
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2]) _.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t = 0;
}
if (op[0] & 5) throw op[1];
return {
value: op[0] ? op[1] : void 0,
done: true
};
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__generator
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function verb(n) {
return function (v) {
return step([n, v]);
};
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
verb
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return {
value: op[1],
done: false
};
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2]) _.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t = 0;
}
if (op[0] & 5) throw op[1];
return {
value: op[0] ? op[1] : void 0,
done: true
};
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
step
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__exportStar
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator,
m = s && o[s],
i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function next() {
if (o && i >= o.length) o = void 0;
return {
value: o && o[i++],
done: !o
};
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__values
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__read
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__spread
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
return r;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__spreadArrays
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__await
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []),
i,
q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
return this;
}, i;
function verb(n) {
if (g[n]) i[n] = function (v) {
return new Promise(function (a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
};
}
function resume(n, v) {
try {
step(g[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
function step(r) {
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
function fulfill(value) {
resume("next", value);
}
function reject(value) {
resume("throw", value);
}
function settle(f, v) {
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__asyncGenerator
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function verb(n) {
if (g[n]) i[n] = function (v) {
return new Promise(function (a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
};
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
verb
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function resume(n, v) {
try {
step(g[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
resume
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function step(r) {
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
step
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function fulfill(value) {
resume("next", value);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
fulfill
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function reject(value) {
resume("throw", value);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
reject
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function settle(f, v) {
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
settle
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) {
throw e;
}), verb("return"), i[Symbol.iterator] = function () {
return this;
}, i;
function verb(n, f) {
i[n] = o[n] ? function (v) {
return (p = !p) ? {
value: __await(o[n](v)),
done: n === "return"
} : f ? f(v) : v;
} : f;
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__asyncDelegator
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function verb(n, f) {
i[n] = o[n] ? function (v) {
return (p = !p) ? {
value: __await(o[n](v)),
done: n === "return"
} : f ? f(v) : v;
} : f;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
verb
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator],
i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
return this;
}, i);
function verb(n) {
i[n] = o[n] && function (v) {
return new Promise(function (resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function (v) {
resolve({
value: v,
done: d
});
}, reject);
}
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__asyncValues
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function verb(n) {
i[n] = o[n] && function (v) {
return new Promise(function (resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
verb
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function (v) {
resolve({
value: v,
done: d
});
}, reject);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
settle
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", {
value: raw
});
} else {
cooked.raw = raw;
}
return cooked;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__makeTemplateObject
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__importStar
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __importDefault(mod) {
return mod && mod.__esModule ? mod : {
default: mod
};
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__importDefault
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__classPrivateFieldGet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
__classPrivateFieldSet
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
value(value) {
if (value === null || typeof value !== 'object') {
return JSON.stringify(value);
}
if (Array.isArray(value)) {
return "[".concat(value.map(subValue => exports.apiDescriptor.value(subValue)).join(', '), "]");
}
const keys = Object.keys(value);
return keys.length === 0 ? '{}' : "{ ".concat(keys.map(key => "".concat(exports.apiDescriptor.key(key), ": ").concat(exports.apiDescriptor.value(value[key]))).join(', '), " }");
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
value
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
escapeStringRegexp = function escapeStringRegexp(str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
escapeStringRegexp
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
diffc = function diffc(c) {
return (v - c) / 6 / diff + 1 / 2;
}
|
Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
of this function created by `withPlugins`. Don't pass them here directly.
@param {object} param0
@param {(string | object)[]=} param0.plugins Strings are resolved by `withPlugins`.
@param {string[]=} param0.pluginSearchDirs Added by `withPlugins`.
@param {boolean=} param0.showUnreleased
@param {boolean=} param0.showDeprecated
@param {boolean=} param0.showInternal
|
diffc
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function comparativeDistance(x, y) {
return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
comparativeDistance
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function buildGraph() {
var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3
var models = Object.keys(conversions);
for (var len = models.length, i = 0; i < len; i++) {
graph[models[i]] = {
// http://jsperf.com/1-vs-infinity
// micro-opt, but this is simple.
distance: -1,
parent: null
};
}
return graph;
} // https://en.wikipedia.org/wiki/Breadth-first_search
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
buildGraph
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function deriveBFS(fromModel) {
var graph = buildGraph();
var queue = [fromModel]; // unshift -> queue -> pop
graph[fromModel].distance = 0;
while (queue.length) {
var current = queue.pop();
var adjacents = Object.keys(conversions[current]);
for (var len = adjacents.length, i = 0; i < len; i++) {
var adjacent = adjacents[i];
var node = graph[adjacent];
if (node.distance === -1) {
node.distance = graph[current].distance + 1;
node.parent = current;
queue.unshift(adjacent);
}
}
}
return graph;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
deriveBFS
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function link(from, to) {
return function (args) {
return to(from(args));
};
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
link
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function wrapConversion(toModel, graph) {
var path = [graph[toModel].parent, toModel];
var fn = conversions[graph[toModel].parent][toModel];
var cur = graph[toModel].parent;
while (graph[cur].parent) {
path.unshift(graph[cur].parent);
fn = link(conversions[graph[cur].parent][cur], fn);
cur = graph[cur].parent;
}
fn.conversion = path;
return fn;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapConversion
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
route = function route(fromModel) {
var graph = deriveBFS(fromModel);
var conversion = {};
var models = Object.keys(graph);
for (var len = models.length, i = 0; i < len; i++) {
var toModel = models[i];
var node = graph[toModel];
if (node.parent === null) {
// no possible conversion, or this node is the source model.
continue;
}
conversion[toModel] = wrapConversion(toModel, graph);
}
return conversion;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
route
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function wrapRaw(fn) {
var wrappedFn = function wrappedFn(args) {
if (args === undefined || args === null) {
return args;
}
if (arguments.length > 1) {
args = Array.prototype.slice.call(arguments);
}
return fn(args);
}; // preserve .conversion property if there is one
if ('conversion' in fn) {
wrappedFn.conversion = fn.conversion;
}
return wrappedFn;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapRaw
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrappedFn = function wrappedFn(args) {
if (args === undefined || args === null) {
return args;
}
if (arguments.length > 1) {
args = Array.prototype.slice.call(arguments);
}
return fn(args);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrappedFn
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function wrapRounded(fn) {
var wrappedFn = function wrappedFn(args) {
if (args === undefined || args === null) {
return args;
}
if (arguments.length > 1) {
args = Array.prototype.slice.call(arguments);
}
var result = fn(args); // we're assuming the result is an array here.
// see notice in conversions.js; don't use box types
// in conversion functions.
if (typeof result === 'object') {
for (var len = result.length, i = 0; i < len; i++) {
result[i] = Math.round(result[i]);
}
}
return result;
}; // preserve .conversion property if there is one
if ('conversion' in fn) {
wrappedFn.conversion = fn.conversion;
}
return wrappedFn;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapRounded
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrappedFn = function wrappedFn(args) {
if (args === undefined || args === null) {
return args;
}
if (arguments.length > 1) {
args = Array.prototype.slice.call(arguments);
}
var result = fn(args); // we're assuming the result is an array here.
// see notice in conversions.js; don't use box types
// in conversion functions.
if (typeof result === 'object') {
for (var len = result.length, i = 0; i < len; i++) {
result[i] = Math.round(result[i]);
}
}
return result;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrappedFn
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrapAnsi16 = (fn, offset) => function () {
const code = fn.apply(colorConvert, arguments);
return "\x1B[".concat(code + offset, "m");
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapAnsi16
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrapAnsi16 = (fn, offset) => function () {
const code = fn.apply(colorConvert, arguments);
return "\x1B[".concat(code + offset, "m");
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapAnsi16
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrapAnsi256 = (fn, offset) => function () {
const code = fn.apply(colorConvert, arguments);
return "\x1B[".concat(38 + offset, ";5;").concat(code, "m");
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapAnsi256
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrapAnsi256 = (fn, offset) => function () {
const code = fn.apply(colorConvert, arguments);
return "\x1B[".concat(38 + offset, ";5;").concat(code, "m");
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapAnsi256
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrapAnsi16m = (fn, offset) => function () {
const rgb = fn.apply(colorConvert, arguments);
return "\x1B[".concat(38 + offset, ";2;").concat(rgb[0], ";").concat(rgb[1], ";").concat(rgb[2], "m");
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapAnsi16m
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
wrapAnsi16m = (fn, offset) => function () {
const rgb = fn.apply(colorConvert, arguments);
return "\x1B[".concat(38 + offset, ";2;").concat(rgb[0], ";").concat(rgb[1], ";").concat(rgb[2], "m");
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
wrapAnsi16m
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function assembleStyles() {
const codes = new Map();
const styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
// Bright color
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
}; // Fix humans
styles.color.grey = styles.color.gray;
for (const groupName of Object.keys(styles)) {
const group = styles[groupName];
for (const styleName of Object.keys(group)) {
const style = group[styleName];
styles[styleName] = {
open: "\x1B[".concat(style[0], "m"),
close: "\x1B[".concat(style[1], "m")
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
Object.defineProperty(styles, 'codes', {
value: codes,
enumerable: false
});
}
const ansi2ansi = n => n;
const rgb2rgb = (r, g, b) => [r, g, b];
styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m';
styles.color.ansi = {
ansi: wrapAnsi16(ansi2ansi, 0)
};
styles.color.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 0)
};
styles.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
styles.bgColor.ansi = {
ansi: wrapAnsi16(ansi2ansi, 10)
};
styles.bgColor.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 10)
};
styles.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
for (let key of Object.keys(colorConvert)) {
if (typeof colorConvert[key] !== 'object') {
continue;
}
const suite = colorConvert[key];
if (key === 'ansi16') {
key = 'ansi';
}
if ('ansi16' in suite) {
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
}
if ('ansi256' in suite) {
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
}
if ('rgb' in suite) {
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
}
}
return styles;
} // Make the export immutable
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
assembleStyles
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
hasFlag = (flag, argv) => {
argv = argv || process.argv;
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
const pos = argv.indexOf(prefix + flag);
const terminatorPos = argv.indexOf('--');
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
hasFlag
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function translateLevel(level) {
if (level === 0) {
return false;
}
return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
translateLevel
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function supportsColor(stream) {
if (forceColor === false) {
return 0;
}
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
return 3;
}
if (hasFlag('color=256')) {
return 2;
}
if (stream && !stream.isTTY && forceColor !== true) {
return 0;
}
const min = forceColor ? 1 : 0;
if (process.platform === 'win32') {
// Node.js 7.5.0 is the first version of Node.js to include a patch to
// libuv that enables 256 color output on Windows. Anything earlier and it
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
// release that supports 256 colors. Windows 10 build 14931 is the first release
// that supports 16m/TrueColor.
const osRelease = require$$0$1.release().split('.');
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ('CI' in env$1) {
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env$1) || env$1.CI_NAME === 'codeship') {
return 1;
}
return min;
}
if ('TEAMCITY_VERSION' in env$1) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
}
if (env$1.COLORTERM === 'truecolor') {
return 3;
}
if ('TERM_PROGRAM' in env$1) {
const version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
switch (env$1.TERM_PROGRAM) {
case 'iTerm.app':
return version >= 3 ? 3 : 2;
case 'Apple_Terminal':
return 2;
// No default
}
}
if (/-256(color)?$/i.test(env$1.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) {
return 1;
}
if ('COLORTERM' in env$1) {
return 1;
}
if (env$1.TERM === 'dumb') {
return min;
}
return min;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
supportsColor
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function getSupportLevel(stream) {
const level = supportsColor(stream);
return translateLevel(level);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
getSupportLevel
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function unescape(c) {
if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) {
return String.fromCharCode(parseInt(c.slice(1), 16));
}
return ESCAPES.get(c) || c;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
unescape
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function parseArguments(name, args) {
const results = [];
const chunks = args.trim().split(/\s*,\s*/g);
let matches;
for (const chunk of chunks) {
if (!isNaN(chunk)) {
results.push(Number(chunk));
} else if (matches = chunk.match(STRING_REGEX)) {
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
} else {
throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')"));
}
}
return results;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
parseArguments
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function parseStyle(style) {
STYLE_REGEX.lastIndex = 0;
const results = [];
let matches;
while ((matches = STYLE_REGEX.exec(style)) !== null) {
const name = matches[1];
if (matches[2]) {
const args = parseArguments(name, matches[2]);
results.push([name].concat(args));
} else {
results.push([name]);
}
}
return results;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
parseStyle
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function buildStyle(chalk, styles) {
const enabled = {};
for (const layer of styles) {
for (const style of layer.styles) {
enabled[style[0]] = layer.inverse ? null : style.slice(1);
}
}
let current = chalk;
for (const styleName of Object.keys(enabled)) {
if (Array.isArray(enabled[styleName])) {
if (!(styleName in current)) {
throw new Error("Unknown Chalk style: ".concat(styleName));
}
if (enabled[styleName].length > 0) {
current = current[styleName].apply(current, enabled[styleName]);
} else {
current = current[styleName];
}
}
}
return current;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
buildStyle
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
templates = (chalk, tmp) => {
const styles = [];
const chunks = [];
let chunk = []; // eslint-disable-next-line max-params
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
if (escapeChar) {
chunk.push(unescape(escapeChar));
} else if (style) {
const str = chunk.join('');
chunk = [];
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
styles.push({
inverse,
styles: parseStyle(style)
});
} else if (close) {
if (styles.length === 0) {
throw new Error('Found extraneous } in Chalk template literal');
}
chunks.push(buildStyle(chalk, styles)(chunk.join('')));
chunk = [];
styles.pop();
} else {
chunk.push(chr);
}
});
chunks.push(chunk.join(''));
if (styles.length > 0) {
const errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)");
throw new Error(errMsg);
}
return chunks.join('');
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
templates
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function applyOptions(obj, options) {
options = options || {}; // Detect level if not set manually
const scLevel = stdoutColor ? stdoutColor.level : 0;
obj.level = options.level === undefined ? scLevel : options.level;
obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
applyOptions
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function Chalk(options) {
// We check for this.template here since calling `chalk.constructor()`
// by itself will have a `this` of a previously constructed chalk object
if (!this || !(this instanceof Chalk) || this.template) {
const chalk = {};
applyOptions(chalk, options);
chalk.template = function () {
const args = [].slice.call(arguments);
return chalkTag.apply(null, [chalk.template].concat(args));
};
Object.setPrototypeOf(chalk, Chalk.prototype);
Object.setPrototypeOf(chalk.template, chalk);
chalk.template.constructor = Chalk;
return chalk.template;
}
applyOptions(this, options);
} // Use bright blue on Windows as the normal blue color is illegible
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
Chalk
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
get() {
const codes = ansiStyles[key];
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
get
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
get() {
return build.call(this, this._styles || [], true, 'visible');
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
get
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
get() {
const level = this.level;
return function () {
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
const codes = {
open,
close: ansiStyles.color.close,
closeRe: ansiStyles.color.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
get
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
get() {
const level = this.level;
return function () {
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
const codes = {
open,
close: ansiStyles.bgColor.close,
closeRe: ansiStyles.bgColor.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
get
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function build(_styles, _empty, key) {
const builder = function builder() {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
builder._empty = _empty;
const self = this;
Object.defineProperty(builder, 'level', {
enumerable: true,
get() {
return self.level;
},
set(level) {
self.level = level;
}
});
Object.defineProperty(builder, 'enabled', {
enumerable: true,
get() {
return self.enabled;
},
set(enabled) {
self.enabled = enabled;
}
}); // See below for fix regarding invisible grey/dim combination on Windows
builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; // `__proto__` is used because we must return a function, but there is
// no way to create a function with a different prototype
builder.__proto__ = proto; // eslint-disable-line no-proto
return builder;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
build
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
builder = function builder() {
return applyStyle.apply(builder, arguments);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
builder
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
builder = function builder() {
return applyStyle.apply(builder, arguments);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
builder
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
get() {
return self.level;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
get
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
set(level) {
self.level = level;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
set
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
get() {
return self.enabled;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
get
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
set(enabled) {
self.enabled = enabled;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
set
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function applyStyle() {
// Support varags, but simply cast to string in case there's only one arg
const args = arguments;
const argsLen = args.length;
let str = String(arguments[0]);
if (argsLen === 0) {
return '';
}
if (argsLen > 1) {
// Don't slice `arguments`, it prevents V8 optimizations
for (let a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!this.enabled || this.level <= 0 || !str) {
return this._empty ? '' : str;
} // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
const originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && this.hasGrey) {
ansiStyles.dim.open = '';
}
for (const code of this._styles.slice().reverse()) {
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close; // Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on macOS
// https://github.com/chalk/chalk/pull/92
str = str.replace(/\r?\n/g, "".concat(code.close, "$&").concat(code.open));
} // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
ansiStyles.dim.open = originalDim;
return str;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
applyStyle
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function chalkTag(chalk, strings) {
if (!Array.isArray(strings)) {
// If chalk() was called by itself or with a string,
// return the string itself as a string.
return [].slice.call(arguments, 1).join(' ');
}
const args = [].slice.call(arguments, 2);
const parts = [strings.raw[0]];
for (let i = 1; i < strings.length; i++) {
parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
parts.push(String(strings.raw[i]));
}
return templates(chalk, parts.join(''));
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
chalkTag
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
leven = function leven(a, b) {
if (a === b) {
return 0;
}
var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the
// shortest & which one is the longest
if (a.length > b.length) {
a = b;
b = swap;
}
var aLen = a.length;
var bLen = b.length;
if (aLen === 0) {
return bLen;
}
if (bLen === 0) {
return aLen;
} // Performing suffix trimming:
// We can linearly drop suffix common to both strings since they
// don't increase distance at all
// Note: `~-` is the bitwise way to perform a `- 1` operation
while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) {
aLen--;
bLen--;
}
if (aLen === 0) {
return bLen;
} // Performing prefix trimming
// We can linearly drop prefix common to both strings since they
// don't increase distance at all
var start = 0;
while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) {
start++;
}
aLen -= start;
bLen -= start;
if (aLen === 0) {
return bLen;
}
var bCharCode;
var ret;
var tmp;
var tmp2;
var i = 0;
var j = 0;
while (i < aLen) {
charCodeCache[start + i] = a.charCodeAt(start + i);
arr[i] = ++i;
}
while (j < bLen) {
bCharCode = b.charCodeAt(start + j);
tmp = j++;
ret = j;
for (i = 0; i < aLen; i++) {
tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1;
tmp = arr[i];
ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2;
}
}
return ret;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
leven
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function createSchema(SchemaConstructor, parameters) {
const schema = new SchemaConstructor(parameters);
const subSchema = Object.create(schema);
for (const handlerKey of HANDLER_KEYS) {
if (handlerKey in parameters) {
subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length);
}
}
return subSchema;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
createSchema
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
constructor(parameters) {
this.name = parameters.name;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
constructor
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
static create(parameters) {
// @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863
return createSchema(this, parameters);
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
create
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
default(_utils) {
return undefined;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
default
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
expected(_utils) {
return 'nothing';
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
expected
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
validate(_value, _utils) {
return false;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
validate
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
deprecated(_value, _utils) {
return false;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
deprecated
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
forward(_value, _utils) {
return undefined;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
forward
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
redirect(_value, _utils) {
return undefined;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
redirect
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
overlap(currentValue, _newValue, _utils) {
return currentValue;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
overlap
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
preprocess(value, _utils) {
return value;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
preprocess
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
postprocess(value, _utils) {
return value;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
postprocess
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
function normalizeHandler(handler, superSchema, handlerArgumentsLength) {
return typeof handler === 'function' ? (...args) => handler(...args.slice(0, handlerArgumentsLength - 1), superSchema, ...args.slice(handlerArgumentsLength - 1)) : () => handler;
}
|
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
normalizeHandler
|
javascript
|
douyu/juno
|
assets/public/js/prettier/v2.0.5/standalone.js
|
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/standalone.js
|
Apache-2.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.