This file contains 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
import { Pipe, PipeTransform } from "@angular/core"; | |
@Pipe({name: "postPositionPipe"}) | |
export class PostPositionPipe implements PipeTransform { | |
private readonly CHAR_CODE_가 = 44032; | |
private readonly CHAR_CODE_힣 = 55203; | |
private isKoreanCharCode(charCode: number): boolean { | |
return charCode >= this.CHAR_CODE_가 && charCode <= this.CHAR_CODE_힣; | |
} |
This file contains 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 setMockDate() { | |
class MockedDate extends Date { | |
constructor(...args) { | |
const [firstArg, ...restArgs] = args; | |
firstArg === undefined | |
? super("2020-09-01T12:00:00.000+09:00", ...restArgs) | |
: super(...args); | |
} | |
} | |
const {Date: ProperDate} = globalThis; |
This file contains 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
main(); | |
async function main() { | |
const [jasmines, jests] = await Promise.all([parseJasmine(), parseJest()]); | |
[jasmines, jests].forEach(mutateSorted); | |
createTable({jasmines, jests}); | |
} | |
async function parseJasmine() { | |
const results = await Promise.all( |
This file contains 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 { | |
bind, | |
update, | |
}; | |
const debouncedAutoRowsHandler = debounce(autoRowsHandler); | |
function bind(el, binding) { | |
if (!(el instanceof HTMLTextAreaElement)) { | |
throw new TypeError("element should be instance of HTMLTextAreaElement"); |
This file contains 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
polyfill(); | |
const browser = (() => { | |
let cantRotate = null; | |
return { | |
get cantRotate() { | |
return new Promise(async (resolve, reject) => { | |
if (cantRotate === null) { | |
try { | |
const image = Object.assign(new Image(), { |
This file contains 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
async function parseOrientation(blob) { | |
const APP1_MARKER = 0xffe1; | |
const EXIF_HEADER = Array.from("Exif") | |
.map((c) => c.charCodeAt()) | |
.reverse() | |
.reduce( | |
(accumulator, charCode, index) => | |
accumulator + charCode * 16 ** (index * 2) | |
); | |
const INTEL_BYTE_ALIGN = 0x4949; |
This file contains 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 new Proxy({}, { | |
set(target, property, value) { | |
if (property === 'render') { | |
target[property] = function (h, vm) { | |
return value(h, vm); | |
}; | |
} else { | |
target[property] = value; | |
} | |
return value; |
This file contains 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
#!/bin/bash | |
git config --system alias.a "!git add . && git status" && | |
git config --system alias.aa "!git add . && git add -u . && git status" && | |
git config --system alias.ac "!git add . && git commit" && | |
git config --system alias.acm "!git add . && git commit -m" && | |
git config --system alias.alias "!git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\ => \2/' | sort" && | |
git config --system alias.au "!git add -u . && git status" && | |
git config --system alias.c "commit" && | |
git config --system alias.ca "commit --amend" && | |
git config --system alias.cm "commit -m" && |
This file contains 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 _ = { | |
uniq: require("lodash/uniq"), | |
unzip: require("lodash/unzip") | |
}; | |
module.exports.decompileRoutePath = function decompileRoutePath(paths, ids) { | |
const parsedPaths = paths.map(path => | |
path.replace(/^\/+|\/+$/g, "").split("/") | |
); | |
if ( |
NewerOlder