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

gql

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gql - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

8

index.js

@@ -87,10 +87,8 @@ var roughMatch = require('./lib/genotypeMatch');

exact: function(k, v){
if (typeof v !== 'string' && v !== null) {
throw new Error('exact can only check for strings or null');
if (typeof v !== 'string') {
throw new Error('exact can only check for strings');
}
return function(data){
var snp = data[k];
if (!snp) return false
if (snp.genotype === v) return true
return roughMatch(snp.genotype, v);
return !!(snp && snp.genotype && roughMatch(snp.genotype, v));
};

@@ -97,0 +95,0 @@ },

{
"name": "gql",
"description": "Query language for interpreting genome SNPs",
"version": "1.1.1",
"version": "1.1.2",
"homepage": "http://github.com/genomejs/gql",

@@ -6,0 +6,0 @@ "repository": "git://github.com/genomejs/gql.git",

@@ -25,2 +25,4 @@ [![Build Status](https://travis-ci.org/genomejs/gql.png?branch=master)](https://travis-ci.org/genomejs/gql)

Just a reminder: deletions are represented as `-`!
## Usage

@@ -68,8 +70,2 @@

To test for deletions, check for null:
```javascript
q.exact('rs2032651', null);
```
#### has(id, genotype)

@@ -76,0 +72,0 @@

@@ -6,11 +6,2 @@ var gql = require('../');

describe('exact()', function() {
it('should match with null', function() {
var data = {
rs1234: {
genotype: null
}
};
var fn = gql.exact('rs1234', null);
fn(data).should.equal(true);
});
it('should match with two alleles', function() {

@@ -17,0 +8,0 @@ var data = {

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