@koishijs/utils
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -318,3 +318,3 @@ var __defProp = Object.defineProperty; | ||
// packages/utils/src/misc.ts | ||
import { isNullable } from "schemastery"; | ||
import Schema, { isNullable } from "schemastery"; | ||
import { isNullable as isNullable2, isPlainObject, valueMap, clone } from "schemastery"; | ||
@@ -785,27 +785,7 @@ function noop() { | ||
__name(format, "format"); | ||
function quote(content) { | ||
return get("basic.left-quote") + content + get("basic.right-quote"); | ||
} | ||
template2.quote = quote; | ||
__name(quote, "quote"); | ||
function brace(items) { | ||
if (!items.length) | ||
return ""; | ||
return get("basic.left-brace") + items.join(get("basic.comma")) + get("basic.right-brace"); | ||
} | ||
template2.brace = brace; | ||
__name(brace, "brace"); | ||
})(template || (template = {})); | ||
template.set("basic", { | ||
"left-brace": "(", | ||
"right-brace": ")", | ||
"left-quote": "“", | ||
"right-quote": "”", | ||
"comma": ",", | ||
"and": "和", | ||
"or": "或" | ||
}); | ||
export { | ||
Logger, | ||
Random, | ||
Schema, | ||
Time, | ||
@@ -812,0 +792,0 @@ assertProperty, |
@@ -0,2 +1,4 @@ | ||
import Schema from 'schemastery'; | ||
import segment from '@koishijs/segment'; | ||
export { Schema }; | ||
export { isNullable, isPlainObject, valueMap, clone } from 'schemastery'; | ||
@@ -171,2 +173,3 @@ export function noop(): any; | ||
export function sanitize(source: string): string; | ||
/** @deprecated use template service instead */ | ||
export function template(path: string | string[], ...params: any[]): string; | ||
@@ -181,4 +184,2 @@ export namespace template { | ||
function format(source: string, ...params: any[]): string; | ||
function quote(content: any): string; | ||
function brace(items: any[]): string; | ||
} | ||
@@ -185,0 +186,0 @@ export { template as t }; |
@@ -44,2 +44,3 @@ var __create = Object.create; | ||
Random: () => Random, | ||
Schema: () => import_schemastery.default, | ||
Time: () => Time, | ||
@@ -901,24 +902,3 @@ assertProperty: () => assertProperty, | ||
__name(format2, "format"); | ||
function quote(content) { | ||
return get("basic.left-quote") + content + get("basic.right-quote"); | ||
} | ||
template2.quote = quote; | ||
__name(quote, "quote"); | ||
function brace(items) { | ||
if (!items.length) | ||
return ""; | ||
return get("basic.left-brace") + items.join(get("basic.comma")) + get("basic.right-brace"); | ||
} | ||
template2.brace = brace; | ||
__name(brace, "brace"); | ||
})(template || (template = {})); | ||
template.set("basic", { | ||
"left-brace": "(", | ||
"right-brace": ")", | ||
"left-quote": "“", | ||
"right-quote": "”", | ||
"comma": ",", | ||
"and": "和", | ||
"or": "或" | ||
}); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -928,2 +908,3 @@ 0 && (module.exports = { | ||
Random, | ||
Schema, | ||
Time, | ||
@@ -930,0 +911,0 @@ assertProperty, |
{ | ||
"name": "@koishijs/utils", | ||
"description": "Utilities for Koishi", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"main": "lib/node.js", | ||
@@ -33,4 +33,5 @@ "module": "lib/browser.js", | ||
"@koishijs/segment": "^1.1.1", | ||
"supports-color": "^8.1.0" | ||
"schemastery": "^3.1.1", | ||
"supports-color": "^8.1.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
145200
3
2014
+ Addedschemastery@^3.1.1
+ Addedcosmokit@1.7.2(transitive)
+ Addedschemastery@3.16.0(transitive)
Updatedsupports-color@^8.1.1