Skip to content

Instantly share code, notes, and snippets.

View ArtemRomanovsky's full-sized avatar

ArtemRomanovsky

View GitHub Profile
function indexEqualsValue(a) {
let left = 0;
let right = a.length - 1;
let mid;
while (left != right) {
mid = Math.floor(((right - left) / 2) + left);
if (mid <= a[mid]) {
right = mid;
} else {
const direction = {{data}};
return Math.max(0, {{state.offSet}} + direction);
const allData = [...{{state.allData}}];
const page = {{state.offSet}};
const limit = {{state.limit}};
return allData.slice(page * limit, page * limit + limit);
return {{state.opportunities}}.filter(item => {
return ['Closed—lost', 'Closed—won'].includes(item.fields['Status']);
}).length;
const dataProduces = {{state.produces}};
const dataSnacks = {{state.snacks}};
const dataMeat = {{state.meat}};
const searchedData = {{data}};
if (!searchedData) {
return {produces:dataProduces, snacks:dataSnacks,meat:dataMeat};
}
function filter(item, value) {
return item.weight.toLowerCase().includes(value) || item.price.toLowerCase().includes(value) || item.product.toLowerCase().includes(value);
}
const items = {};
return {{result.data}}.map(item => {  
return {
value: item.name,
title: item.name,
};
}).filter(item => {
return items.hasOwnProperty(item.value) ? false : (items[item.value] = true);
});
{
id: {
title: 'ID',
filter: true
},
name: {
title: 'Name',
filter: {
<!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js -->
<!-- inject:js -->
<!-- js files will be automatically insert here -->
<!-- endinject -->
export const PagesRoutes:RouterConfig = [
{
path: 'pages',
component: Pages,
children: [
{
path: 'dashboard',
component: Dashboard,
data: {
export const PagesRoutes:RouterConfig = [
{
path: 'pages',
component: Pages,
children: [
{
path: 'dashboard',
component: Dashboard
},
{