This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a new Uint8Array based on two different ArrayBuffers | |
* | |
* @private | |
* @param {ArrayBuffers} buffer1 The first buffer. | |
* @param {ArrayBuffers} buffer2 The second buffer. | |
* @return {ArrayBuffers} The new ArrayBuffer created out of the two. | |
*/ | |
var _appendBuffer = function(buffer1, buffer2) { | |
var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"region": "Москва и Московская обл.", | |
"city": "Москва" | |
}, | |
{ | |
"region": "Москва и Московская обл.", | |
"city": "Абрамцево" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <[email protected]> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
// accelerating from zero velocity | |
easeInQuad: function (t) { return t*t }, | |
// decelerating to zero velocity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'), | |
browserSync = require('browser-sync'), | |
livereload = require('gulp-livereload'), | |
sourcemaps = require('gulp-sourcemaps'), | |
del = require('del'), | |
webpack = require('webpack-stream'), | |
gulpif = require('gulp-if'), | |
Sass = require('gulp-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cleanCSS = require('gulp-clean-css') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Utils { | |
static blob2base64(blob) { | |
return new Promise(resolve => { | |
let reader = new FileReader(); | |
reader.onload = e => resolve(e.target.result); | |
reader.readAsDataURL(blob); | |
}); | |
} | |
static StrBytes(str) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function window_close() { | |
let nw = window.open('', '_self'); | |
nw.close(); | |
} | |
let btn = document.querySelector('.close'); | |
btn.addEventListener('click', window_close); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(`%c vue-devtools %c ${123} %c `, "background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff", `background: #3BA776; padding: 1px; border-radius: 0 3px 3px 0; color: #fff`, "background:transparent") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const selectAll = x => [...document.querySelectorAll(x)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _extend(to, from) { | |
var i; | |
var toStr = Object.prototype.toString; | |
var astr = '[object Array]'; | |
to = to || {}; | |
for (i in from) { | |
if (from.hasOwnProperty(i)) { | |
if (typeof from[i] === 'object') { | |
to[i] = (toStr.call(from[i]) === astr) ? [] : {}; |