mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
Set consistent browser titles
This commit is contained in:
parent
88b99979a9
commit
adef6dfffa
37 changed files with 140 additions and 117 deletions
27
gui/app/helpers/is-one-of.js
Normal file
27
gui/app/helpers/is-one-of.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
//
|
||||
// You can operate outside the AGPL restrictions by purchasing
|
||||
// Documize Enterprise Edition and obtaining a commercial license
|
||||
// by contacting <sales@documize.com>.
|
||||
//
|
||||
// https://documize.com
|
||||
|
||||
import { helper } from '@ember/component/helper';
|
||||
|
||||
export function isOneOf(params/*, hash*/) {
|
||||
if (is.not.undefined(params) || is.not.null(params)) {
|
||||
if (params.length >= 2) {
|
||||
let value = params[0];
|
||||
for (let i=1; i < params.length; i++) {
|
||||
if (params[i] == value) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export default helper(isOneOf);
|
Loading…
Add table
Add a link
Reference in a new issue