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

abstract-search

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-search

[![NPM](https://nodei.co/npm/abstract-search.png)](https://nodei.co/npm/abstract-search/)

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

A search interface for requesting http pages from websites.

API

searcher = search([opts])

A search portal, for example CKAN, will have various instances deployed across the web.

Options

uri: the location. will be optional and default to the canonical deployment (e.g., figshare) or might be required depending on the type of search host.

version: can be helpful if in case the search api has changed between versions.

timeout: if supplied, the search is stopped after a particular amount of time.

stream = searcher.stream(query)

Returns a stream that emits results of a query.

Options

A query is an object to be interpreted by the consumer.

Specify fulltext to do a simple fulltext search. For example,

var query = {
  `fulltext`: 'this is my query'
}

stream.on('data')

Return search results as objects. Each emit of data should be an array of results.

searcher.url

String. A consumer should be able to access the url as a property.

searcher.version

String.

searcher.name

String.

searcher.auth(credentials)

The user should be able to define credentials that the searcher is uses for running queries.

FAQs

Package last updated on 25 Sep 2015

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