@sajeel/google

2.2.0 • Public • Published

@sajeel/google

npm (scoped) npm bundle size (minified) dependencies version

A lightweight package boasting a simple but uncontroversially groundbreaking set of searching algorithms rivaling that of tech giant, Google.

Install

$ npm install @sajeel/google

Usage:

Instantiation

    var google = require('@sajeel/google');

Array Search

    var {positions, count, time} = google.search(["captain america", "thor", 
    "black widow", "captain america", "captain america", "iron man", "quicksilver", 
    "spiderman", "starlord", "captain america", "ant man", "dr. strange", "thanos", 
    "captain marvel", "gamora", "hulk", "nebula", "hawkeye", "vision", "scarlet witch"], 
    "captain america");

    console.log(`Captain America appears ${count} time(s) at indices ${positions.length 
    > 1 ? positions.splice(0, positions.length-1).join(", ") + ", and " + 
    positions[positions.length-1]: positions.join("")}. Your search took ${time}s 
    long to execute.`)
    // ==> Captain America appears 4 time(s) at indices 0, 3, 4, and 9. 
    //     Your search took 0.23s long to execute.

Online Search

    google.searchOnline("James Harden Beard");
    // Opens default browser with a Google search.

Dependents (0)

Package Sidebar

Install

npm i @sajeel/google

Weekly Downloads

0

Version

2.2.0

License

MIT

Unpacked Size

4 kB

Total Files

4

Last publish

Collaborators

  • sajeel