From 5400d17989140fb835a3a7ec70d9dbe01ccb30f9 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 17 Mar 2022 19:22:46 +0800 Subject: [PATCH] u --- js/lib/core.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/lib/core.js b/js/lib/core.js index 8c307e6..4f96d94 100644 --- a/js/lib/core.js +++ b/js/lib/core.js @@ -18,6 +18,19 @@ if (!String.prototype.size) { return tmp[n] } }) + Object.defineProperty(String.prototype, 'split16', { + value(pipe) { + if (pipe === '') { + var tmp = [] + for (let it of this) { + tmp.push(it) + } + return tmp + } else { + return this.split(pipe) + } + } + }) } export class Enum {