Skip to content

Instantly share code, notes, and snippets.

View daybrush's full-sized avatar
😀
HAHAHAHAHAHA

Daybrush (Younkue Choi) daybrush

😀
HAHAHAHAHAHA
View GitHub Profile
@daybrush
daybrush / assign.js
Last active October 4, 2018 10:33
assign extend dulplicate
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
var Scene_extends = (undefined && undefined.__extends) || (function () {
// Duplicate code
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
exports.TRANSFORM = "transform";
exports.ANIMATION = "animation";
exports.DIRECTION_LEFT = 1;
exports.ALTERNATE_REVERSE = "alternate-reverse";
}),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
/* harmony import */ var _consts = __webpack_require__(0);
!function(t,e){"object"==typeof exports&&"object"==typeof module?
module.exports=e():"function"==typeof define&&define.amd?define("Scene",[],e):"object"==typeof exports?
exports.Scene=e():t.Scene=e()}(window,function(){
return function(t){
var e={};function r(i){
if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}
return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.r=
function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?
function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){
return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e);var i={};
@daybrush
daybrush / rollup_bundle.js
Created October 4, 2018 10:58
rollup_bundle
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():
"function"==typeof define&&define.amd?define(e):t.Scene=e()}(this,function(){
@daybrush
daybrush / ast.js
Last active October 7, 2018 09:12
babel/parser
import {parse} from "@babel/parser";
const code = `function a(b) {
const c = 1;
}`;
const ast = parse(code, {
sourceType: "module"
});
@daybrush
daybrush / class.js
Last active October 7, 2018 13:08
class transpile
Class Item {
a() {}
b() {}
c() {}
}
// tsc transpile
var Item = /*#__PURE__*/ function () {
function Item() {}
Item.prototype.a = function () {}
@daybrush
daybrush / prototypeminify.js
Last active October 7, 2018 13:07
prototypeminify.js
var Item = /*#__PURE__*/ function () {
function Item() {}
var __proto = Item.prototype;
__proto.a = function () {}
__proto.b = function () {}
__proto.c = function () {}
return Item;
}();
@daybrush
daybrush / traverse.js
Last active October 7, 2018 13:20
traverse
import traverse from "@babel/traverse";
traverse(ast, {
FunctionDeclaration: function (path) {
// path.node (FunctionDeclaration)
// path.node.id (Identifier)
console.log(path.node.id.name);
},
});
import t from "@babel/types";
left.object = t.identifier("__proto");