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

tickbin-filter-parser

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tickbin-filter-parser

parse tickbin string filters into filter functions

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
2
Weekly downloads
 
Created
Source

Build Status

A simple first pass parser to take strings that look like "#tag1 and #tag2 Jan - Feb" and convert them to strings (with the date portion extracted out) so that they can be recombined in such a way that jouch can use them to generate a tickbin specific couch db 2.0 query selector.

Install

npm install tickbin-filter-parser

Usage

import parse from 'tickbin-filter-parser'

const {parsed, dates} = parse('#dog or #cat Jan - Feb')
// parsed = "tags has '#dog' or tags has '#cat'
// dates = [{
//  start: Date('2016-01-01'), 
//  end: Date('2016-02-29'), 
//  text: '(startArr >= [2016,0,1,0,0,0,0] and startArr <= [2016,1,29,23,59,59,999])'
// ]}

Building

npm install
npm test
npm run build

Copyright © 2016, MemoryLeaf Media Inc.

Lead Maintainer: Jonathan Bowers

FAQs

Package last updated on 15 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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