@base-cms/utils
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-beta.1
{ | ||
"name": "@base-cms/utils", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-beta.1", | ||
"description": "Utility functions for JavaScript projects.", | ||
@@ -16,3 +16,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "1bca843ac62d981ce0f7c8fc6fb9f6fc775f872e" | ||
"gitHead": "e1cae56a1f67b7d003dd96934dce975b4a7e39cf" | ||
} |
@@ -8,2 +8,3 @@ const getDefaultContentTypes = require('./get-default-content-types'); | ||
contentTypes = [], | ||
excludeContentTypes = [], | ||
since, | ||
@@ -15,5 +16,10 @@ } = {}) => { | ||
const type = { $in: types }; | ||
if (isArray(excludeContentTypes) && excludeContentTypes.length) { | ||
type.$nin = excludeContentTypes; | ||
} | ||
const query = { | ||
status: 1, | ||
type: { $in: types }, | ||
type, | ||
published: { $lte: date }, | ||
@@ -20,0 +26,0 @@ $and: [ |
6563
201