Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aul

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aul - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

2

package.json
{
"name": "aul",
"version": "1.0.0",
"version": "1.0.1",
"description": "Elegant database queries executor",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -202,1 +202,2 @@ # AUL

[![](https://img.shields.io/badge/flattr-donate-yellow.svg)](https://flattr.com/profile/red_rabbit)

@@ -101,2 +101,17 @@ "use strict";

/**
* Helper function to return first element of result
*
* @param {Criteria|{}} criteria
*/
findOne(criteria) {
return this.execute(criteria)
.then(r => {
if (Array.isArray(r)) {
return r[0];
}
return r;
});
}
/**
* Build query by passed criteria and run it. Each filter can be defined as async await function or return Promise.

@@ -121,2 +136,3 @@ *

}
// TODO: check if results is array
return criteria.mappers.reduce((results, mapper) => {

@@ -123,0 +139,0 @@ if (typeof mapper === "function") {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc