Skip to content

Instantly share code, notes, and snippets.

@aledoroshenko
Created October 25, 2016 14:57
Show Gist options
  • Save aledoroshenko/d2a51e531d0c5d2760bbe02d86b489fd to your computer and use it in GitHub Desktop.
Save aledoroshenko/d2a51e531d0c5d2760bbe02d86b489fd to your computer and use it in GitHub Desktop.
esnextbin sketch
<!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>
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));
{
"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"
}
}
'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