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 camelCaseToKebabCase = (value) => { | |
if (typeof value !== 'string') return value | |
return value.replace(/[A-Z]/g, (char, index, wholeValue) => { | |
return wholeValue[index] = `${index === 0 ? '' : '-'}${char.toLowerCase()}` | |
}) | |
} | |
const getStyles = (element) => { | |
const elementStyles = {} |
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
{ | |
"list": [ | |
{ | |
"id": "1", | |
"name": "Jane Doe", | |
"totalPoints": 157, | |
"clicks": 5 | |
}, | |
{ | |
"id": "2", |
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
// HOW TO USE IT | |
// just add a new file to your project directory | |
// change `BASE_DIR` -if needed- | |
// run `node upgrade-wdio-v5.js` | |
// then `git status` to see the changes | |
const fs = require('fs') | |
const BASE_DIR = 'ui-test/' |
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
import open from 'open'; | |
import express from 'express'; | |
import webpack from 'webpack'; | |
import config from './webpack.config.dev'; | |
import conf from './conf'; | |
/* eslint-disable no-console */ | |
const port = 3000; | |
const app = express(); |
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
{ | |
"data": | |
[ | |
{ | |
"id": 1, | |
"date": "27-2-2017", | |
"content": "This is my first Card content", | |
"title": "This is my first Card" | |
}, | |
{ |
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
{ | |
"results": [ | |
{ "title": "Lorem Ipsum is simply dummy text", | |
"images": | |
[ | |
"https://unsplash.it/458/354?image=1083", | |
"https://unsplash.it/458/354?image=877" | |
] | |
}, | |
{ "title": "Lorem Ipsum is simply dummy text", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
hi there | |
</body> | |
</html> |
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
import $ from 'jquery'; | |
import CONFIG from '../configs'; | |
import transText from './transText'; | |
/** | |
* Editable Field Utility | |
* @description | |
* Custom utility that is implementing an editable fields. | |
* @class EditableField | |
* @param options - Instance options |
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
var doc = "practice makes perfect. get perfect by practice. just practice!;"; | |
var wordCountEngine = { | |
init: function (doc) { | |
var newDoc = this.removePunctuation(doc); | |
newDoc = newDoc.split(" "); | |
var cleanDoc = newDoc; | |
newDoc = this.getSolidDoc(newDoc); |
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
var original = $location.path; | |
$location.path = function (path, reload) { | |
if (reload === false) { | |
var lastRoute = $route.current; | |
var un = $rootScope.$on('$locationChangeSuccess', function () { | |
$route.current = lastRoute; | |
un(); | |
}); | |
} | |
return original.apply($location, [path]); |
NewerOlder