decocms 2.310.1 → 2.310.3
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/client/assets/{AlertCircle-BUuG9jUS.js → AlertCircle-B72APkrz.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-B2WgGuUG.js → ArrowNarrowLeft-Dz0P9WNF.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BRxJDyw2.js → ArrowUpRight-CCQZEQ7k.js} +1 -1
- package/dist/client/assets/{Check-DNFNSXQB.js → Check-CUpq9BBu.js} +1 -1
- package/dist/client/assets/{CheckCircle-fDjMIV_J.js → CheckCircle-DTCxFilU.js} +1 -1
- package/dist/client/assets/{ChevronDown-plDbvt9_.js → ChevronDown-D5WF5tyi.js} +1 -1
- package/dist/client/assets/{ChevronRight-C6IGuK_L.js → ChevronRight-DwbV0YDZ.js} +1 -1
- package/dist/client/assets/{ChevronUp-BQpSShtW.js → ChevronUp-CDMPc0ql.js} +1 -1
- package/dist/client/assets/{Container-cby1lpQK.js → Container-BioZd28q.js} +1 -1
- package/dist/client/assets/{DotsVertical-CrL41KCh.js → DotsVertical-D8wcDPCU.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DDjHJHtD.js → LinkExternal01-CKpEz_fF.js} +1 -1
- package/dist/client/assets/{Lock01-CMc8wMJA.js → Lock01-CHfwR6Qi.js} +1 -1
- package/dist/client/assets/{Palette-BsSq52os.js → Palette-brLBiHpP.js} +1 -1
- package/dist/client/assets/{Play-B93BJPTD.js → Play-DRCdZRLW.js} +1 -1
- package/dist/client/assets/{Plus-CsU0klMp.js → Plus-DNkjVBwq.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-GcJ7_jjW.js → RefreshCcw01-CdP9yH0w.js} +1 -1
- package/dist/client/assets/{SearchMd-CLV2ZHE1.js → SearchMd-JqX1mLMq.js} +1 -1
- package/dist/client/assets/{Settings02-CMQBJ6AU.js → Settings02-D1Jfvo1d.js} +1 -1
- package/dist/client/assets/{Shield01-Bb8uicnU.js → Shield01-D5fQpAyA.js} +1 -1
- package/dist/client/assets/{Star01-DOzaFb6_.js → Star01-Y834gtsL.js} +1 -1
- package/dist/client/assets/{Sun-Bp560G7u.js → Sun-BgOSswUu.js} +1 -1
- package/dist/client/assets/{Tool01-B1WXLPyp.js → Tool01-CXQZ3p7Z.js} +1 -1
- package/dist/client/assets/{Trash01-WbvRG8Rr.js → Trash01-B8-uqWxa.js} +1 -1
- package/dist/client/assets/{User01-Dqi_S_yw.js → User01-Cxb6YtJq.js} +1 -1
- package/dist/client/assets/{Users03-CmMFskSR.js → Users03-CXkopkPu.js} +1 -1
- package/dist/client/assets/{X-26aOhFK-.js → X-CdXDgTcN.js} +1 -1
- package/dist/client/assets/{XCircle-DuIm7Kpp.js → XCircle-CjR4LC4r.js} +1 -1
- package/dist/client/assets/{XClose-Bet7IpXN.js → XClose-zqTFiPq2.js} +1 -1
- package/dist/client/assets/{Zap-DHkXBm_R.js → Zap--FKeiDFf.js} +1 -1
- package/dist/client/assets/{ZapSquare-B0Ev1OMS.js → ZapSquare-CliIuzcs.js} +1 -1
- package/dist/client/assets/{accordion-D1MMgTV5.js → accordion-BBKL1fM-.js} +1 -1
- package/dist/client/assets/{agent-icon-BhSIvnHs.js → agent-icon-CaG-DX2m.js} +1 -1
- package/dist/client/assets/{agents-list-DfRZsmWN.js → agents-list-BUqQO9y3.js} +1 -1
- package/dist/client/assets/ai-providers-BvV5AI1b.js +1 -0
- package/dist/client/assets/{alert-dialog-Booud0bQ.js → alert-dialog-B-P8jHly.js} +1 -1
- package/dist/client/assets/{auth-catchall-CfLpBYfo.js → auth-catchall-CyIMPFaS.js} +1 -1
- package/dist/client/assets/{automation-list-row-3UbFqf20.js → automation-list-row-Qk3UXtKg.js} +1 -1
- package/dist/client/assets/{automations-Bpw-Bphr.js → automations-CkkIdwK3.js} +1 -1
- package/dist/client/assets/{avatar-Dr_hgnh5.js → avatar-CYyuZ3vB.js} +1 -1
- package/dist/client/assets/{badge-Dc_jqHv8.js → badge-C-R5WeFR.js} +1 -1
- package/dist/client/assets/{brand-context-DDkAkGby.js → brand-context-BqPn2XVA.js} +1 -1
- package/dist/client/assets/{card-I8QwhHay.js → card-BWjsP1pO.js} +1 -1
- package/dist/client/assets/{chat-context-DANvJNxJ.js → chat-context-D7DJNKEQ.js} +1 -1
- package/dist/client/assets/{checkbox-YDqzyyON.js → checkbox-DRyB8BVf.js} +1 -1
- package/dist/client/assets/{collection-detail-CEcX9P1L.js → collection-detail-BiG3-7wS.js} +1 -1
- package/dist/client/assets/{collection-display-button-CEbXTT1D.js → collection-display-button-D0yyhe94.js} +1 -1
- package/dist/client/assets/{collection-search-ZtrOS_FO.js → collection-search-BtC9EgTH.js} +1 -1
- package/dist/client/assets/{collection-search-54YVIzGK.js → collection-search-CVa4reVh.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CykRk2i4.js → collection-table-wrapper-C2Zi2ikn.js} +1 -1
- package/dist/client/assets/{collection-tabs-BJYdyh2U.js → collection-tabs-8bicuWoG.js} +1 -1
- package/dist/client/assets/{collections-B4Ew0_5W.js → collections-ZqRHYd6U.js} +1 -1
- package/dist/client/assets/{command-BUdSnxPX.js → command-BUJHwA-d.js} +1 -1
- package/dist/client/assets/{connection-card-CPkO4XVy.js → connection-card-CiNzXirJ.js} +1 -1
- package/dist/client/assets/{connection-detail-7MO-vamz.js → connection-detail-DQFCqOq5.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DTw0Qq7p.js → connection-form-helpers-BFnOvbFy.js} +1 -1
- package/dist/client/assets/{connections-Cae6WzSq.js → connections-BzqA2cUL.js} +1 -1
- package/dist/client/assets/{constants-8vN_wpoM.js → constants-BmLTAQzq.js} +1 -1
- package/dist/client/assets/{constants-C0Z_UV1B.js → constants-Df56C9B1.js} +1 -1
- package/dist/client/assets/{dialog-ChC8b-fd.js → dialog-HqMwvS0c.js} +1 -1
- package/dist/client/assets/{domain-settings-wSm6QNFe.js → domain-settings-8zUtZk7o.js} +1 -1
- package/dist/client/assets/{drawer-C1rmyAh5.js → drawer-hkToOxOG.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BYnm4L0S.js → dropdown-menu-CD1YJIi0.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-C8rDQhFA.js → dynamic-plugin-layout--sGvQXk2.js} +1 -1
- package/dist/client/assets/{empty-state-B5SEGNSf.js → empty-state-B29HN9Vl.js} +1 -1
- package/dist/client/assets/{empty-state-CS1xioMM.js → empty-state-CElAqeAn.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CnZlsGuF.js → extract-connection-data-DYXiFLZH.js} +1 -1
- package/dist/client/assets/{features-B16s5Y96.js → features-Dvru3uGD.js} +1 -1
- package/dist/client/assets/{form-DgLK3RL7.js → form-CKajJk24.js} +1 -1
- package/dist/client/assets/{general-f6TAIn-G.js → general-D8u2dVV2.js} +1 -1
- package/dist/client/assets/{index-fsAFWsFR.js → index--52kuhAD.js} +1 -1
- package/dist/client/assets/{index-DsyVbeAM.js → index-BPbckF-i.js} +3 -3
- package/dist/client/assets/{index-CbahmBQ1.js → index-BPgW_PVH.js} +1 -1
- package/dist/client/assets/index-BTded5vd.js +1 -0
- package/dist/client/assets/{index-CgQIf70g.js → index-Boo37gVZ.js} +1 -1
- package/dist/client/assets/{index-CGzddOPN.js → index-CHpjwsZ-.js} +1 -1
- package/dist/client/assets/{index-TdWHe30j.js → index-CMbhqARA.js} +1 -1
- package/dist/client/assets/{index-BtR3GFsv.js → index-CO402MfB.js} +1 -1
- package/dist/client/assets/{index-C5EaiV0u.js → index-CgQG3OxM.js} +1 -1
- package/dist/client/assets/{index-DlX-BDoo.js → index-ClxNnAsp.js} +1 -1
- package/dist/client/assets/{index-CVMf-cdp.js → index-CnR4TnGO.js} +1 -1
- package/dist/client/assets/{index-D3id_i25.js → index-D7rGFiVq.js} +1 -1
- package/dist/client/assets/{index-BrFuw-qb.js → index-D9-ppQFz.js} +1 -1
- package/dist/client/assets/{index-ofAY-Kzj.js → index-DVk4aJ0j.js} +1 -1
- package/dist/client/assets/{index-DCa8vMMj.js → index-Y4klGMPr.js} +1 -1
- package/dist/client/assets/{index--hcGoWBP.js → index-k8njt3_A.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-Bw_LLK9Y.js → infiniteQueryObserver-IG8f9wWg.js} +1 -1
- package/dist/client/assets/{input-Di5VhXrx.js → input-DrFzs1Yw.js} +1 -1
- package/dist/client/assets/{integration-icon-BFclX5Vo.js → integration-icon-DUMCOZJc.js} +1 -1
- package/dist/client/assets/{label--CSWWgsb.js → label-0J4Z8Ji8.js} +1 -1
- package/dist/client/assets/{layout-DGzZ7eIZ.js → layout-zbF9c9kI.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-BRNt7FNZ.js → lean-canvas-recruit-modal-D2QgFiqW.js} +1 -1
- package/dist/client/assets/{login-CWxs7FH8.js → login-m1plet6k.js} +1 -1
- package/dist/client/assets/{members-D-RcZScv.js → members-DsVQeYYP.js} +1 -1
- package/dist/client/assets/{monaco-editor-BRZw2Ss_.js → monaco-editor-Br1M5lwR.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BELQHcMp.js → monitoring-stats-row-BtBHpMXc.js} +1 -1
- package/dist/client/assets/{oauth-callback-D1mU79r6.js → oauth-callback-D6DOFeyW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BI3N0zYC.js → oauth-callback-ai-provider-wUhwntlH.js} +1 -1
- package/dist/client/assets/{onboarding-Corplh-J.js → onboarding-dml5YruP.js} +1 -1
- package/dist/client/assets/{org-layout-Dw015CRn.js → org-layout-QSP-N9k0.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BhY_p3Sb.js → org-plugin-layout-ZONr0rlX.js} +1 -1
- package/dist/client/assets/{pair-BkQ-4R0Y.js → pair-mf97TAS_.js} +2 -2
- package/dist/client/assets/{plugin-empty-state-Daxzikof.js → plugin-empty-state-CFxEUNdF.js} +1 -1
- package/dist/client/assets/{plugin-header-DxSn3bJb.js → plugin-header-HXnwUdYS.js} +1 -1
- package/dist/client/assets/{plugin-layout-CLDR8aeJ.js → plugin-layout-ZwMLw5wK.js} +1 -1
- package/dist/client/assets/{popover-BxTvqO7l.js → popover-DUMNq33j.js} +1 -1
- package/dist/client/assets/{profile-CiaA4yp_.js → profile-CyqjRQfg.js} +1 -1
- package/dist/client/assets/{project-app-view-C9qLbJFL.js → project-app-view-Di4yF5Oz.js} +1 -1
- package/dist/client/assets/registry-DgOCTdY8.js +2 -0
- package/dist/client/assets/{registry-layout-DUo-P35f.js → registry-layout-B2U_9fgO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BnqlPeG9.js → required-auth-layout-PH0-_blQ.js} +1 -1
- package/dist/client/assets/{reset-password-DHzLCFSu.js → reset-password-5ioWEbN5.js} +1 -1
- package/dist/client/assets/{roles-qTMcTl_m.js → roles-4ojRgHgc.js} +1 -1
- package/dist/client/assets/{scroll-area-VgUNFi6v.js → scroll-area-D_tsHfC-.js} +1 -1
- package/dist/client/assets/{search-input-Fm6Uugnb.js → search-input-Boj5tfQn.js} +1 -1
- package/dist/client/assets/{select-4BiO-1He.js → select-B3lWwv9y.js} +1 -1
- package/dist/client/assets/{select-model-DbFtB1R4.js → select-model-C-fLwr4k.js} +1 -1
- package/dist/client/assets/{settings-layout-B4AxAY74.js → settings-layout-U-ZhWkRq.js} +1 -1
- package/dist/client/assets/{settings-section-BqQHUry6.js → settings-section-qufbNRCL.js} +1 -1
- package/dist/client/assets/{shell-layout-CcLP72E6.js → shell-layout-G8D-0WXl.js} +1 -1
- package/dist/client/assets/{skeleton-D_v3jh_x.js → skeleton-BfKJMKYc.js} +1 -1
- package/dist/client/assets/{sso-BgjWtdcn.js → sso-BdojNoX2.js} +1 -1
- package/dist/client/assets/{store-IULAwEa2.js → store-DGVb_5C1.js} +1 -1
- package/dist/client/assets/store-registry-KlW3QwUJ.js +2 -0
- package/dist/client/assets/{switch-Uh77-H9s.js → switch-YLfAn92x.js} +1 -1
- package/dist/client/assets/{table-BCa0VyBS.js → table-wHPRdxYv.js} +1 -1
- package/dist/client/assets/{tabs-CJMCPubd.js → tabs-8aX3BTo-.js} +1 -1
- package/dist/client/assets/{task-status-QVkFLAWD.js → task-status-CY3ltf_M.js} +1 -1
- package/dist/client/assets/{textarea-IkB1PXd2.js → textarea-BJZt5-vN.js} +1 -1
- package/dist/client/assets/{toggle-group-CxTeQVbK.js → toggle-group-C_B32Tm8.js} +1 -1
- package/dist/client/assets/{tools-list-PZv7L79s.js → tools-list-bxPeEc0p.js} +1 -1
- package/dist/client/assets/{tooltip-DwEKoS3m.js → tooltip-B26xbtws.js} +1 -1
- package/dist/client/assets/{types-DBa5NWuL.js → types-DfgXo_cD.js} +1 -1
- package/dist/client/assets/{use-ai-providers-hUoQ1QKn.js → use-ai-providers-CnyJW7s-.js} +1 -1
- package/dist/client/assets/{use-collections-CbyJ6t6i.js → use-collections-D66SnH5Q.js} +1 -1
- package/dist/client/assets/{use-connection-BZIS5d-M.js → use-connection-9VrA1Bg7.js} +1 -1
- package/dist/client/assets/{use-copy-BhwMe7lW.js → use-copy-DpxSUjqd.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Qup6KxHA.js → use-create-virtual-mcp-DBfs4FWm.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-De7heoii.js → use-debounced-autosave-Ja8PcJv_.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BSFPv0OJ.js → use-decopilot-events-DjAxcjIH.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CVL2tyXf.js → use-delete-connection-7Blp6D0s.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B1XpJhs7.js → use-infinite-scroll-IwyU_OvC.js} +1 -1
- package/dist/client/assets/{use-list-state-NYzHNEE3.js → use-list-state-Dk2QFrYd.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DEJYwjVI.js → use-mcp-tools-C7yIpDHe.js} +1 -1
- package/dist/client/assets/{use-members-CE8F-6Pl.js → use-members-Bg4ZFsu9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BQCBqC6w.js → use-navigate-to-agent-BehsrrsA.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DWMaaDOW.js → use-org-auth-client-mkgKwCAh.js} +1 -1
- package/dist/client/assets/{use-org-sso-DG73ueOt.js → use-org-sso-Xv4QV2bL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C_InafKr.js → use-organization-roles-BmH8DM7C.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DU3tZPVG.js → use-organization-settings-Coi7Ggqq.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BB_6SUlA.js → use-registry-connections-_83vUYHS.js} +1 -1
- package/dist/client/assets/{use-status-sounds--S4wlp-c.js → use-status-sounds-DLYnzZvv.js} +1 -1
- package/dist/client/assets/{use-tasks-BXrbnymy.js → use-tasks-CUt44N_R.js} +1 -1
- package/dist/client/assets/{use-view-mode-30iczyXm.js → use-view-mode-CZXZPLm6.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqC7TCRl.js → use-virtual-mcp-BlYQqAfZ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BJ1I2JSf.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BpfkmtaB.js +1 -0
- package/dist/client/assets/{user-CU2SK3qY.js → user-BFqIXUgg.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-ChONnJPm.js → view-mode-toggle-BC7A6oBR.js} +1 -1
- package/dist/client/assets/{workflow-C2A8waKp.js → workflow-B3ajRQIi.js} +1 -1
- package/dist/client/assets/workflow-detail-l83JU-Mp.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +4 -4
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/{slice-ansi → is-fullwidth-code-point}/license +0 -1
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-C2Z8tM8W.js +0 -1
- package/dist/client/assets/index-Cf1ZbDa8.js +0 -1
- package/dist/client/assets/registry-Ijr9ccjx.js +0 -2
- package/dist/client/assets/store-registry-BRPkAkWY.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Cy6k7dIo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DvQj0VfO.js +0 -1
- package/dist/client/assets/workflow-detail-DtfIhsSe.js +0 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
- package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
- package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
- package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
- package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
- package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
- package/dist/server/node_modules/mimic-fn/index.js +0 -13
- package/dist/server/node_modules/mimic-fn/package.json +0 -42
- package/dist/server/node_modules/mimic-fn/readme.md +0 -69
- package/dist/server/node_modules/slice-ansi/index.d.ts +0 -19
- package/dist/server/node_modules/slice-ansi/index.js +0 -260
- package/dist/server/node_modules/slice-ansi/package.json +0 -59
- package/dist/server/node_modules/slice-ansi/readme.md +0 -54
- package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +0 -752
- /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
- /package/dist/server/node_modules/{mimic-fn → escape-string-regexp}/license +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {getCategory, isAmbiguous, isFullWidth, isWide} from './lookup.js';
|
|
2
|
-
|
|
3
|
-
function validate(codePoint) {
|
|
4
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
5
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function eastAsianWidthType(codePoint) {
|
|
10
|
-
validate(codePoint);
|
|
11
|
-
|
|
12
|
-
return getCategory(codePoint);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {
|
|
16
|
-
validate(codePoint);
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
isFullWidth(codePoint)
|
|
20
|
-
|| isWide(codePoint)
|
|
21
|
-
|| (ambiguousAsWide && isAmbiguous(codePoint))
|
|
22
|
-
) {
|
|
23
|
-
return 2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Private exports for https://github.com/sindresorhus/is-fullwidth-code-point
|
|
30
|
-
export {isFullWidth as _isFullWidth, isWide as _isWide} from './lookup.js';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Generated by scripts/build.js
|
|
2
|
-
|
|
3
|
-
// prettier-ignore
|
|
4
|
-
const ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
5
|
-
|
|
6
|
-
// prettier-ignore
|
|
7
|
-
const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
8
|
-
|
|
9
|
-
// prettier-ignore
|
|
10
|
-
const halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
11
|
-
|
|
12
|
-
// prettier-ignore
|
|
13
|
-
const narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
14
|
-
|
|
15
|
-
// prettier-ignore
|
|
16
|
-
const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
17
|
-
|
|
18
|
-
export {ambiguousRanges, fullwidthRanges, halfwidthRanges, narrowRanges, wideRanges};
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ambiguousRanges,
|
|
3
|
-
fullwidthRanges,
|
|
4
|
-
halfwidthRanges,
|
|
5
|
-
narrowRanges,
|
|
6
|
-
wideRanges,
|
|
7
|
-
} from './lookup-data.js';
|
|
8
|
-
import {isInRange} from './utilities.js';
|
|
9
|
-
|
|
10
|
-
const minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
11
|
-
const maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
12
|
-
const minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
13
|
-
const maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
14
|
-
const minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
15
|
-
const maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
16
|
-
const minimumNarrowCodePoint = narrowRanges[0];
|
|
17
|
-
const maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
18
|
-
const minimumWideCodePoint = wideRanges[0];
|
|
19
|
-
const maximumWideCodePoint = wideRanges.at(-1);
|
|
20
|
-
|
|
21
|
-
const commonCjkCodePoint = 0x4E_00;
|
|
22
|
-
const [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
23
|
-
|
|
24
|
-
// Use a hot-path range so common `isWide` calls can skip binary search.
|
|
25
|
-
// The range containing U+4E00 covers common CJK ideographs;
|
|
26
|
-
// fallback to the largest range for resilience to Unicode table changes.
|
|
27
|
-
function findWideFastPathRange(ranges) {
|
|
28
|
-
let fastPathStart = ranges[0];
|
|
29
|
-
let fastPathEnd = ranges[1];
|
|
30
|
-
|
|
31
|
-
for (let index = 0; index < ranges.length; index += 2) {
|
|
32
|
-
const start = ranges[index];
|
|
33
|
-
const end = ranges[index + 1];
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
commonCjkCodePoint >= start
|
|
37
|
-
&& commonCjkCodePoint <= end
|
|
38
|
-
) {
|
|
39
|
-
return [start, end];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if ((end - start) > (fastPathEnd - fastPathStart)) {
|
|
43
|
-
fastPathStart = start;
|
|
44
|
-
fastPathEnd = end;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return [fastPathStart, fastPathEnd];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const isAmbiguous = codePoint => {
|
|
52
|
-
if (
|
|
53
|
-
codePoint < minimumAmbiguousCodePoint
|
|
54
|
-
|| codePoint > maximumAmbiguousCodePoint
|
|
55
|
-
) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return isInRange(ambiguousRanges, codePoint);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const isFullWidth = codePoint => {
|
|
63
|
-
if (
|
|
64
|
-
codePoint < minimumFullWidthCodePoint
|
|
65
|
-
|| codePoint > maximumFullWidthCodePoint
|
|
66
|
-
) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return isInRange(fullwidthRanges, codePoint);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const isHalfWidth = codePoint => {
|
|
74
|
-
if (
|
|
75
|
-
codePoint < minimumHalfWidthCodePoint
|
|
76
|
-
|| codePoint > maximumHalfWidthCodePoint
|
|
77
|
-
) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return isInRange(halfwidthRanges, codePoint);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const isNarrow = codePoint => {
|
|
85
|
-
if (
|
|
86
|
-
codePoint < minimumNarrowCodePoint
|
|
87
|
-
|| codePoint > maximumNarrowCodePoint
|
|
88
|
-
) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return isInRange(narrowRanges, codePoint);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export const isWide = codePoint => {
|
|
96
|
-
if (
|
|
97
|
-
codePoint >= wideFastPathStart
|
|
98
|
-
&& codePoint <= wideFastPathEnd
|
|
99
|
-
) {
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (
|
|
104
|
-
codePoint < minimumWideCodePoint
|
|
105
|
-
|| codePoint > maximumWideCodePoint
|
|
106
|
-
) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return isInRange(wideRanges, codePoint);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export function getCategory(codePoint) {
|
|
114
|
-
if (isAmbiguous(codePoint)) {
|
|
115
|
-
return 'ambiguous';
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (isFullWidth(codePoint)) {
|
|
119
|
-
return 'fullwidth';
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (isHalfWidth(codePoint)) {
|
|
123
|
-
return 'halfwidth';
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (isNarrow(codePoint)) {
|
|
127
|
-
return 'narrow';
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (isWide(codePoint)) {
|
|
131
|
-
return 'wide';
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return 'neutral';
|
|
135
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "get-east-asian-width",
|
|
3
|
-
"version": "1.5.0",
|
|
4
|
-
"description": "Determine the East Asian Width of a Unicode character",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/get-east-asian-width",
|
|
7
|
-
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
-
"author": {
|
|
9
|
-
"name": "Sindre Sorhus",
|
|
10
|
-
"email": "sindresorhus@gmail.com",
|
|
11
|
-
"url": "https://sindresorhus.com"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"exports": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"default": "./index.js"
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": false,
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "xo && ava && tsc index.d.ts",
|
|
24
|
-
"build": "node scripts/build.js",
|
|
25
|
-
"prepublish": "npm run build"
|
|
26
|
-
},
|
|
27
|
-
"files": [
|
|
28
|
-
"index.js",
|
|
29
|
-
"index.d.ts",
|
|
30
|
-
"lookup.js",
|
|
31
|
-
"lookup-data.js",
|
|
32
|
-
"utilities.js"
|
|
33
|
-
],
|
|
34
|
-
"keywords": [
|
|
35
|
-
"unicode",
|
|
36
|
-
"east-asian-width",
|
|
37
|
-
"eastasianwidth",
|
|
38
|
-
"character",
|
|
39
|
-
"string",
|
|
40
|
-
"width",
|
|
41
|
-
"text",
|
|
42
|
-
"layout",
|
|
43
|
-
"alignment",
|
|
44
|
-
"fullwidth",
|
|
45
|
-
"halfwidth",
|
|
46
|
-
"ambiguous",
|
|
47
|
-
"narrow",
|
|
48
|
-
"wide",
|
|
49
|
-
"neutral",
|
|
50
|
-
"typography",
|
|
51
|
-
"japanese",
|
|
52
|
-
"chinese",
|
|
53
|
-
"korean",
|
|
54
|
-
"codepoint",
|
|
55
|
-
"text-processing",
|
|
56
|
-
"i18n",
|
|
57
|
-
"l10n"
|
|
58
|
-
],
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"ava": "^5.3.1",
|
|
61
|
-
"outdent": "^0.8.0",
|
|
62
|
-
"simplify-ranges": "^0.1.0",
|
|
63
|
-
"typescript": "^5.2.2",
|
|
64
|
-
"xo": "^0.56.0"
|
|
65
|
-
},
|
|
66
|
-
"xo": {
|
|
67
|
-
"ignores": [
|
|
68
|
-
"lookup-data.js"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# get-east-asian-width
|
|
2
|
-
|
|
3
|
-
> Determine the [East Asian Width](https://unicode.org/reports/tr11/) of a Unicode character
|
|
4
|
-
|
|
5
|
-
> East Asian Width categorizes Unicode characters based on their occupied space in East Asian typography, which helps in text layout and alignment, particularly in languages like Japanese, Chinese, and Korean.
|
|
6
|
-
|
|
7
|
-
Unlike other similar packages, this package uses the latest Unicode data (which changes each year).
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
npm install get-east-asian-width
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
import {eastAsianWidth, eastAsianWidthType} from 'get-east-asian-width';
|
|
19
|
-
|
|
20
|
-
const codePoint = '字'.codePointAt(0);
|
|
21
|
-
|
|
22
|
-
console.log(eastAsianWidth(codePoint));
|
|
23
|
-
//=> 2
|
|
24
|
-
|
|
25
|
-
console.log(eastAsianWidthType(codePoint));
|
|
26
|
-
//=> 'wide'
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## `eastAsianWidth(codePoint: number, options?: object): 1 | 2`
|
|
30
|
-
|
|
31
|
-
Returns the width as a number for the given code point.
|
|
32
|
-
|
|
33
|
-
### options
|
|
34
|
-
|
|
35
|
-
Type: `object`
|
|
36
|
-
|
|
37
|
-
#### ambiguousAsWide
|
|
38
|
-
|
|
39
|
-
Type: `boolean`\
|
|
40
|
-
Default: `false`
|
|
41
|
-
|
|
42
|
-
Whether to treat an `'ambiguous'` character as wide.
|
|
43
|
-
|
|
44
|
-
```js
|
|
45
|
-
import {eastAsianWidth} from 'get-east-asian-width';
|
|
46
|
-
|
|
47
|
-
const codePoint = '⛣'.codePointAt(0);
|
|
48
|
-
|
|
49
|
-
console.log(eastAsianWidth(codePoint));
|
|
50
|
-
//=> 1
|
|
51
|
-
|
|
52
|
-
console.log(eastAsianWidth(codePoint, {ambiguousAsWide: true}));
|
|
53
|
-
//=> 2
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
> Ambiguous characters behave like wide or narrow characters depending on the context (language tag, script identification, associated font, source of data, or explicit markup; all can provide the context). **If the context cannot be established reliably, they should be treated as narrow characters by default.**
|
|
57
|
-
> - http://www.unicode.org/reports/tr11/
|
|
58
|
-
|
|
59
|
-
## `eastAsianWidthType(codePoint: number): 'fullwidth' | 'halfwidth' | 'wide' | 'narrow' | 'neutral' | 'ambiguous'`
|
|
60
|
-
|
|
61
|
-
Returns the type of “East Asian Width” for the given code point.
|
|
62
|
-
|
|
63
|
-
## Related
|
|
64
|
-
|
|
65
|
-
- [string-width](https://github.com/sindresorhus/string-width) - Get the visual width of a string
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Binary search on a sorted flat array of [start, end] pairs.
|
|
3
|
-
|
|
4
|
-
@param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].
|
|
5
|
-
@param {number} codePoint - The value to search for.
|
|
6
|
-
@returns {boolean} Whether the value falls within any of the ranges.
|
|
7
|
-
*/
|
|
8
|
-
export const isInRange = (ranges, codePoint) => {
|
|
9
|
-
let low = 0;
|
|
10
|
-
let high = Math.floor(ranges.length / 2) - 1;
|
|
11
|
-
while (low <= high) {
|
|
12
|
-
const mid = Math.floor((low + high) / 2);
|
|
13
|
-
const i = mid * 2;
|
|
14
|
-
if (codePoint < ranges[i]) {
|
|
15
|
-
high = mid - 1;
|
|
16
|
-
} else if (codePoint > ranges[i + 1]) {
|
|
17
|
-
low = mid + 1;
|
|
18
|
-
} else {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return false;
|
|
24
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
declare const mimicFn: {
|
|
2
|
-
/**
|
|
3
|
-
Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
4
|
-
|
|
5
|
-
@param to - Mimicking function.
|
|
6
|
-
@param from - Function to mimic.
|
|
7
|
-
@returns The modified `to` function.
|
|
8
|
-
|
|
9
|
-
@example
|
|
10
|
-
```
|
|
11
|
-
import mimicFn = require('mimic-fn');
|
|
12
|
-
|
|
13
|
-
function foo() {}
|
|
14
|
-
foo.unicorn = '🦄';
|
|
15
|
-
|
|
16
|
-
function wrapper() {
|
|
17
|
-
return foo();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
console.log(wrapper.name);
|
|
21
|
-
//=> 'wrapper'
|
|
22
|
-
|
|
23
|
-
mimicFn(wrapper, foo);
|
|
24
|
-
|
|
25
|
-
console.log(wrapper.name);
|
|
26
|
-
//=> 'foo'
|
|
27
|
-
|
|
28
|
-
console.log(wrapper.unicorn);
|
|
29
|
-
//=> '🦄'
|
|
30
|
-
```
|
|
31
|
-
*/
|
|
32
|
-
<
|
|
33
|
-
ArgumentsType extends unknown[],
|
|
34
|
-
ReturnType,
|
|
35
|
-
FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
36
|
-
>(
|
|
37
|
-
to: (...arguments: ArgumentsType) => ReturnType,
|
|
38
|
-
from: FunctionType
|
|
39
|
-
): FunctionType;
|
|
40
|
-
|
|
41
|
-
// TODO: Remove this for the next major release, refactor the whole definition to:
|
|
42
|
-
// declare function mimicFn<
|
|
43
|
-
// ArgumentsType extends unknown[],
|
|
44
|
-
// ReturnType,
|
|
45
|
-
// FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
46
|
-
// >(
|
|
47
|
-
// to: (...arguments: ArgumentsType) => ReturnType,
|
|
48
|
-
// from: FunctionType
|
|
49
|
-
// ): FunctionType;
|
|
50
|
-
// export = mimicFn;
|
|
51
|
-
default: typeof mimicFn;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export = mimicFn;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const mimicFn = (to, from) => {
|
|
4
|
-
for (const prop of Reflect.ownKeys(from)) {
|
|
5
|
-
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
return to;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
module.exports = mimicFn;
|
|
12
|
-
// TODO: Remove this for the next major release
|
|
13
|
-
module.exports.default = mimicFn;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mimic-fn",
|
|
3
|
-
"version": "2.1.0",
|
|
4
|
-
"description": "Make a function mimic another one",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/mimic-fn",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=6"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "xo && ava && tsd"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"index.js",
|
|
20
|
-
"index.d.ts"
|
|
21
|
-
],
|
|
22
|
-
"keywords": [
|
|
23
|
-
"function",
|
|
24
|
-
"mimic",
|
|
25
|
-
"imitate",
|
|
26
|
-
"rename",
|
|
27
|
-
"copy",
|
|
28
|
-
"inherit",
|
|
29
|
-
"properties",
|
|
30
|
-
"name",
|
|
31
|
-
"func",
|
|
32
|
-
"fn",
|
|
33
|
-
"set",
|
|
34
|
-
"infer",
|
|
35
|
-
"change"
|
|
36
|
-
],
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"ava": "^1.4.1",
|
|
39
|
-
"tsd": "^0.7.1",
|
|
40
|
-
"xo": "^0.24.0"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
|
|
2
|
-
|
|
3
|
-
> Make a function mimic another one
|
|
4
|
-
|
|
5
|
-
Useful when you wrap a function in another function and like to preserve the original name and other properties.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
$ npm install mimic-fn
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
const mimicFn = require('mimic-fn');
|
|
19
|
-
|
|
20
|
-
function foo() {}
|
|
21
|
-
foo.unicorn = '🦄';
|
|
22
|
-
|
|
23
|
-
function wrapper() {
|
|
24
|
-
return foo();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
console.log(wrapper.name);
|
|
28
|
-
//=> 'wrapper'
|
|
29
|
-
|
|
30
|
-
mimicFn(wrapper, foo);
|
|
31
|
-
|
|
32
|
-
console.log(wrapper.name);
|
|
33
|
-
//=> 'foo'
|
|
34
|
-
|
|
35
|
-
console.log(wrapper.unicorn);
|
|
36
|
-
//=> '🦄'
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## API
|
|
41
|
-
|
|
42
|
-
It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
43
|
-
|
|
44
|
-
### mimicFn(to, from)
|
|
45
|
-
|
|
46
|
-
Modifies the `to` function and returns it.
|
|
47
|
-
|
|
48
|
-
#### to
|
|
49
|
-
|
|
50
|
-
Type: `Function`
|
|
51
|
-
|
|
52
|
-
Mimicking function.
|
|
53
|
-
|
|
54
|
-
#### from
|
|
55
|
-
|
|
56
|
-
Type: `Function`
|
|
57
|
-
|
|
58
|
-
Function to mimic.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
## Related
|
|
62
|
-
|
|
63
|
-
- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
|
|
64
|
-
- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## License
|
|
68
|
-
|
|
69
|
-
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)
|
|
3
|
-
|
|
4
|
-
@param string - A string with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).
|
|
5
|
-
@param startSlice - Zero-based visible-column index at which to start the slice. Grapheme clusters are kept intact.
|
|
6
|
-
@param endSlice - Zero-based visible-column index at which to end the slice.
|
|
7
|
-
|
|
8
|
-
@example
|
|
9
|
-
```
|
|
10
|
-
import chalk from 'chalk';
|
|
11
|
-
import sliceAnsi from 'slice-ansi';
|
|
12
|
-
|
|
13
|
-
const string = 'The quick brown ' + chalk.red('fox jumped over ') +
|
|
14
|
-
'the lazy ' + chalk.green('dog and then ran away with the unicorn.');
|
|
15
|
-
|
|
16
|
-
console.log(sliceAnsi(string, 20, 30));
|
|
17
|
-
```
|
|
18
|
-
*/
|
|
19
|
-
export default function sliceAnsi(string: string, startSlice: number, endSlice?: number): string;
|