Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// jscs: disable
import { A } from '@ember/array';
import { classify } from '@ember/string';
import { computed } from '@ember/object';
import { getOwner } from '@ember/application';
import { registerAsyncHelper } from '@ember/test';
import MediaService from 'ember-responsive/media';
MediaService.reopen({
// Change this if you want a different default breakpoint in tests.
_defaultBreakpoint: 'desktop',
_breakpointArr: computed('breakpoints', function() {
return Object.keys(this.get('breakpoints')) || A([]);
}),
_forceSetBreakpoint(breakpoint) {
let found = false;
const props = {};
this.get('_breakpointArr').forEach(function(bp) {
const val = bp === breakpoint;
if (val) {
found = true;
}
import MediaService from 'ember-responsive/media';
import { getOwner } from '@ember/application';
import { computed } from '@ember/object';
import { A } from '@ember/array';
import { classify } from '@ember/string';
import { registerAsyncHelper } from '@ember/test';
MediaService.reopen({
// Change this if you want a different default breakpoint in tests.
_defaultBreakpoint: 'desktop',
_breakpointArr: computed('breakpoints', function() {
return Object.keys(this.get('breakpoints')) || A([]);
}),
_forceSetBreakpoint(breakpoint) {
let found = false;
const props = {};
this.get('_breakpointArr').forEach(function(bp) {
const val = bp === breakpoint;
if (val) {
found = true;
}
import { registerAsyncHelper } from '@ember/test';
import { A } from '@ember/array';
import { computed } from '@ember/object';
import { classify } from '@ember/string';
import { getOwner } from '@ember/application';
import MediaService from 'ember-responsive/media';
MediaService.reopen({
// Change this if you want a different default breakpoint in tests.
_defaultBreakpoint: 'desktop',
_breakpointArr: computed('breakpoints', function() {
return Object.keys(this.get('breakpoints')) || A([]);
}),
_forceSetBreakpoint(breakpoint) {
let found = false;
const props = {};
this.get('_breakpointArr').forEach(function(bp) {
const val = bp === breakpoint;
if (val) {
found = true;
}