decocms 2.181.2 → 2.181.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-Hpsw9_tf.js → AlertCircle-D2rRA9CS.js} +1 -1
- package/dist/client/assets/{ArrowLeft-U7OUoBhv.js → ArrowLeft-D4bkD9qi.js} +1 -1
- package/dist/client/assets/{ArrowUp-BrSLqvQo.js → ArrowUp-CpDF-NAu.js} +1 -1
- package/dist/client/assets/{Check-CVKUMJv3.js → Check-CecxQkQE.js} +1 -1
- package/dist/client/assets/{ChevronDown-Ds3IOx8p.js → ChevronDown-Cm9SuGtV.js} +1 -1
- package/dist/client/assets/{ChevronRight-CTHCKnjF.js → ChevronRight-2xVQHhsF.js} +1 -1
- package/dist/client/assets/{ChevronUp-DJbt-mXd.js → ChevronUp-B6bu9ZD3.js} +1 -1
- package/dist/client/assets/{Container-D4n2e11R.js → Container-sfWYtc36.js} +1 -1
- package/dist/client/assets/{Dataflow03-q5kzWw4s.js → Dataflow03-BcXlVxgR.js} +1 -1
- package/dist/client/assets/{Download01-BBRbjA11.js → Download01-DGSbxmSo.js} +1 -1
- package/dist/client/assets/{FolderClosed-CgbAGtho.js → FolderClosed-DlY-lqwP.js} +1 -1
- package/dist/client/assets/{Grid01-CbgVFQNg.js → Grid01-CLnEHof5.js} +1 -1
- package/dist/client/assets/{List-D35z7ORx.js → List-CnkQuVUq.js} +1 -1
- package/dist/client/assets/{Loading01-DDv5lfhX.js → Loading01-ZUH_hVSq.js} +1 -1
- package/dist/client/assets/{Play-Q9uDVIa5.js → Play-CCpyKlpN.js} +1 -1
- package/dist/client/assets/{Plus-DcUxQQXw.js → Plus-D9CNWrFQ.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-nS96T2bf.js → RefreshCcw01-Cu6svfY5.js} +1 -1
- package/dist/client/assets/{SearchMd-CTpXH6F3.js → SearchMd-BH_J7-7p.js} +1 -1
- package/dist/client/assets/{Settings01-BVY96Vsg.js → Settings01-DTaoTYj1.js} +1 -1
- package/dist/client/assets/{Trash01-CzfVJZjl.js → Trash01-Cv31wiMP.js} +1 -1
- package/dist/client/assets/{Type01-BwsSTKh1.js → Type01-BRLQyycA.js} +1 -1
- package/dist/client/assets/{Upload01-Bn_9d04P.js → Upload01-BY6Noksk.js} +1 -1
- package/dist/client/assets/{User01-Dl4j8Eui.js → User01-BloSEKZw.js} +1 -1
- package/dist/client/assets/{VideoRecorder-0-qQusnp.js → VideoRecorder-CqjZf9cg.js} +1 -1
- package/dist/client/assets/{X-DvXlEl9E.js → X-1dO_8PIJ.js} +1 -1
- package/dist/client/assets/{XCircle-DI9HiD4A.js → XCircle-BEC1SvTX.js} +1 -1
- package/dist/client/assets/{XClose-Bw5018RM.js → XClose-BzyTilGE.js} +1 -1
- package/dist/client/assets/{Zap-DGbTVlYq.js → Zap-D6SUOiFY.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-Cfflc0J5.js → agent-connections-preview-COmBlzCd.js} +1 -1
- package/dist/client/assets/{agent-detail-CehIC3W1.js → agent-detail-DAo3-7Gz.js} +1 -1
- package/dist/client/assets/{agents-DmtfY0M7.js → agents-Cy0iaygc.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-BtOy-_hY.js → ai-providers-logos-Cr4iRu-0.js} +1 -1
- package/dist/client/assets/{alert-dialog-CIdU20ao.js → alert-dialog-DnwDlp7T.js} +1 -1
- package/dist/client/assets/{auth-catchall-DklKmwQO.js → auth-catchall-CJb2iecY.js} +1 -1
- package/dist/client/assets/{automation-detail-CIe1WG8E.js → automation-detail-DIl5XDBS.js} +1 -1
- package/dist/client/assets/{automations-KsqaYtsv.js → automations-4lM2x30V.js} +1 -1
- package/dist/client/assets/{avatar-Dz9Au16I.js → avatar-CahK8DWE.js} +1 -1
- package/dist/client/assets/{badge-BIY4HSu4.js → badge-a1yIqkX1.js} +1 -1
- package/dist/client/assets/{binder-DaeU7_Yt.js → binder-B_Xezby6.js} +1 -1
- package/dist/client/assets/{breadcrumb-DNInqlES.js → breadcrumb-DBLmG8ET.js} +1 -1
- package/dist/client/assets/{card-CoTaf7Bb.js → card-BkMKAjKJ.js} +1 -1
- package/dist/client/assets/{checkbox-UWf_Spym.js → checkbox-DFbWpPSa.js} +1 -1
- package/dist/client/assets/{collapsible-DGsDf05s.js → collapsible-CzCLTaIa.js} +1 -1
- package/dist/client/assets/{collection-detail-jT6_1Zus.js → collection-detail-CP2ikFfr.js} +1 -1
- package/dist/client/assets/{collection-display-button-CIwF6qiP.js → collection-display-button-BTy8OMGo.js} +1 -1
- package/dist/client/assets/{collection-search-DmeA1lkM.js → collection-search-BaA_5hnO.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DZ9kkHHz.js → collection-table-wrapper-CeDvXZ6e.js} +1 -1
- package/dist/client/assets/{collection-tabs-VEtVQj8e.js → collection-tabs-B_Ive8CL.js} +1 -1
- package/dist/client/assets/{command-DS9L8dE9.js → command-DeF62mUG.js} +1 -1
- package/dist/client/assets/{connection-card-DY8BmloD.js → connection-card-ClL9bm7k.js} +1 -1
- package/dist/client/assets/{connection-detail-D6zDmZps.js → connection-detail-D6Ad6Uup.js} +1 -1
- package/dist/client/assets/{connections-BvDULZyp.js → connections-Dkdo-MxF.js} +1 -1
- package/dist/client/assets/{constants-C5g6K3-0.js → constants-kAo23sAc.js} +1 -1
- package/dist/client/assets/{context-0-m5aPvK.js → context-C2WVT2wI.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Bw7JkHCW.js → create-organization-dialog--yeW4Rp3.js} +1 -1
- package/dist/client/assets/{create-project-dialog-CofGaj8t.js → create-project-dialog-DX0tom06.js} +1 -1
- package/dist/client/assets/{danger-BxwsLFA0.js → danger-BEWSLgEr.js} +1 -1
- package/dist/client/assets/{danger-zone-DNgGGkaE.js → danger-zone-COttqiLk.js} +1 -1
- package/dist/client/assets/{dependencies-CscQrQx3.js → dependencies-DQpwdViP.js} +1 -1
- package/dist/client/assets/{dialog-Beaz2erB.js → dialog-B-I43lOk.js} +1 -1
- package/dist/client/assets/{drawer-DuM10S-O.js → drawer-Cc_fH-oc.js} +1 -1
- package/dist/client/assets/{dropdown-menu-IA1w2fjK.js → dropdown-menu-KiFp7XSX.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CtDEEZnp.js → dynamic-plugin-layout-DqyTuAzp.js} +1 -1
- package/dist/client/assets/{editable-task-title-DuDIwQf_.js → editable-task-title-DABFKKXz.js} +1 -1
- package/dist/client/assets/{empty-state-DnJSxmJA.js → empty-state-BclY67WC.js} +1 -1
- package/dist/client/assets/{empty-state-hwIP0sm6.js → empty-state-UToLDOJO.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Ceyzo9UT.js → env-vars-editor-D3JHoO0m.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D13QyL30.js → extract-connection-data-GhIKo0Xr.js} +1 -1
- package/dist/client/assets/{file-browser-B-JXooL8.js → file-browser-CZHih4nP.js} +2 -2
- package/dist/client/assets/{form-CccEC3cm.js → form-edx7u0Be.js} +1 -1
- package/dist/client/assets/{general-axIGxWAv.js → general-rmW6kn_q.js} +1 -1
- package/dist/client/assets/{generate-id-0beDKMoR.js → generate-id-B0hqIne-.js} +1 -1
- package/dist/client/assets/{grid-view-VGzy6bo9.js → grid-view-SzsDCBqX.js} +1 -1
- package/dist/client/assets/{home-ED4EKgWV.js → home-BW8Jzf61.js} +1 -1
- package/dist/client/assets/{index-DxFKywdp.js → index--68a591R.js} +1 -1
- package/dist/client/assets/{index-Be3yjubl.js → index-B3DLUye8.js} +1 -1
- package/dist/client/assets/{index-CDessA1I.js → index-Bf3XZpZk.js} +1 -1
- package/dist/client/assets/{index-JasJqXzm.js → index-BsYB-j4p.js} +1 -1
- package/dist/client/assets/{index-VZp2CIbR.js → index-C45O1mgu.js} +1 -1
- package/dist/client/assets/{index-DQTOgFOw.js → index-CJ0BaJHY.js} +1 -1
- package/dist/client/assets/{index-BfJLXP0j.js → index-CNQ1T_R3.js} +1 -1
- package/dist/client/assets/{index-DqQdLYr7.js → index-Ca6dFB6s.js} +1 -1
- package/dist/client/assets/{index-C2aMuEoP.js → index-CyaqcTbn.js} +1 -1
- package/dist/client/assets/{index-BjxqoU_w.js → index-Di6oLb1g.js} +3 -3
- package/dist/client/assets/{index-DsV3YD3P.js → index-SfPPYQt8.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C0OPB4rx.js → infiniteQueryObserver-Cg7Qn-Py.js} +1 -1
- package/dist/client/assets/{input-Be0bLLQW.js → input-DQ4QcwHR.js} +1 -1
- package/dist/client/assets/{integration-icon-C9ac9VOj.js → integration-icon-DlCg0T4C.js} +1 -1
- package/dist/client/assets/{label-C6smVCIk.js → label-BGeQL0ka.js} +1 -1
- package/dist/client/assets/{layout-D0N63fj1.js → layout-D6ZxqJKi.js} +1 -1
- package/dist/client/assets/{layout-CYi_63K3.js → layout-DtwUtGx0.js} +1 -1
- package/dist/client/assets/{login-B4SjGwXr.js → login-DlB4I5sp.js} +1 -1
- package/dist/client/assets/{logo-upload-DwLQLlu7.js → logo-upload-BtAPf8sp.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BWF6RI84.js → mcp-app-renderer-Cg9Eew2n.js} +1 -1
- package/dist/client/assets/{mcp-server-card-ksfI1Eyh.js → mcp-server-card-4V1eOOTX.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-Cb-T_-Mb.js → mcp-server-detail-CX9gEsnH.js} +2 -2
- package/dist/client/assets/{members-DJ6DA7d5.js → members-D1cMWKgG.js} +1 -1
- package/dist/client/assets/{monaco-editor-D0GS_D3E.js → monaco-editor-DnqhgBvh.js} +1 -1
- package/dist/client/assets/{monitoring-osT0IqjS.js → monitoring-BQpDfDrf.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-Bxyyp3mT.js → monitoring-dashboard-edit-Cbicjk63.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-D1jhpkzD.js → monitoring-dashboard-view-Ci-RFMRb.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BzJ0yham.js → monitoring-stats-row-vvMdV41p.js} +1 -1
- package/dist/client/assets/{oauth-callback-B9dLIXA2.js → oauth-callback-DIjSwsej.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mFsE32vf.js → oauth-callback-ai-provider-Dh3KWtZ6.js} +1 -1
- package/dist/client/assets/{org-ai-providers-UG6FIdxB.js → org-ai-providers-DGjdQR3W.js} +1 -1
- package/dist/client/assets/{page-C4W1F739.js → page-DCh64rPG.js} +1 -1
- package/dist/client/assets/{page-Drtt1B9w.js → page-DqLtxYci.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C-XfLac2.js → plugin-empty-state-DXF12w3Y.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C7t75jMS.js → plugin-empty-state-KrWE8h_c.js} +1 -1
- package/dist/client/assets/{plugin-header-BJKUaApF.js → plugin-header-BRNld0B2.js} +1 -1
- package/dist/client/assets/{plugin-header-5ST0P5Q7.js → plugin-header-CxhFSwvz.js} +1 -1
- package/dist/client/assets/plugins-BVx4W74m.js +1 -0
- package/dist/client/assets/{popover-Dn0X9Fr1.js → popover-DnP50c_4.js} +1 -1
- package/dist/client/assets/{project-app-view-CcUsagsx.js → project-app-view-BjmqGgdc.js} +1 -1
- package/dist/client/assets/{project-layout-D9UABDEG.js → project-layout-B0N0-1u8.js} +1 -1
- package/dist/client/assets/{project-plugins-B2zBuBKC.js → project-plugins-W6YBdGTQ.js} +1 -1
- package/dist/client/assets/{projects-list-BWN1T4nW.js → projects-list-x0gTe3hu.js} +1 -1
- package/dist/client/assets/{registry-layout-tQMWJSmp.js → registry-layout-CCApya06.js} +1 -1
- package/dist/client/assets/{registry-utils-CVkiAvdy.js → registry-utils-B2MGgFdM.js} +1 -1
- package/dist/client/assets/{reset-password-DJ4VaB6B.js → reset-password-BGRs1AsG.js} +1 -1
- package/dist/client/assets/{resizable-BD6CMEjd.js → resizable-BUdS0TeH.js} +1 -1
- package/dist/client/assets/{save-actions-BFbH4lFH.js → save-actions-CZB_80fx.js} +1 -1
- package/dist/client/assets/{scroll-area-VqeDMOPN.js → scroll-area-BDvsWD3_.js} +1 -1
- package/dist/client/assets/{select-VEJvYQo7.js → select-DE6nOtq4.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-BVFbfMoH.js → select-virtual-mcp-BcDL714M.js} +1 -1
- package/dist/client/assets/{shell-layout-lPP98AcT.js → shell-layout-dlpBTl1V.js} +2 -2
- package/dist/client/assets/{sidebar-settings-Cvi9DQQC.js → sidebar-settings-DvmipHRI.js} +1 -1
- package/dist/client/assets/{skeleton-HKYMRn58.js → skeleton-jHSQmvNz.js} +1 -1
- package/dist/client/assets/{spinner-BFdTwge6.js → spinner-uIlWy8Tn.js} +1 -1
- package/dist/client/assets/{store-invite-BqHShMlA.js → store-invite-hyBdEV4m.js} +1 -1
- package/dist/client/assets/{switch-CG6Wlm7Y.js → switch-DqoVcDTw.js} +1 -1
- package/dist/client/assets/{table-C915-j5j.js → table-BtUXt-LB.js} +1 -1
- package/dist/client/assets/{tabs-EJf8mrdN.js → tabs-Co0v-Gtu.js} +1 -1
- package/dist/client/assets/{task-status-DwSGaLCq.js → task-status-mBvgK6CE.js} +5 -3
- package/dist/client/assets/tasks-D2ul5DI6.js +1 -0
- package/dist/client/assets/{tasks-panel-j-1pM09U.js → tasks-panel-CKxWhrpo.js} +1 -1
- package/dist/client/assets/{textarea-BpJcJgEu.js → textarea-DK_nHNH9.js} +1 -1
- package/dist/client/assets/{time-range-picker-CBrng89O.js → time-range-picker-Dq2GzTz_.js} +1 -1
- package/dist/client/assets/{toggle-group-D3jOZx6Z.js → toggle-group-C2i_WN24.js} +1 -1
- package/dist/client/assets/{tools-list-BJKvrBYn.js → tools-list-SO4mO2yz.js} +1 -1
- package/dist/client/assets/{tooltip-SqkLa6wk.js → tooltip-Bt2vWRpT.js} +1 -1
- package/dist/client/assets/{topbar-portal-Ul2d-lg1.js → topbar-portal-C9UZ6_6p.js} +1 -1
- package/dist/client/assets/{types-CdHbWvSx.js → types-C4sVrknd.js} +1 -1
- package/dist/client/assets/{use-automations-xjYa92g6.js → use-automations-DgVOPvmM.js} +1 -1
- package/dist/client/assets/{use-collections-Zp8eOwPm.js → use-collections-CojcRvND.js} +1 -1
- package/dist/client/assets/{use-connection-B-vgK3kN.js → use-connection-CJIltDo3.js} +1 -1
- package/dist/client/assets/{use-copy-Bor2cPit.js → use-copy-_cPtrtTH.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DLLVUJBK.js → use-create-virtual-mcp-D7i1HcQg.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-QweqoXs4.js → use-infinite-scroll-xFnZb5m2.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-BWF2XusE.js → use-install-from-registry-BUPQMjUV.js} +1 -1
- package/dist/client/assets/{use-list-state-BpX2jytt.js → use-list-state-Bp_aU4BI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-qi4FHPHh.js → use-mcp-prompts-zeDoy0Xo.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-B8ERGBbF.js → use-mcp-resources-BIFxFRhN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DNLvgz5O.js → use-mcp-tools-BD0zsUGc.js} +1 -1
- package/dist/client/assets/{use-members-CcTYAvXH.js → use-members-CbUEMp3B.js} +1 -1
- package/dist/client/assets/{use-project-D_8V3WFM.js → use-project-BVkW8l1T.js} +1 -1
- package/dist/client/assets/{use-store-discovery-iIFblh2E.js → use-store-discovery-Dr1RNWE5.js} +1 -1
- package/dist/client/assets/{use-view-mode-BBlaOBUn.js → use-view-mode-DNywUlq7.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BnUWdVw5.js → use-virtual-mcp-BdGbK3Wg.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BKFOAK_4.js +1 -0
- package/dist/client/assets/{useMutation-oWI4nFQG.js → useMutation-BOcaN318.js} +1 -1
- package/dist/client/assets/useQuery-BrfnS-T_.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-XlSq2d-l.js +1 -0
- package/dist/client/assets/{user-BtGr8jKI.js → user-BdXDOTfV.js} +1 -1
- package/dist/client/assets/{workflow-CKtu7TZc.js → workflow-C2zJzxLb.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/{postgres-bytea/license → xtend/LICENSE} +1 -2
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/package.json +1 -1
- package/dist/client/assets/plugins-EgDqBTdv.js +0 -1
- package/dist/client/assets/tasks-B-KbBDgd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-KvMZbxSR.js +0 -1
- package/dist/client/assets/useQuery-CmP1G4DA.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-4eRk30PP.js +0 -1
- package/dist/server/node_modules/async-exit-hook/CHANGELOG.md +0 -62
- package/dist/server/node_modules/async-exit-hook/index.js +0 -171
- package/dist/server/node_modules/async-exit-hook/license +0 -21
- package/dist/server/node_modules/async-exit-hook/package.json +0 -66
- package/dist/server/node_modules/async-exit-hook/readme.md +0 -118
- package/dist/server/node_modules/pg-int8/LICENSE +0 -13
- package/dist/server/node_modules/pg-int8/README.md +0 -16
- package/dist/server/node_modules/pg-int8/index.js +0 -100
- package/dist/server/node_modules/pg-int8/package.json +0 -24
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
- package/dist/server/node_modules/postgres-interval/index.js +0 -125
- package/dist/server/node_modules/postgres-interval/license +0 -21
- package/dist/server/node_modules/postgres-interval/package.json +0 -36
- package/dist/server/node_modules/postgres-interval/readme.md +0 -48
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) 2014-2021, Matteo Collina <hello@matteocollina.com>
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
6
|
-
copyright notice and this permission notice appear in all copies.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
9
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
10
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
11
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
12
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
13
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
14
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
'use strict'
|
|
18
|
-
|
|
19
|
-
const { Transform } = require('stream')
|
|
20
|
-
const { StringDecoder } = require('string_decoder')
|
|
21
|
-
const kLast = Symbol('last')
|
|
22
|
-
const kDecoder = Symbol('decoder')
|
|
23
|
-
|
|
24
|
-
function transform (chunk, enc, cb) {
|
|
25
|
-
let list
|
|
26
|
-
if (this.overflow) { // Line buffer is full. Skip to start of next line.
|
|
27
|
-
const buf = this[kDecoder].write(chunk)
|
|
28
|
-
list = buf.split(this.matcher)
|
|
29
|
-
|
|
30
|
-
if (list.length === 1) return cb() // Line ending not found. Discard entire chunk.
|
|
31
|
-
|
|
32
|
-
// Line ending found. Discard trailing fragment of previous line and reset overflow state.
|
|
33
|
-
list.shift()
|
|
34
|
-
this.overflow = false
|
|
35
|
-
} else {
|
|
36
|
-
this[kLast] += this[kDecoder].write(chunk)
|
|
37
|
-
list = this[kLast].split(this.matcher)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
this[kLast] = list.pop()
|
|
41
|
-
|
|
42
|
-
for (let i = 0; i < list.length; i++) {
|
|
43
|
-
try {
|
|
44
|
-
push(this, this.mapper(list[i]))
|
|
45
|
-
} catch (error) {
|
|
46
|
-
return cb(error)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
this.overflow = this[kLast].length > this.maxLength
|
|
51
|
-
if (this.overflow && !this.skipOverflow) {
|
|
52
|
-
cb(new Error('maximum buffer reached'))
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
cb()
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function flush (cb) {
|
|
60
|
-
// forward any gibberish left in there
|
|
61
|
-
this[kLast] += this[kDecoder].end()
|
|
62
|
-
|
|
63
|
-
if (this[kLast]) {
|
|
64
|
-
try {
|
|
65
|
-
push(this, this.mapper(this[kLast]))
|
|
66
|
-
} catch (error) {
|
|
67
|
-
return cb(error)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
cb()
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function push (self, val) {
|
|
75
|
-
if (val !== undefined) {
|
|
76
|
-
self.push(val)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function noop (incoming) {
|
|
81
|
-
return incoming
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function split (matcher, mapper, options) {
|
|
85
|
-
// Set defaults for any arguments not supplied.
|
|
86
|
-
matcher = matcher || /\r?\n/
|
|
87
|
-
mapper = mapper || noop
|
|
88
|
-
options = options || {}
|
|
89
|
-
|
|
90
|
-
// Test arguments explicitly.
|
|
91
|
-
switch (arguments.length) {
|
|
92
|
-
case 1:
|
|
93
|
-
// If mapper is only argument.
|
|
94
|
-
if (typeof matcher === 'function') {
|
|
95
|
-
mapper = matcher
|
|
96
|
-
matcher = /\r?\n/
|
|
97
|
-
// If options is only argument.
|
|
98
|
-
} else if (typeof matcher === 'object' && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
|
|
99
|
-
options = matcher
|
|
100
|
-
matcher = /\r?\n/
|
|
101
|
-
}
|
|
102
|
-
break
|
|
103
|
-
|
|
104
|
-
case 2:
|
|
105
|
-
// If mapper and options are arguments.
|
|
106
|
-
if (typeof matcher === 'function') {
|
|
107
|
-
options = mapper
|
|
108
|
-
mapper = matcher
|
|
109
|
-
matcher = /\r?\n/
|
|
110
|
-
// If matcher and options are arguments.
|
|
111
|
-
} else if (typeof mapper === 'object') {
|
|
112
|
-
options = mapper
|
|
113
|
-
mapper = noop
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
options = Object.assign({}, options)
|
|
118
|
-
options.autoDestroy = true
|
|
119
|
-
options.transform = transform
|
|
120
|
-
options.flush = flush
|
|
121
|
-
options.readableObjectMode = true
|
|
122
|
-
|
|
123
|
-
const stream = new Transform(options)
|
|
124
|
-
|
|
125
|
-
stream[kLast] = ''
|
|
126
|
-
stream[kDecoder] = new StringDecoder('utf8')
|
|
127
|
-
stream.matcher = matcher
|
|
128
|
-
stream.mapper = mapper
|
|
129
|
-
stream.maxLength = options.maxLength
|
|
130
|
-
stream.skipOverflow = options.skipOverflow || false
|
|
131
|
-
stream.overflow = false
|
|
132
|
-
stream._destroy = function (err, cb) {
|
|
133
|
-
// Weird Node v12 bug that we need to work around
|
|
134
|
-
this._writableState.errorEmitted = false
|
|
135
|
-
cb(err)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return stream
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
module.exports = split
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "split2",
|
|
3
|
-
"version": "4.2.0",
|
|
4
|
-
"description": "split a Text Stream into a Line Stream, using Stream 3",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"lint": "standard --verbose",
|
|
8
|
-
"unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test.js",
|
|
9
|
-
"coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js",
|
|
10
|
-
"test:report": "npm run lint && npm run unit:report",
|
|
11
|
-
"test": "npm run lint && npm run unit",
|
|
12
|
-
"legacy": "tape test.js"
|
|
13
|
-
},
|
|
14
|
-
"pre-commit": [
|
|
15
|
-
"test"
|
|
16
|
-
],
|
|
17
|
-
"website": "https://github.com/mcollina/split2",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/mcollina/split2.git"
|
|
21
|
-
},
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "http://github.com/mcollina/split2/issues"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": ">= 10.x"
|
|
27
|
-
},
|
|
28
|
-
"author": "Matteo Collina <hello@matteocollina.com>",
|
|
29
|
-
"license": "ISC",
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"binary-split": "^1.0.3",
|
|
32
|
-
"callback-stream": "^1.1.0",
|
|
33
|
-
"fastbench": "^1.0.0",
|
|
34
|
-
"nyc": "^15.0.1",
|
|
35
|
-
"pre-commit": "^1.1.2",
|
|
36
|
-
"standard": "^17.0.0",
|
|
37
|
-
"tape": "^5.0.0"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const test = require('tape')
|
|
4
|
-
const split = require('./')
|
|
5
|
-
const callback = require('callback-stream')
|
|
6
|
-
const strcb = callback.bind(null, { decodeStrings: false })
|
|
7
|
-
const objcb = callback.bind(null, { objectMode: true })
|
|
8
|
-
|
|
9
|
-
test('split two lines on end', function (t) {
|
|
10
|
-
t.plan(2)
|
|
11
|
-
|
|
12
|
-
const input = split()
|
|
13
|
-
|
|
14
|
-
input.pipe(strcb(function (err, list) {
|
|
15
|
-
t.error(err)
|
|
16
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
17
|
-
}))
|
|
18
|
-
|
|
19
|
-
input.end('hello\nworld')
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
test('split two lines on two writes', function (t) {
|
|
23
|
-
t.plan(2)
|
|
24
|
-
|
|
25
|
-
const input = split()
|
|
26
|
-
|
|
27
|
-
input.pipe(strcb(function (err, list) {
|
|
28
|
-
t.error(err)
|
|
29
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
30
|
-
}))
|
|
31
|
-
|
|
32
|
-
input.write('hello')
|
|
33
|
-
input.write('\nworld')
|
|
34
|
-
input.end()
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
test('split four lines on three writes', function (t) {
|
|
38
|
-
t.plan(2)
|
|
39
|
-
|
|
40
|
-
const input = split()
|
|
41
|
-
|
|
42
|
-
input.pipe(strcb(function (err, list) {
|
|
43
|
-
t.error(err)
|
|
44
|
-
t.deepEqual(list, ['hello', 'world', 'bye', 'world'])
|
|
45
|
-
}))
|
|
46
|
-
|
|
47
|
-
input.write('hello\nwor')
|
|
48
|
-
input.write('ld\nbye\nwo')
|
|
49
|
-
input.write('rld')
|
|
50
|
-
input.end()
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
test('accumulate multiple writes', function (t) {
|
|
54
|
-
t.plan(2)
|
|
55
|
-
|
|
56
|
-
const input = split()
|
|
57
|
-
|
|
58
|
-
input.pipe(strcb(function (err, list) {
|
|
59
|
-
t.error(err)
|
|
60
|
-
t.deepEqual(list, ['helloworld'])
|
|
61
|
-
}))
|
|
62
|
-
|
|
63
|
-
input.write('hello')
|
|
64
|
-
input.write('world')
|
|
65
|
-
input.end()
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
test('split using a custom string matcher', function (t) {
|
|
69
|
-
t.plan(2)
|
|
70
|
-
|
|
71
|
-
const input = split('~')
|
|
72
|
-
|
|
73
|
-
input.pipe(strcb(function (err, list) {
|
|
74
|
-
t.error(err)
|
|
75
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
76
|
-
}))
|
|
77
|
-
|
|
78
|
-
input.end('hello~world')
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
test('split using a custom regexp matcher', function (t) {
|
|
82
|
-
t.plan(2)
|
|
83
|
-
|
|
84
|
-
const input = split(/~/)
|
|
85
|
-
|
|
86
|
-
input.pipe(strcb(function (err, list) {
|
|
87
|
-
t.error(err)
|
|
88
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
89
|
-
}))
|
|
90
|
-
|
|
91
|
-
input.end('hello~world')
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
test('support an option argument', function (t) {
|
|
95
|
-
t.plan(2)
|
|
96
|
-
|
|
97
|
-
const input = split({ highWaterMark: 2 })
|
|
98
|
-
|
|
99
|
-
input.pipe(strcb(function (err, list) {
|
|
100
|
-
t.error(err)
|
|
101
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
102
|
-
}))
|
|
103
|
-
|
|
104
|
-
input.end('hello\nworld')
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
test('support a mapper function', function (t) {
|
|
108
|
-
t.plan(2)
|
|
109
|
-
|
|
110
|
-
const a = { a: '42' }
|
|
111
|
-
const b = { b: '24' }
|
|
112
|
-
|
|
113
|
-
const input = split(JSON.parse)
|
|
114
|
-
|
|
115
|
-
input.pipe(objcb(function (err, list) {
|
|
116
|
-
t.error(err)
|
|
117
|
-
t.deepEqual(list, [a, b])
|
|
118
|
-
}))
|
|
119
|
-
|
|
120
|
-
input.write(JSON.stringify(a))
|
|
121
|
-
input.write('\n')
|
|
122
|
-
input.end(JSON.stringify(b))
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
test('split lines windows-style', function (t) {
|
|
126
|
-
t.plan(2)
|
|
127
|
-
|
|
128
|
-
const input = split()
|
|
129
|
-
|
|
130
|
-
input.pipe(strcb(function (err, list) {
|
|
131
|
-
t.error(err)
|
|
132
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
133
|
-
}))
|
|
134
|
-
|
|
135
|
-
input.end('hello\r\nworld')
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
test('splits a buffer', function (t) {
|
|
139
|
-
t.plan(2)
|
|
140
|
-
|
|
141
|
-
const input = split()
|
|
142
|
-
|
|
143
|
-
input.pipe(strcb(function (err, list) {
|
|
144
|
-
t.error(err)
|
|
145
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
146
|
-
}))
|
|
147
|
-
|
|
148
|
-
input.end(Buffer.from('hello\nworld'))
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
test('do not end on undefined', function (t) {
|
|
152
|
-
t.plan(2)
|
|
153
|
-
|
|
154
|
-
const input = split(function (line) { })
|
|
155
|
-
|
|
156
|
-
input.pipe(strcb(function (err, list) {
|
|
157
|
-
t.error(err)
|
|
158
|
-
t.deepEqual(list, [])
|
|
159
|
-
}))
|
|
160
|
-
|
|
161
|
-
input.end(Buffer.from('hello\nworld'))
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
test('has destroy method', function (t) {
|
|
165
|
-
t.plan(1)
|
|
166
|
-
|
|
167
|
-
const input = split(function (line) { })
|
|
168
|
-
|
|
169
|
-
input.on('close', function () {
|
|
170
|
-
t.ok(true, 'close emitted')
|
|
171
|
-
t.end()
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
input.destroy()
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
test('support custom matcher and mapper', function (t) {
|
|
178
|
-
t.plan(4)
|
|
179
|
-
|
|
180
|
-
const a = { a: '42' }
|
|
181
|
-
const b = { b: '24' }
|
|
182
|
-
const input = split('~', JSON.parse)
|
|
183
|
-
|
|
184
|
-
t.equal(input.matcher, '~')
|
|
185
|
-
t.equal(typeof input.mapper, 'function')
|
|
186
|
-
|
|
187
|
-
input.pipe(objcb(function (err, list) {
|
|
188
|
-
t.notOk(err, 'no errors')
|
|
189
|
-
t.deepEqual(list, [a, b])
|
|
190
|
-
}))
|
|
191
|
-
|
|
192
|
-
input.write(JSON.stringify(a))
|
|
193
|
-
input.write('~')
|
|
194
|
-
input.end(JSON.stringify(b))
|
|
195
|
-
})
|
|
196
|
-
|
|
197
|
-
test('support custom matcher and options', function (t) {
|
|
198
|
-
t.plan(6)
|
|
199
|
-
|
|
200
|
-
const input = split('~', { highWaterMark: 1024 })
|
|
201
|
-
|
|
202
|
-
t.equal(input.matcher, '~')
|
|
203
|
-
t.equal(typeof input.mapper, 'function')
|
|
204
|
-
t.equal(input._readableState.highWaterMark, 1024)
|
|
205
|
-
t.equal(input._writableState.highWaterMark, 1024)
|
|
206
|
-
|
|
207
|
-
input.pipe(strcb(function (err, list) {
|
|
208
|
-
t.error(err)
|
|
209
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
210
|
-
}))
|
|
211
|
-
|
|
212
|
-
input.end('hello~world')
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
test('support mapper and options', function (t) {
|
|
216
|
-
t.plan(6)
|
|
217
|
-
|
|
218
|
-
const a = { a: '42' }
|
|
219
|
-
const b = { b: '24' }
|
|
220
|
-
const input = split(JSON.parse, { highWaterMark: 1024 })
|
|
221
|
-
|
|
222
|
-
t.ok(input.matcher instanceof RegExp, 'matcher is RegExp')
|
|
223
|
-
t.equal(typeof input.mapper, 'function')
|
|
224
|
-
t.equal(input._readableState.highWaterMark, 1024)
|
|
225
|
-
t.equal(input._writableState.highWaterMark, 1024)
|
|
226
|
-
|
|
227
|
-
input.pipe(objcb(function (err, list) {
|
|
228
|
-
t.error(err)
|
|
229
|
-
t.deepEqual(list, [a, b])
|
|
230
|
-
}))
|
|
231
|
-
|
|
232
|
-
input.write(JSON.stringify(a))
|
|
233
|
-
input.write('\n')
|
|
234
|
-
input.end(JSON.stringify(b))
|
|
235
|
-
})
|
|
236
|
-
|
|
237
|
-
test('split utf8 chars', function (t) {
|
|
238
|
-
t.plan(2)
|
|
239
|
-
|
|
240
|
-
const input = split()
|
|
241
|
-
|
|
242
|
-
input.pipe(strcb(function (err, list) {
|
|
243
|
-
t.error(err)
|
|
244
|
-
t.deepEqual(list, ['烫烫烫', '锟斤拷'])
|
|
245
|
-
}))
|
|
246
|
-
|
|
247
|
-
const buf = Buffer.from('烫烫烫\r\n锟斤拷', 'utf8')
|
|
248
|
-
for (let i = 0; i < buf.length; ++i) {
|
|
249
|
-
input.write(buf.slice(i, i + 1))
|
|
250
|
-
}
|
|
251
|
-
input.end()
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
test('split utf8 chars 2by2', function (t) {
|
|
255
|
-
t.plan(2)
|
|
256
|
-
|
|
257
|
-
const input = split()
|
|
258
|
-
|
|
259
|
-
input.pipe(strcb(function (err, list) {
|
|
260
|
-
t.error(err)
|
|
261
|
-
t.deepEqual(list, ['烫烫烫', '烫烫烫'])
|
|
262
|
-
}))
|
|
263
|
-
|
|
264
|
-
const str = '烫烫烫\r\n烫烫烫'
|
|
265
|
-
const buf = Buffer.from(str, 'utf8')
|
|
266
|
-
for (let i = 0; i < buf.length; i += 2) {
|
|
267
|
-
input.write(buf.slice(i, i + 2))
|
|
268
|
-
}
|
|
269
|
-
input.end()
|
|
270
|
-
})
|
|
271
|
-
|
|
272
|
-
test('split lines when the \n comes at the end of a chunk', function (t) {
|
|
273
|
-
t.plan(2)
|
|
274
|
-
|
|
275
|
-
const input = split()
|
|
276
|
-
|
|
277
|
-
input.pipe(strcb(function (err, list) {
|
|
278
|
-
t.error(err)
|
|
279
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
280
|
-
}))
|
|
281
|
-
|
|
282
|
-
input.write('hello\n')
|
|
283
|
-
input.end('world')
|
|
284
|
-
})
|
|
285
|
-
|
|
286
|
-
test('truncated utf-8 char', function (t) {
|
|
287
|
-
t.plan(2)
|
|
288
|
-
|
|
289
|
-
const input = split()
|
|
290
|
-
|
|
291
|
-
input.pipe(strcb(function (err, list) {
|
|
292
|
-
t.error(err)
|
|
293
|
-
t.deepEqual(list, ['烫' + Buffer.from('e7', 'hex').toString()])
|
|
294
|
-
}))
|
|
295
|
-
|
|
296
|
-
const str = '烫烫'
|
|
297
|
-
const buf = Buffer.from(str, 'utf8')
|
|
298
|
-
|
|
299
|
-
input.write(buf.slice(0, 3))
|
|
300
|
-
input.end(buf.slice(3, 4))
|
|
301
|
-
})
|
|
302
|
-
|
|
303
|
-
test('maximum buffer limit', function (t) {
|
|
304
|
-
t.plan(1)
|
|
305
|
-
|
|
306
|
-
const input = split({ maxLength: 2 })
|
|
307
|
-
input.on('error', function (err) {
|
|
308
|
-
t.ok(err)
|
|
309
|
-
})
|
|
310
|
-
|
|
311
|
-
input.resume()
|
|
312
|
-
|
|
313
|
-
input.write('hey')
|
|
314
|
-
})
|
|
315
|
-
|
|
316
|
-
test('readable highWaterMark', function (t) {
|
|
317
|
-
const input = split()
|
|
318
|
-
t.equal(input._readableState.highWaterMark, 16)
|
|
319
|
-
t.end()
|
|
320
|
-
})
|
|
321
|
-
|
|
322
|
-
test('maxLength < chunk size', function (t) {
|
|
323
|
-
t.plan(2)
|
|
324
|
-
|
|
325
|
-
const input = split({ maxLength: 2 })
|
|
326
|
-
|
|
327
|
-
input.pipe(strcb(function (err, list) {
|
|
328
|
-
t.error(err)
|
|
329
|
-
t.deepEqual(list, ['a', 'b'])
|
|
330
|
-
}))
|
|
331
|
-
|
|
332
|
-
input.end('a\nb')
|
|
333
|
-
})
|
|
334
|
-
|
|
335
|
-
test('maximum buffer limit w/skip', function (t) {
|
|
336
|
-
t.plan(2)
|
|
337
|
-
|
|
338
|
-
const input = split({ maxLength: 2, skipOverflow: true })
|
|
339
|
-
|
|
340
|
-
input.pipe(strcb(function (err, list) {
|
|
341
|
-
t.error(err)
|
|
342
|
-
t.deepEqual(list, ['a', 'b', 'c'])
|
|
343
|
-
}))
|
|
344
|
-
|
|
345
|
-
input.write('a\n123')
|
|
346
|
-
input.write('456')
|
|
347
|
-
input.write('789\nb\nc')
|
|
348
|
-
input.end()
|
|
349
|
-
})
|
|
350
|
-
|
|
351
|
-
test("don't modify the options object", function (t) {
|
|
352
|
-
t.plan(2)
|
|
353
|
-
|
|
354
|
-
const options = {}
|
|
355
|
-
const input = split(options)
|
|
356
|
-
|
|
357
|
-
input.pipe(strcb(function (err, list) {
|
|
358
|
-
t.error(err)
|
|
359
|
-
t.same(options, {})
|
|
360
|
-
}))
|
|
361
|
-
|
|
362
|
-
input.end()
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
test('mapper throws flush', function (t) {
|
|
366
|
-
t.plan(1)
|
|
367
|
-
const error = new Error()
|
|
368
|
-
const input = split(function () {
|
|
369
|
-
throw error
|
|
370
|
-
})
|
|
371
|
-
|
|
372
|
-
input.on('error', (err, list) => {
|
|
373
|
-
t.same(err, error)
|
|
374
|
-
})
|
|
375
|
-
input.end('hello')
|
|
376
|
-
})
|
|
377
|
-
|
|
378
|
-
test('mapper throws on transform', function (t) {
|
|
379
|
-
t.plan(1)
|
|
380
|
-
|
|
381
|
-
const error = new Error()
|
|
382
|
-
const input = split(function (l) {
|
|
383
|
-
throw error
|
|
384
|
-
})
|
|
385
|
-
|
|
386
|
-
input.on('error', (err) => {
|
|
387
|
-
t.same(err, error)
|
|
388
|
-
})
|
|
389
|
-
input.write('a')
|
|
390
|
-
input.write('\n')
|
|
391
|
-
input.end('b')
|
|
392
|
-
})
|
|
393
|
-
|
|
394
|
-
test('supports Symbol.split', function (t) {
|
|
395
|
-
t.plan(2)
|
|
396
|
-
|
|
397
|
-
const input = split({
|
|
398
|
-
[Symbol.split] (str) {
|
|
399
|
-
return str.split('~')
|
|
400
|
-
}
|
|
401
|
-
})
|
|
402
|
-
|
|
403
|
-
input.pipe(strcb(function (err, list) {
|
|
404
|
-
t.error(err)
|
|
405
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
406
|
-
}))
|
|
407
|
-
|
|
408
|
-
input.end('hello~world')
|
|
409
|
-
})
|