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
// *************************************** | |
// AnimatedTextFactory | |
// Factory gives you a custom element that accepts a text property. | |
// Each character of the text is wrapped in an element and appended as a child. | |
// You can achieve cool effects by combining css animation with props | |
// set on the child nodes. | |
// | |
// Usage | |
// <template> | |
// <text-stagger-animation-delay text="The ants go marching one by one."> |
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
const isFn = x => typeof x === 'function' | |
const plural = (words, count) => { | |
words = words.split('|').map(x => x.trim()) | |
return count > 1 ? words[2].replace('{n}', count) : words[count] | |
} | |
// Given a Vuelidate validations object, find the validator keys | |
export function extractValidatorKeys (validations, validators = []) { | |
const keys = Object.keys(validations) |
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
// ******************************************************************* | |
// ATTENTION | |
// This gist is now an npm module | |
// The API of some functions is altered slightly. | |
// All future work will happen in the repo. | |
// | |
// https://gitlab.com/rhythnic/vuex-intern | |
// ******************************************************************* | |
// ******************************************************************* |
NewerOlder