zoukankan      html  css  js  c++  java
  • 【Avalon】factory

    (function(global, factory) {
        if (typeof module === "object" && typeof module.exports === "object") {
            // For CommonJS and CommonJS-like environments where a proper `window`
            // is present, execute the factory and get avalon.
            // For environments that do not have a `window` with a `document`
            // (such as Node.js), expose a factory as module.exports.
            // This accentuates the need for the creation of a real `window`.
            // e.g. var avalon = require("avalon")(window);
            module.exports = global.document ? factory(global, true) : function(w) {
                if (!w.document) {
                    throw new Error("Avalon requires a window with a document")
                }
                return factory(w)
            }
        } else {
            factory(global)
        }
    }(typeof window != 'undefined' ? window : this, function(window, noGlobal) {
        var avalon = {}
        if (typeof define === "function" && define.amd) {
            define("avalon", [], function() {
                return avalon
            })
        }
    // Expose avalon identifiers, even in AMD
    // and CommonJS for browser emulators
        if (noGlobal === void 0) {
            window.avalon = avalon
        }
    
        return avalon
    }))
  • 相关阅读:
    selenium登录csdn,urllib抓取数据
    selenium登录12306,requests抓取数据
    加一
    最后一个单词的长度
    最大子序和
    搜索插入位置
    实现strStr()
    二分查找
    内存对齐
    is_pod类型
  • 原文地址:https://www.cnblogs.com/jzm17173/p/6186659.html
Copyright © 2011-2022 走看看