made with esnextbin
Created
October 25, 2016 14:57
-
-
Save aledoroshenko/d2a51e531d0c5d2760bbe02d86b489fd to your computer and use it in GitHub Desktop.
esnextbin sketch
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>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
<div class="ncc-grid-block secondary-nac-block jstest"></div> | |
</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 _ from 'lodash'; | |
function needForceClear(element) { | |
var $element = $(element); | |
return _.some(_.map( | |
['ncc-grid-block', 'secondary-nav-block', 'customer-header']), | |
$element.hasClass.bind($element) | |
) | |
} | |
console.log(needForceClear(undefined)); |
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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependecies": { | |
"lodash": "~4.14.1", | |
"expect": "~1.20.2", | |
"jquery": "~3.1.1" | |
}, | |
"dependencies": { | |
"jquery": "3.1.1", | |
"lodash": "4.16.4" | |
} | |
} |
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
'use strict'; | |
var _jquery = require('jquery'); | |
var _jquery2 = _interopRequireDefault(_jquery); | |
var _lodash = require('lodash'); | |
var _lodash2 = _interopRequireDefault(_lodash); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function needForceClear(element) { | |
var $element = (0, _jquery2.default)(element); | |
return _lodash2.default.some(_lodash2.default.map(['ncc-grid-block', 'secondary-nav-block', 'customer-header']), $element.hasClass.bind($element)); | |
} | |
console.log(needForceClear(undefined)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment