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
function newSamsungProduct() { | |
return $('apple').clone(); | |
} |
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
function jsonToJs(jsonStr) { | |
return jsonStr | |
.replace(/^(\s+)"(\w+\b)"/g, "$1$2") | |
.replace(/"(.+)"(,?$)/g, "'$1'$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
/* eslint-disable import/no-webpack-loader-syntax */ | |
import mapValues from 'lodash/mapValues'; | |
const style = require('sass-extract-loader!./colors.scss'); | |
function getSassValue(sassVar) { | |
const {type,value} = sassVar; | |
switch (type) { | |
case 'SassString': | |
case 'SassBoolean': |
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 { PureComponent } from 'react'; | |
/** | |
* PureComponent HOC. | |
* | |
* @param {Function} renderFn Stateless functional component | |
* @return {PureComponent} Component wrapped as PureComponent | |
*/ | |
module.exports = function asPureComponent(renderFn) { | |
const comp = class AsPureComponent extends PureComponent { |