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
{ | |
"bracketSpacing": true, | |
"semi": true, | |
"trailingComma": "es5", | |
"printWidth": 80, | |
"tab-width": 4, | |
"endOfLine": "lf", | |
"singleQuote": true, | |
"overrides": [ | |
{ |
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
{ | |
"Vue.js Component": { | |
"prefix": "vue-component", | |
"body": [ | |
"import { Vue, Component } from 'vue-property-decorator';", | |
"", | |
"@Component", | |
"export default class $1 extends Vue {", | |
"", | |
"}" |
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
$fw: (300, 400, 500, 700); | |
@each $w in $fw { | |
.fw-#{$w} { font-weight: $w !important; } | |
} |
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
// REM | |
@for $i from 10 through 25 { | |
.fs-#{$i} { | |
font-size: #{$i/16}rem !important; | |
} | |
} | |
// PX | |
@for $i from 10 through 25 { | |
.fs-#{$i} { |
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 _rgb2hex = ( orig ) => { | |
let rgb = orig.replace(/\s/g, '').match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i), | |
alpha = (rgb && rgb[4] || "").trim(), | |
hex = rgb ? | |
(rgb[1] | 1 << 8).toString(16).slice(1) + | |
(rgb[2] | 1 << 8).toString(16).slice(1) + | |
(rgb[3] | 1 << 8).toString(16).slice(1) : orig; | |
if ( alpha !== '' && alpha < 1 ) { | |
hex += ' ' + alpha; |
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 _uuidv4 = () => { | |
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => | |
(c ^ crypto.getRandomValues( new Uint8Array( 1 ) )[ 0 ] & 15 >> c / 4 ).toString( 16 ) | |
) | |
}; | |
export _uuidv4; |
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 _cloneObject = <T>( object: T ): T => { | |
return JSON.parse( JSON.stringify( object ) ); | |
} | |
export _cloneObject; |