⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 string-tagcloud.js

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻 JS
📖 第 1 页 / 共 5 页
字号:
    Number.prototype.toJSONString = function () {        return isFinite(this) ? String(this) : 'null';    };    Object.prototype.toJSONString = function (w) {        var a = [],     // The array holding the partial texts.            k,          // The current key.            i,          // The loop counter.            v;          // The current value.        if (w) {            for (i = 0; i < w.length; i += 1) {                k = w[i];                if (typeof k === 'string') {                    v = this[k];                    switch (typeof v) {                    case 'object':                        if (v) {                            if (typeof v.toJSONString === 'function') {                                a.push(k.toJSONString() + ':' +                                       v.toJSONString(w));                            }                        } else {                            a.push(k.toJSONString() + ':null');                        }                        break;                    case 'string':                    case 'number':                    case 'boolean':                        a.push(k.toJSONString() + ':' + v.toJSONString());                    }                }            }        } else {            for (k in this) {                if (typeof k === 'string' &&                        Object.prototype.hasOwnProperty.apply(this, [k])) {                    v = this[k];                    switch (typeof v) {                    case 'object':

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -