build
This commit is contained in:
parent
698f4f22e4
commit
44149b70a1
3
lib/index.d.ts
vendored
3
lib/index.d.ts
vendored
|
|
@ -1,3 +1,4 @@
|
|||
import { withRecord, assignRecords, RecordClearMode } from "./commons/record-util";
|
||||
import { stringTokenizer, equalsIgnoreCase, includeIgnoreCase } from "./commons/str-utils";
|
||||
export { stringTokenizer, withRecord, equalsIgnoreCase, includeIgnoreCase, assignRecords, RecordClearMode };
|
||||
import { getFileExt, getFileName } from "./commons/file-util";
|
||||
export { stringTokenizer, withRecord, equalsIgnoreCase, includeIgnoreCase, assignRecords, RecordClearMode, getFileExt, getFileName, };
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
var c = /* @__PURE__ */ ((e) => (e[e.delete = 2] = "delete", e[e.reset = 1] = "reset", e))(c || {});
|
||||
const g = (e) => ({
|
||||
var h = /* @__PURE__ */ ((e) => (e[e.delete = 2] = "delete", e[e.reset = 1] = "reset", e))(h || {});
|
||||
const a = (e) => ({
|
||||
clear: function(t = 2) {
|
||||
t === 1 ? Object.keys(e).forEach((n) => {
|
||||
e[n] = void 0;
|
||||
|
|
@ -14,7 +14,7 @@ const g = (e) => ({
|
|||
), Object.assign(e, t);
|
||||
}
|
||||
});
|
||||
function p(...e) {
|
||||
function x(...e) {
|
||||
let t = e ?? [];
|
||||
return {
|
||||
test: function(n) {
|
||||
|
|
@ -32,35 +32,45 @@ function p(...e) {
|
|||
}
|
||||
};
|
||||
}
|
||||
function y(e, t, n) {
|
||||
function d(e, t, n) {
|
||||
const i = t, s = n || t;
|
||||
return function(r) {
|
||||
const u = [], l = r.matchAll(e);
|
||||
const u = [], o = r.matchAll(e);
|
||||
let f = 0;
|
||||
for (const o of l) {
|
||||
const h = r.slice(f, o.index);
|
||||
h && u.push(s(h, !1)), u.push(i(o[0], !0)), f = o.index + o[0].length;
|
||||
for (const l of o) {
|
||||
const c = r.slice(f, l.index);
|
||||
c && u.push(s(c, !1)), u.push(i(l[0], !0)), f = l.index + l[0].length;
|
||||
}
|
||||
return f < r.length && u.push(s(r.slice(f), !1)), u;
|
||||
};
|
||||
}
|
||||
function a(e, t) {
|
||||
function g(e, t) {
|
||||
return typeof e == "string" && typeof t == "string" ? e.toLowerCase() === t.toLowerCase() : e === void 0 && t === void 0;
|
||||
}
|
||||
const m = (e, t) => {
|
||||
const p = (e, t) => {
|
||||
for (let n = 0; n < e.length; n++) {
|
||||
let i = e[n];
|
||||
if (a(i, t))
|
||||
if (g(i, t))
|
||||
return !0;
|
||||
}
|
||||
return !1;
|
||||
};
|
||||
function y(e) {
|
||||
const t = e.lastIndexOf(".");
|
||||
return t === -1 ? "" : e.substring(t + 1);
|
||||
}
|
||||
function O(e) {
|
||||
let t = e.lastIndexOf("/");
|
||||
return t === -1 && (t = e.lastIndexOf("\\"), t === -1) ? e : e.substring(t + 1);
|
||||
}
|
||||
export {
|
||||
c as RecordClearMode,
|
||||
p as assignRecords,
|
||||
a as equalsIgnoreCase,
|
||||
m as includeIgnoreCase,
|
||||
y as stringTokenizer,
|
||||
g as withRecord
|
||||
h as RecordClearMode,
|
||||
x as assignRecords,
|
||||
g as equalsIgnoreCase,
|
||||
y as getFileExt,
|
||||
O as getFileName,
|
||||
p as includeIgnoreCase,
|
||||
d as stringTokenizer,
|
||||
a as withRecord
|
||||
};
|
||||
//# sourceMappingURL=index.es.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
(function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r["ez-common-ts"]={}))})(this,function(r){"use strict";var o=(e=>(e[e.delete=2]="delete",e[e.reset=1]="reset",e))(o||{});const g=e=>({clear:function(n=2){n===1?Object.keys(e).forEach(t=>{e[t]=void 0}):n===2&&Object.keys(e).forEach(t=>{delete e[t]})},replace:function(n){this.clear(2),Object.assign(e,n)}});function m(...e){let n=e??[];return{test:function(t){if(n.length<=1)return n.length===1?n[0]:[];let u=t??function(s,i){return s===i};return n.reduce((s,i)=>(i&&i.length>0&&(s.length===0?s.push(...i):i.forEach(f=>{s.some(l=>u(l,f))||s.push(f)})),s),[])},path:function(...t){return this.test((u,s)=>t.every(i=>u[i]===s[i]))}}}function p(e,n,t){const u=n,s=t||n;return function(i){const f=[],a=i.matchAll(e);let l=0;for(const c of a){const d=i.slice(l,c.index);d&&f.push(s(d,!1)),f.push(u(c[0],!0)),l=c.index+c[0].length}return l<i.length&&f.push(s(i.slice(l),!1)),f}}function h(e,n){return typeof e=="string"&&typeof n=="string"?e.toLowerCase()===n.toLowerCase():e===void 0&&n===void 0}const y=(e,n)=>{for(let t=0;t<e.length;t++){let u=e[t];if(h(u,n))return!0}return!1};r.RecordClearMode=o,r.assignRecords=m,r.equalsIgnoreCase=h,r.includeIgnoreCase=y,r.stringTokenizer=p,r.withRecord=g,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
||||
(function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r["ez-common-ts"]={}))})(this,function(r){"use strict";var o=(e=>(e[e.delete=2]="delete",e[e.reset=1]="reset",e))(o||{});const a=e=>({clear:function(n=2){n===1?Object.keys(e).forEach(t=>{e[t]=void 0}):n===2&&Object.keys(e).forEach(t=>{delete e[t]})},replace:function(n){this.clear(2),Object.assign(e,n)}});function m(...e){let n=e??[];return{test:function(t){if(n.length<=1)return n.length===1?n[0]:[];let u=t??function(s,i){return s===i};return n.reduce((s,i)=>(i&&i.length>0&&(s.length===0?s.push(...i):i.forEach(f=>{s.some(l=>u(l,f))||s.push(f)})),s),[])},path:function(...t){return this.test((u,s)=>t.every(i=>u[i]===s[i]))}}}function y(e,n,t){const u=n,s=t||n;return function(i){const f=[],g=i.matchAll(e);let l=0;for(const c of g){const h=i.slice(l,c.index);h&&f.push(s(h,!1)),f.push(u(c[0],!0)),l=c.index+c[0].length}return l<i.length&&f.push(s(i.slice(l),!1)),f}}function d(e,n){return typeof e=="string"&&typeof n=="string"?e.toLowerCase()===n.toLowerCase():e===void 0&&n===void 0}const I=(e,n)=>{for(let t=0;t<e.length;t++){let u=e[t];if(d(u,n))return!0}return!1};function O(e){const n=e.lastIndexOf(".");return n===-1?"":e.substring(n+1)}function v(e){let n=e.lastIndexOf("/");return n===-1&&(n=e.lastIndexOf("\\"),n===-1)?e:e.substring(n+1)}r.RecordClearMode=o,r.assignRecords=m,r.equalsIgnoreCase=d,r.getFileExt=O,r.getFileName=v,r.includeIgnoreCase=I,r.stringTokenizer=y,r.withRecord=a,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
||||
//# sourceMappingURL=index.umd.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -9,6 +9,7 @@
|
|||
"types": "./lib/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc && vite build",
|
||||
"push": "tsc && vite build && git commit -am \"build\" && git push",
|
||||
"test": "vitest"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
24
src/index.ts
24
src/index.ts
|
|
@ -1,4 +1,22 @@
|
|||
import { withRecord, assignRecords, RecordClearMode } from "./commons/record-util";
|
||||
import { stringTokenizer, equalsIgnoreCase, includeIgnoreCase } from "./commons/str-utils";
|
||||
import {
|
||||
withRecord,
|
||||
assignRecords,
|
||||
RecordClearMode,
|
||||
} from "./commons/record-util";
|
||||
import {
|
||||
stringTokenizer,
|
||||
equalsIgnoreCase,
|
||||
includeIgnoreCase,
|
||||
} from "./commons/str-utils";
|
||||
import { getFileExt, getFileName } from "./commons/file-util";
|
||||
|
||||
export { stringTokenizer, withRecord, equalsIgnoreCase, includeIgnoreCase, assignRecords, RecordClearMode };
|
||||
export {
|
||||
stringTokenizer,
|
||||
withRecord,
|
||||
equalsIgnoreCase,
|
||||
includeIgnoreCase,
|
||||
assignRecords,
|
||||
RecordClearMode,
|
||||
getFileExt,
|
||||
getFileName,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user