inferred-types 0.45.2 → 0.45.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inferred-types/index.cjs +73 -65
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/literals/index.d.ts +1 -0
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +1 -0
- package/dist/runtime/literals/retainAfter.d.ts +1 -1
- package/dist/runtime/literals/retainAfter.js +1 -1
- package/dist/runtime/literals/retainWhile.d.ts +1 -2
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -1
- package/dist/runtime/literals/retainWhile.js +2 -1
- package/dist/runtime/literals/stripUntil.d.ts +9 -0
- package/dist/runtime/literals/stripUntil.d.ts.map +1 -0
- package/dist/runtime/literals/stripUntil.js +12 -0
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -269,6 +269,7 @@ __export(inferred_types_exports, {
|
|
|
269
269
|
stripChars: () => stripChars,
|
|
270
270
|
stripLeading: () => stripLeading,
|
|
271
271
|
stripTrailing: () => stripTrailing,
|
|
272
|
+
stripUntil: () => stripUntil,
|
|
272
273
|
surround: () => surround,
|
|
273
274
|
takeNumericCharacters: () => takeNumericCharacters,
|
|
274
275
|
takeProp: () => takeProp,
|
|
@@ -1886,71 +1887,6 @@ function stripBefore(content, find2) {
|
|
|
1886
1887
|
return content.split(find2).slice(1).join(find2);
|
|
1887
1888
|
}
|
|
1888
1889
|
|
|
1889
|
-
// dist/runtime/literals/trim.js
|
|
1890
|
-
function trim(input) {
|
|
1891
|
-
return input.trim();
|
|
1892
|
-
}
|
|
1893
|
-
function trimLeft(input) {
|
|
1894
|
-
return input.trimStart();
|
|
1895
|
-
}
|
|
1896
|
-
function trimStart(input) {
|
|
1897
|
-
return input.trimStart();
|
|
1898
|
-
}
|
|
1899
|
-
function trimRight(input) {
|
|
1900
|
-
return input.trimEnd();
|
|
1901
|
-
}
|
|
1902
|
-
function trimEnd(input) {
|
|
1903
|
-
return input.trimEnd();
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
// dist/runtime/literals/toPascalCase.js
|
|
1907
|
-
function toPascalCase(input, preserveWhitespace = void 0) {
|
|
1908
|
-
const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
|
|
1909
|
-
const convertInteriorToCap = (i) => i.replace(/[ |_|-]+([0-9]*?[a-z|A-Z]{1})/gs, (_2, p1) => p1.toUpperCase());
|
|
1910
|
-
const startingToCap = (i) => i.replace(/^[_|-]*?([0-9]*?[a-z]{1})/gs, (_2, p1) => p1.toUpperCase());
|
|
1911
|
-
const replaceLeadingTrash = (i) => i.replace(/^[-_]/s, "");
|
|
1912
|
-
const replaceTrailingTrash = (i) => i.replace(/[-_]$/s, "");
|
|
1913
|
-
const pascal = `${preserveWhitespace ? preWhite : ""}${capitalize(replaceTrailingTrash(replaceLeadingTrash(convertInteriorToCap(startingToCap(focus)))))}${preserveWhitespace ? postWhite : ""}`;
|
|
1914
|
-
return pascal;
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
// dist/runtime/literals/toUppercase.js
|
|
1918
|
-
function toUppercase(str) {
|
|
1919
|
-
return str.split("").map((i) => ifLowercaseChar(i, (v) => capitalize(v), (v) => v)).join("");
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
// dist/runtime/literals/toNumericArray.js
|
|
1923
|
-
var toNumericArray = (arr) => {
|
|
1924
|
-
return arr.map((i) => Number(i));
|
|
1925
|
-
};
|
|
1926
|
-
|
|
1927
|
-
// dist/runtime/literals/truncate.js
|
|
1928
|
-
var truncate = (content, maxLength, ellipsis = false) => {
|
|
1929
|
-
const overLimit = content.length > maxLength;
|
|
1930
|
-
return overLimit ? ellipsis ? `${content.slice(0, maxLength)}${typeof ellipsis === "string" ? ellipsis : "..."}` : content.slice(0, maxLength) : content;
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
// dist/runtime/literals/takeNumericCharacters.js
|
|
1934
|
-
var takeNumericCharacters = (content) => {
|
|
1935
|
-
let nonNumericIdx = asChars(content).findIndex((i) => !NUMERIC_CHAR.includes(i));
|
|
1936
|
-
return content.slice(0, nonNumericIdx);
|
|
1937
|
-
};
|
|
1938
|
-
|
|
1939
|
-
// dist/runtime/type-conversion/asChars.js
|
|
1940
|
-
var asChars = (str) => {
|
|
1941
|
-
return str.split("");
|
|
1942
|
-
};
|
|
1943
|
-
|
|
1944
|
-
// dist/runtime/literals/retainChars.js
|
|
1945
|
-
var retainChars = (content, ...retain2) => {
|
|
1946
|
-
return asChars(content).filter((c) => retain2.includes(c)).join("");
|
|
1947
|
-
};
|
|
1948
|
-
|
|
1949
|
-
// dist/runtime/literals/stripChars.js
|
|
1950
|
-
var stripChars = (content, ...strip) => {
|
|
1951
|
-
return asChars(content).filter((c) => !strip.includes(c)).join("");
|
|
1952
|
-
};
|
|
1953
|
-
|
|
1954
1890
|
// dist/runtime/type-conversion/mergeObjects.js
|
|
1955
1891
|
function mergeObjects(defVal, override) {
|
|
1956
1892
|
const intersectingKeys = sharedKeys(defVal, override);
|
|
@@ -2030,11 +1966,82 @@ var asString = (value) => {
|
|
|
2030
1966
|
return isString(value) ? value : isNumber(value) ? `${value}` : isBoolean(value) ? `${value}` : String(value);
|
|
2031
1967
|
};
|
|
2032
1968
|
|
|
1969
|
+
// dist/runtime/type-conversion/asChars.js
|
|
1970
|
+
var asChars = (str) => {
|
|
1971
|
+
return str.split("");
|
|
1972
|
+
};
|
|
1973
|
+
|
|
2033
1974
|
// dist/runtime/type-conversion/ip6GroupExpansion.js
|
|
2034
1975
|
var ip6GroupExpansion = (ip) => {
|
|
2035
1976
|
return stripTrailing(ip.replaceAll("::", ":0000:"), ":");
|
|
2036
1977
|
};
|
|
2037
1978
|
|
|
1979
|
+
// dist/runtime/literals/stripUntil.js
|
|
1980
|
+
var stripUntil = (content, ...until) => {
|
|
1981
|
+
const stopIdx = asChars(content).findIndex((c) => until.includes(c));
|
|
1982
|
+
return content.slice(stopIdx);
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1985
|
+
// dist/runtime/literals/trim.js
|
|
1986
|
+
function trim(input) {
|
|
1987
|
+
return input.trim();
|
|
1988
|
+
}
|
|
1989
|
+
function trimLeft(input) {
|
|
1990
|
+
return input.trimStart();
|
|
1991
|
+
}
|
|
1992
|
+
function trimStart(input) {
|
|
1993
|
+
return input.trimStart();
|
|
1994
|
+
}
|
|
1995
|
+
function trimRight(input) {
|
|
1996
|
+
return input.trimEnd();
|
|
1997
|
+
}
|
|
1998
|
+
function trimEnd(input) {
|
|
1999
|
+
return input.trimEnd();
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
// dist/runtime/literals/toPascalCase.js
|
|
2003
|
+
function toPascalCase(input, preserveWhitespace = void 0) {
|
|
2004
|
+
const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
|
|
2005
|
+
const convertInteriorToCap = (i) => i.replace(/[ |_|-]+([0-9]*?[a-z|A-Z]{1})/gs, (_2, p1) => p1.toUpperCase());
|
|
2006
|
+
const startingToCap = (i) => i.replace(/^[_|-]*?([0-9]*?[a-z]{1})/gs, (_2, p1) => p1.toUpperCase());
|
|
2007
|
+
const replaceLeadingTrash = (i) => i.replace(/^[-_]/s, "");
|
|
2008
|
+
const replaceTrailingTrash = (i) => i.replace(/[-_]$/s, "");
|
|
2009
|
+
const pascal = `${preserveWhitespace ? preWhite : ""}${capitalize(replaceTrailingTrash(replaceLeadingTrash(convertInteriorToCap(startingToCap(focus)))))}${preserveWhitespace ? postWhite : ""}`;
|
|
2010
|
+
return pascal;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
// dist/runtime/literals/toUppercase.js
|
|
2014
|
+
function toUppercase(str) {
|
|
2015
|
+
return str.split("").map((i) => ifLowercaseChar(i, (v) => capitalize(v), (v) => v)).join("");
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
// dist/runtime/literals/toNumericArray.js
|
|
2019
|
+
var toNumericArray = (arr) => {
|
|
2020
|
+
return arr.map((i) => Number(i));
|
|
2021
|
+
};
|
|
2022
|
+
|
|
2023
|
+
// dist/runtime/literals/truncate.js
|
|
2024
|
+
var truncate = (content, maxLength, ellipsis = false) => {
|
|
2025
|
+
const overLimit = content.length > maxLength;
|
|
2026
|
+
return overLimit ? ellipsis ? `${content.slice(0, maxLength)}${typeof ellipsis === "string" ? ellipsis : "..."}` : content.slice(0, maxLength) : content;
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
// dist/runtime/literals/takeNumericCharacters.js
|
|
2030
|
+
var takeNumericCharacters = (content) => {
|
|
2031
|
+
let nonNumericIdx = asChars(content).findIndex((i) => !NUMERIC_CHAR.includes(i));
|
|
2032
|
+
return content.slice(0, nonNumericIdx);
|
|
2033
|
+
};
|
|
2034
|
+
|
|
2035
|
+
// dist/runtime/literals/retainChars.js
|
|
2036
|
+
var retainChars = (content, ...retain2) => {
|
|
2037
|
+
return asChars(content).filter((c) => retain2.includes(c)).join("");
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
// dist/runtime/literals/stripChars.js
|
|
2041
|
+
var stripChars = (content, ...strip) => {
|
|
2042
|
+
return asChars(content).filter((c) => !strip.includes(c)).join("");
|
|
2043
|
+
};
|
|
2044
|
+
|
|
2038
2045
|
// dist/runtime/literals/retainWhile.js
|
|
2039
2046
|
var retainWhile = (content, ...retain2) => {
|
|
2040
2047
|
const stopIdx = asChars(content).findIndex((c) => !retain2.includes(c));
|
|
@@ -3196,6 +3203,7 @@ var asVueRef = (value) => ({
|
|
|
3196
3203
|
stripChars,
|
|
3197
3204
|
stripLeading,
|
|
3198
3205
|
stripTrailing,
|
|
3206
|
+
stripUntil,
|
|
3199
3207
|
surround,
|
|
3200
3208
|
takeNumericCharacters,
|
|
3201
3209
|
takeProp,
|