Ответы пользователя по тегу JavaScript
  • JS. Как открыть js скрипт в удобной для редактирования форме?

    ShadowKing
    @ShadowKing
    Tech Lead of Java Back End project
    Код в спойлере + в коментарии продолжение. Ибо слишком длинный.

    spoiler
    function r(e, t) {
        if (!i.canUseDOM || t && !("addEventListener" in document)) return !1;
        var n = "on" + e,
            r = n in document;
        if (!r) {
            var a = document.createElement("div");
            a.setAttribute(n, "return;"), r = "function" == typeof a[n]
        }
        return !r && o && "wheel" === e && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r
    }
    var o, i = n(63);
    i.canUseDOM && (o = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0), e.exports = r
    },
    function(e, t) {
        "use strict";
    
        function n(e, t) {
            var n = null === e || e === !1,
                r = null === t || t === !1;
            if (n || r) return n === r;
            var o = typeof e,
                i = typeof t;
            return "string" === o || "number" === o ? "string" === i || "number" === i : "object" === i && e.type === t.type && e.key === t.key
        }
        e.exports = n
    },
    function(e, t, n) {
        "use strict";
        var r = (n(27), n(54)),
            o = (n(30), r);
        e.exports = o
    },
    function(e, t, n) {
        (function(t, r, o) {
                "use strict";
    
                function i(e) {
                    var t = this;
                    this.next = null, this.entry = null, this.finish = function() {
                        I(t, e)
                    }
                }
    
                function a(e) {
                    return M.from(e)
                }
    
                function s(e) {
                    return M.isBuffer(e) || e instanceof F
                }
    
                function l() {}
    
                function u(e, t) {
                    k = k || n(165), e = e || {}, this.objectMode = !!e.objectMode, t instanceof k && (this.objectMode = this.objectMode || !!e.writableObjectMode);
                    var r = e.highWaterMark,
                        o = this.objectMode ? 16 : 16384;
                    this.highWaterMark = r || 0 === r ? r : o, this.highWaterMark = Math.floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
                    var a = e.decodeStrings === !1;
                    this.decodeStrings = !a, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(e) {
                        v(t, e)
                    }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new i(this)
                }
    
                function c(e) {
                    return k = k || n(165), L.call(c, this) || this instanceof k ? (this._writableState = new u(e, this), this.writable = !0, e && ("function" == typeof e.write && (this._write = e.write), "function" == typeof e.writev && (this._writev = e.writev), "function" == typeof e.destroy && (this._destroy = e.destroy), "function" == typeof e.final && (this._final = e.final)), void N.call(this)) : new c(e)
                }
    
                function f(e, t) {
                    var n = new Error("write after end");
                    e.emit("error", n), T(t, n)
                }
    
                function d(e, t, n, r) {
                    var o = !0,
                        i = !1;
                    return null === n ? i = new TypeError("May not write null values to stream") : "string" == typeof n || void 0 === n || t.objectMode || (i = new TypeError("Invalid non-string/buffer chunk")), i && (e.emit("error", i), T(r, i), o = !1), o
                }
    
                function m(e, t, n) {
                    return e.objectMode || e.decodeStrings === !1 || "string" != typeof t || (t = M.from(t, n)), t
                }
    
                function p(e, t, n, r, o, i) {
                    if (!n) {
                        var a = m(t, r, o);
                        r !== a && (n = !0, o = "buffer", r = a)
                    }
                    var s = t.objectMode ? 1 : r.length;
                    t.length += s;
                    var l = t.length < t.highWaterMark;
                    if (l || (t.needDrain = !0), t.writing || t.corked) {
                        var u = t.lastBufferedRequest;
                        t.lastBufferedRequest = {
                            chunk: r,
                            encoding: o,
                            isBuf: n,
                            callback: i,
                            next: null
                        }, u ? u.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1
                    } else h(e, t, !1, s, r, o, i);
                    return l
                }
    
                function h(e, t, n, r, o, i, a) {
                    t.writelen = r, t.writecb = a, t.writing = !0, t.sync = !0, n ? e._writev(o, t.onwrite) : e._write(o, i, t.onwrite), t.sync = !1
                }
    
                function g(e, t, n, r, o) {
                    --t.pendingcb, n ? (T(o, r), T(S, e, t), e._writableState.errorEmitted = !0, e.emit("error", r)) : (o(r), e._writableState.errorEmitted = !0, e.emit("error", r), S(e, t))
                }
    Ответ написан
  • Бывают ли такие вакансии на рынке: Javascript разработчик без умения верстать?

    ShadowKing
    @ShadowKing
    Tech Lead of Java Back End project
    Без умения верстки только в Node.JS дорога. Да и то, базовые навыки понадобятся. Во Front-End части HTML + CSS обязательны :(
    Ответ написан