Hello all
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 class Str { | |
static slug(value, sep) { | |
var separator = sep || '-'; | |
value = Str.ascii(value); | |
var flip = separator == '-' ? '_' : '-'; | |
value = value.replace(new RegExp(Str.pregQuote(flip), 'g'), separator); |
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 { | |
install(Vue, options) { | |
Vue.directive('set-value', { | |
bind (el, binding, vnode, oldVnode) { | |
var model = vnode.data.directives.find(dir => dir.rawName === 'v-model'); | |
if (!model || !model.expression) { | |
console.error('[vue-set-value warn] The element does not have v-model'); | |
return; | |
} |
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
Hello world: Witaj świecie | |
"%d apple": | |
0: "%d jabłko" | |
1: "%d jabłka" | |
2: "%d jabłek" |
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
defmodule CodePoint do | |
def encode(character) when is_binary(character) do | |
[code_point] = String.to_charlist(character) | |
Integer.to_string(code_point, 16) | |
end | |
def decode(code_point) when is_binary(code_point) do | |
[String.to_integer(code_point, 16)] |> to_string | |
end |
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
@keyframes nodeInserted { | |
from { opacity: 0.99; } | |
to { opacity: 1; } | |
} | |
.elementToWatch { | |
animation-duration: 0.001s; | |
animation-name: nodeInserted; | |
} |
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
<template> | |
<div class="items-wrapper" v-bind:style="{ height: wrapperHeight + 'px' }"> | |
<div v-for="view of pool" | |
v-bind:key="view.index" | |
v-bind:style="{ transform: 'translateY(' + view.top + 'px) translateX(' + view.left + 'px)' }"> | |
<slot | |
v-bind:item="view.item" | |
v-bind:index="view.index" /> | |
</div> | |
<resize-observer v-on:notify="handleResize" /> |
I hereby claim:
- I am drozdzynski on github.
- I am drozdzynski (https://keybase.io/drozdzynski) on keybase.
- I have a public key ASC0ett-iH1TlW0fBNJpL_wfhkV8DBIMIP1jEIkcxf5-gAo
To claim this, I am signing this object: