- プリミティブ
- Number
- String
- Boolean
- null
- undefined
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
| import { describe, expect, it, vi } from 'vitest'; | |
| import { screen } from '@testing-library/react'; | |
| import { useRouter } from 'next-router-mock'; | |
| import { setup } from '@/utils/testtool/'; | |
| import { BaseLink } from './BaseLink'; | |
| import { dummyUrl } from '@/dummy'; | |
| describe('BaseLink', () => { | |
| vi.mock( | |
| 'next/link', |
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
| // go:build ignore | |
| package main | |
| import ( | |
| "database/sql" | |
| "flag" | |
| "fmt" | |
| "go/format" | |
| "os" |
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
| process.stdin.setEncoding("utf8"); | |
| /************************************************ | |
| * Basic Inputs Snippets | |
| ************************************************/ | |
| // 2 3 などの入力を分解する | |
| const input_split = (arr, divider = ' ') => { | |
| return arr.split(divider); | |
| }; |
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
| ## gh-pagesブランチを生やしてビルド生成物をホスティング | |
| ## .github/workflow/main.yamlで保存 | |
| name: gh-page deploy | |
| on: | |
| push: | |
| branches: | |
| - master # main or master |
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
| let button = null; | |
| let permissionGranted = false; | |
| // デバイスをチェック | |
| function DeviceVersionCheck() { | |
| const IS_IOS_13 = | |
| typeof DeviceOrientationEvent !== 'undefined' && | |
| typeof DeviceOrientationEvent.requestPermission === 'function'; | |
| if (IS_IOS_13 && !permissionGranted) { | |
| button = createButton('click'); |
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
| import firebase from 'firebase/app'; | |
| import 'firebase/firestore'; | |
| import store from '@/store/index.js'; | |
| let DB = firebase.firestore(); | |
| // ローカルの時刻は、ズレがあるのでサーバ時刻を使用 | |
| const TIME_STAMP = firebase.firestore.FieldValue.serverTimestamp(); | |
| // インクリメント(同時書き換えを気にしなくていい) | |
| const INCREMENT = firebase.firestore.FieldValue.increment(1); |
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
| 'use strict' | |
| process.env.NODE_ENV = 'production' | |
| const { say } = require('cfonts') | |
| const chalk = require('chalk') | |
| const del = require('del') | |
| const { spawn } = require('child_process') | |
| const webpack = require('webpack') | |
| // 参照:(https://github.com/codekirei/node-multispinner/pull/5#issuecomment-524008337) |
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
| module.exports = { | |
| //対象のファイル | |
| entry:{main: ./src/index.js}, | |
| //出力オプション(出力は``dist/js/main.js``になる) | |
| output: { | |
| filename: 'js/[name].js', | |
| path: path.resolve(__dirname, 'dist') | |
| }, | |
| module: { | |
| rules: [ |
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 { | |
| watch:{ | |
| data:{ | |
| handler:function(val) { | |
| this.renderChart(this.data, this.options); | |
| }, | |
| deep:true | |
| } | |
| } | |
| } |