npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cloogle-js

v1.0.2

Published

TypeScript client for Cloogle

Downloads

2

Readme

cloogle-js

TypeScript library for querying the Clean language search engine, Cloogle.

The types definition for the API are derived automatically from the one defined in Clean by Cloogle.

To install use npm i cloogle-js

Table of contents

Namespaces

Functions

Functions

cloogle_url_of_BasicResult

cloogle_url_of_BasicResult(res: BasicResult): object

Parameters:

Name | Type | Description | ------ | ------ | ------ | res | BasicResult | a BasicResult object |

Returns: object

Name | Type | ------ | ------ | dcl | URL | icl | URL |

returns URLs to view in cloogle res's _i_mplementation (icl) or _d_eclaration (dcl)

Defined in: main.ts:114


modulepath_of_filename

Constmodulepath_of_filename(filename: string): string

Parameters:

Name | Type | Description | ------ | ------ | ------ | filename | string | a Clean filename |

Returns: string

returns it's module path

Defined in: main.ts:107


query

query(req: Request): Promise<Either<Errors, Response>>

Parameters:

Name | Type | ------ | ------ | req | Request |

Returns: Promise<Either<Errors, Response>>

returns either a validation error, or a Response from Cloogle

Defined in: main.ts:99


query_no_validation

query_no_validation(req: Request): Promise<any>

Parameters:

Name | Type | ------ | ------ | req | Request |

Returns: Promise<any>

returns Cloogle's unprocessed, unvalidated response

Defined in: main.ts:91


raw_query

raw_query(parameters: string): Promise<Either<Errors, Response>>

Parameters:

Name | Type | Description | ------ | ------ | ------ | parameters | string | a string that represent the endpoint to be queried |

Returns: Promise<Either<Errors, Response>>

returns either a validation error, or a Response from Cloogle

Defined in: main.ts:83


raw_query_no_validation

raw_query_no_validation(parameters: string): Promise<any>

Parameters:

Name | Type | Description | ------ | ------ | ------ | parameters | string | a string that represent the endpoint to be queried |

Returns: Promise<any>

returns Cloogle's unprocessed, unvalidated response

Defined in: main.ts:73


string_of_Result

string_of_Result(r: Result): string

Parameters:

Name | Type | Description | ------ | ------ | ------ | r | Result | a Cloogle result |

Returns: string

a "short" string that sums up the information held by r

Defined in: main.ts:132


stringifyRequest

stringifyRequest(r: Request): string

Parameters:

Name | Type | ------ | ------ | r | Request |

Returns: string

the endpoint to the Cloogle API for request

Defined in: main.ts:45


strings_of_Response

strings_of_Response(r: Response): string[]

Parameters:

Name | Type | Description | ------ | ------ | ------ | r | Response | a Cloogle response |

Returns: string[]

a list of "short" strings that sums up informations held in r.data

Defined in: main.ts:155