View firebase-pagination.js
const admin = require("./firebase-admin");
admin.initializeApp({
credential: **yourCredential**
databaseURL: **yourDatabaseURL**
});
const db = admin.database();
const dbPromise = (db_ref, options = {}) => {
const {
can_null,
View mide-pact.event.test.js
// 事件监听
var MP = require("../mind-pact");
var eve = new MP({});
[
"a",
"a.b",
"a.b2",
"a.b.c",
"a.b.c1",
"a.b.c2"
View index.html
<link rel="import" href="/bower_components/app-layout/app-drawer/app-drawer.html">
<link rel="import" href="/bower_components/app-layout/app-drawer-layout/app-drawer-layout.html">
<link rel="import" href="/bower_components/app-layout/app-header/app-header.html">
<link rel="import" href="/bower_components/app-layout/app-header-layout/app-header-layout.html">
<link rel="import" href="/bower_components/app-layout/app-scroll-effects/app-scroll-effects.html">
<link rel="import" href="/bower_components/app-layout/app-toolbar/app-toolbar.html">
<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="/bower_components/app-route/app-route.html">
<link rel="import" href="/bower_components/iron-pages/iron-pages.html">
<link rel="import" href="/bower_components/paper-button/paper-button.html">
View mind-pact.js
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['MP'], factory);
} else {
root.MP = factory(root.b);
}
}(this, function(__global) {
var QuotedString = /"(?:\.|(\\\")|[^\""\n])*"|'(?:\.|(\\\')|[^\''\n])*'/g, //引号字符串
$NULL = null,
$UNDEFINED,
View gist:76542bd6d0458a7126868d76837639d2
/**
* @author alteredq / http://alteredqualia.com/
*
* ShaderExtras currently contains:
*
* screen
* convolution
* film
* bokeh
* sepia
View GaussianBlur.js
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
define(["require", "exports"], function (require, exports) {
var GaussianBlur = (function (_super) {
__extends(GaussianBlur, _super);
function GaussianBlur() {
View assert_parseInt.js
const parseInt = require("./parseInt");
const assert = require("assert");
const assertEquals = assert.deepStrictEqual;
const assertTrue = assert.ok;
/*
* https://github.com/v8/v8/blob/01590d660d6c8602b616a82816c4aea2a251be63/test/mjsunit/parse-int-float.js
*/
assertEquals(0, parseInt('0'));
assertEquals(0, parseInt(' 0'));
assertEquals(0, parseInt(' 0 '));
View test_express_error_handle.js
/*
* 创建类似DB服务
*/
var net = require("net");
var server = net.createServer(function(c) {
console.log('DB-SERVER: client connected');
c.on('end', function() {
console.log('DB-SERVER: client disconnected');
});
c.on('data', function(chunk) {
View Conosle.js
require("./$.Date");
require("./$.Array");
require("./$.Object");
function Console() {
this.before = [];
this.date_format = "hh:mm:ss MM-DD";
this.timeMap = {};
};
var _console = global.console;
View setImmediate.js
// We use setImmediate or postMessage for our future callback.
var setImmediate = window.msSetImmediate;
// Use post message to emulate setImmediate.
if (!setImmediate) {
var setImmediateQueue = [];
var sentinel = String(Math.random());
window.addEventListener('message', function(e) {
if (e.data === sentinel) {
var queue = setImmediateQueue;