UNPKG

589 BJavaScriptView Raw
1/*!
2 * A MongoDB inspired ES6 Map() query language. - Copyright (c) 2017 Louis T. (https://lou.ist/)
3 * Licensed under MIT license https://raw.githubusercontent.com/LouisT/MapQL/master/LICENSE
4 */
5'use strict';
6const MapQL = require('../'),
7 ChainManager = require('../src/ChainManager');
8
9/*
10 * Add the chain() function to MapQL to allow for chained queries.
11 * {Instance}.chain().gt('foo', 5).lt('bar', 100).execute();
12 */
13MapQL.prototype.chain = function () {
14 return new ChainManager(this);
15}
16
17module.exports = (typeof window !== 'undefined' ? window : {}).MapQL = MapQL;
18