An entity for react-router-dom to pass router props to components directly under Switch.
import { RouteProps } from 'react-router-dom';
interface IEntrance extends RouteProps {}
export default class IndexedDB { | |
constructor(dbName, dbVersion, stores) { | |
this.db; | |
this.dbName = dbName; | |
this.dbVersion = dbVersion; | |
this.stores = stores; | |
} | |
openDB(callback=(()=>{})) { | |
if (!window.indexedDB) { |
function removeDuplicates(nums: number[]): number { | |
if (nums.length == 0) return 0; | |
let current = 0; | |
for (let index = 0; index <= nums.length - 1; index++){ | |
if (nums[current] !== nums[index]){ | |
current++; | |
nums[current] = nums[index] | |
} | |
} |
image: node:13.10.1 | |
stages: | |
- deploy | |
deploy: | |
stage: deploy | |
only: ['tags'] | |
script: | |
- echo CI_PROJECT_ID $CI_PROJECT_ID |
{ | |
"name": "@group/project", | |
"private": false, | |
"repository": { | |
"type": "git", | |
"url": "https://gitlab.example.tw/group/project" | |
}, | |
"version": "1.0.0", | |
"publishConfig": { | |
"@group:registry": "https://gitlab.example.tw/api/v4/projects/1/packages/npm/" |
image: node:13.10.1 | |
stages: | |
- build | |
build: | |
before_script: | |
- apt-get update; apt-get install gettext-base git -y | |
script: | |
- mv .env .env.tmp; envsubst < .env.tmp > .env |
{ | |
"scripts": { | |
"host-uat": "env-cmd -f .env.uat npm run build && firebase deploy --only hosting:uat", | |
"host-prod": "env-cmd -f .env.production npm run build && firebase deploy --only hosting:production" | |
} | |
} |
/** | |
* Create and maintain classes with [BEM](http://getbem.com/). | |
* @since Feature | |
*/ | |
export default class BEM { | |
private _block: string; | |
private elementArray: string[]; | |
private modifierArray: string[]; | |
private _record: { [element: string]: string[] }; |