@helenejs/data
Advanced tools
Comparing version 1.3.7 to 1.4.0
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.removeExpiredDocuments = exports.checkIndexesFromMostToLeast = void 0; | ||
exports.checkIndexesFromMostToLeast = checkIndexesFromMostToLeast; | ||
exports.removeExpiredDocuments = removeExpiredDocuments; | ||
const isDate_1 = __importDefault(require("lodash/isDate")); | ||
@@ -52,3 +53,2 @@ const isObject_1 = __importDefault(require("lodash/isObject")); | ||
} | ||
exports.checkIndexesFromMostToLeast = checkIndexesFromMostToLeast; | ||
async function removeExpiredDocuments(docs, dontExpireStaleDocs) { | ||
@@ -82,3 +82,2 @@ if (dontExpireStaleDocs) { | ||
} | ||
exports.removeExpiredDocuments = removeExpiredDocuments; | ||
//# sourceMappingURL=_get-candidates.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.append = exports.defaultCheckValueEquality = exports.defaultCompareKeysFunction = exports.getRandomArray = void 0; | ||
exports.getRandomArray = getRandomArray; | ||
exports.defaultCompareKeysFunction = defaultCompareKeysFunction; | ||
exports.defaultCheckValueEquality = defaultCheckValueEquality; | ||
exports.append = append; | ||
/** | ||
@@ -19,3 +22,2 @@ * Return an array with the numbers from 0 to n-1, in a random order | ||
} | ||
exports.getRandomArray = getRandomArray; | ||
/* | ||
@@ -39,3 +41,2 @@ * Default compareKeys function will work for numbers, strings and dates | ||
} | ||
exports.defaultCompareKeysFunction = defaultCompareKeysFunction; | ||
/** | ||
@@ -47,3 +48,2 @@ * Check whether two values are equal (used in non-unique deletion) | ||
} | ||
exports.defaultCheckValueEquality = defaultCheckValueEquality; | ||
function append(array, toAppend) { | ||
@@ -55,3 +55,2 @@ let i; | ||
} | ||
exports.append = append; | ||
//# sourceMappingURL=utils.js.map |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createCollection = exports.Collection = exports.CollectionEvent = void 0; | ||
exports.Collection = exports.CollectionEvent = void 0; | ||
exports.createCollection = createCollection; | ||
const indexes_1 = require("./indexes"); | ||
@@ -466,3 +467,2 @@ const defer_1 = __importDefault(require("lodash/defer")); | ||
} | ||
exports.createCollection = createCollection; | ||
//# sourceMappingURL=collection.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.uid = void 0; | ||
exports.uid = uid; | ||
function randomBytes(size) { | ||
@@ -63,3 +63,2 @@ const bytes = new Array(size); | ||
} | ||
exports.uid = uid; | ||
//# sourceMappingURL=custom-utils.js.map |
@@ -12,3 +12,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.match = exports.areComparable = exports.areThingsEqual = exports.getDotValue = exports.modify = exports.compareThings = exports.isPrimitiveType = exports.deepCopy = exports.checkObject = exports.checkKey = void 0; | ||
exports.checkKey = checkKey; | ||
exports.checkObject = checkObject; | ||
exports.deepCopy = deepCopy; | ||
exports.isPrimitiveType = isPrimitiveType; | ||
exports.compareThings = compareThings; | ||
exports.modify = modify; | ||
exports.getDotValue = getDotValue; | ||
exports.areThingsEqual = areThingsEqual; | ||
exports.areComparable = areComparable; | ||
exports.match = match; | ||
const isArray_1 = __importDefault(require("lodash/isArray")); | ||
@@ -52,3 +61,2 @@ const isDate_1 = __importDefault(require("lodash/isDate")); | ||
} | ||
exports.checkKey = checkKey; | ||
/** | ||
@@ -71,3 +79,2 @@ * Check a DB object and throw an error if it's not valid | ||
} | ||
exports.checkObject = checkObject; | ||
/** | ||
@@ -104,3 +111,2 @@ * Deep copy a DB object | ||
} | ||
exports.deepCopy = deepCopy; | ||
/** | ||
@@ -118,3 +124,2 @@ * Tells if an object is a primitive type or a "real" object | ||
} | ||
exports.isPrimitiveType = isPrimitiveType; | ||
/** | ||
@@ -220,3 +225,2 @@ * Utility functions for comparing things | ||
} | ||
exports.compareThings = compareThings; | ||
// ============================================================== | ||
@@ -299,3 +303,2 @@ // Updating documents | ||
} | ||
exports.modify = modify; | ||
// ============================================================== | ||
@@ -338,3 +341,2 @@ // Finding documents | ||
} | ||
exports.getDotValue = getDotValue; | ||
/** | ||
@@ -392,3 +394,2 @@ * Check whether 'things' are equal | ||
} | ||
exports.areThingsEqual = areThingsEqual; | ||
/** | ||
@@ -408,3 +409,2 @@ * Check that two values are comparable | ||
} | ||
exports.areComparable = areComparable; | ||
/** | ||
@@ -444,3 +444,2 @@ * Tell if a given document matches a query | ||
} | ||
exports.match = match; | ||
/** | ||
@@ -447,0 +446,0 @@ * Match an object against a specific { key: value } part of a query |
@@ -6,3 +6,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.flushToStorage = exports.ensureDatafileIntegrity = exports.ensureFileDoesntExist = void 0; | ||
exports.ensureFileDoesntExist = ensureFileDoesntExist; | ||
exports.ensureDatafileIntegrity = ensureDatafileIntegrity; | ||
exports.flushToStorage = flushToStorage; | ||
const fs_1 = __importDefault(require("fs")); | ||
@@ -13,3 +15,2 @@ async function ensureFileDoesntExist(filename) { | ||
} | ||
exports.ensureFileDoesntExist = ensureFileDoesntExist; | ||
async function ensureDatafileIntegrity(filename) { | ||
@@ -28,3 +29,2 @@ const tempFilename = filename + '~'; | ||
} | ||
exports.ensureDatafileIntegrity = ensureDatafileIntegrity; | ||
async function flushToStorage(options) { | ||
@@ -49,3 +49,2 @@ let filename, flags; | ||
} | ||
exports.flushToStorage = flushToStorage; | ||
//# sourceMappingURL=utils.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.queueOperation = void 0; | ||
exports.queueOperation = queueOperation; | ||
const operations = []; | ||
@@ -36,3 +36,2 @@ let running = false; | ||
} | ||
exports.queueOperation = queueOperation; | ||
//# sourceMappingURL=op-queue.js.map |
@@ -7,4 +7,2 @@ /** | ||
*/ | ||
/// <reference types="node" /> | ||
/// <reference types="lodash" /> | ||
import { Collection } from './collection'; | ||
@@ -11,0 +9,0 @@ import { IStorage } from './types'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deserialize = exports.serialize = void 0; | ||
exports.serialize = serialize; | ||
exports.deserialize = deserialize; | ||
const model_1 = require("./model"); | ||
@@ -30,3 +31,2 @@ /** | ||
} | ||
exports.serialize = serialize; | ||
/** | ||
@@ -53,3 +53,2 @@ * From a one-line representation of an object generate by the serialize function | ||
} | ||
exports.deserialize = deserialize; | ||
//# sourceMappingURL=serialization.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pluck = void 0; | ||
exports.pluck = pluck; | ||
function pluck(array, key) { | ||
return array.map(o => o[key]); | ||
} | ||
exports.pluck = pluck; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@helenejs/data", | ||
"version": "1.3.7", | ||
"version": "1.4.0", | ||
"description": "Real-time Web Apps for Node.js", | ||
@@ -24,3 +24,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"typescript": "^5.1.3" | ||
"typescript": "^5.5.4" | ||
}, | ||
@@ -51,3 +51,3 @@ "author": "Leonardo Venturini", | ||
}, | ||
"gitHead": "000046924588d55be6f38b1d616ab2bd9133e7d1" | ||
"gitHead": "cd4725ccde170bd080ce42a3c4ec85a544628445" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244607
3988