7f85300245ac76dc28c61a1cddf125959eb576b7
[platform/upstream/nodejs.git] / deps / npm / man / man3 / npm-search.3
1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
3 .
4 .TH "NPM\-SEARCH" "3" "November 2013" "" ""
5 .
6 .SH "NAME"
7 \fBnpm-search\fR \-\- Search for packages
8 .
9 .SH "SYNOPSIS"
10 .
11 .nf
12 npm\.commands\.search(searchTerms, [silent,] [staleness,] callback)
13 .
14 .fi
15 .
16 .SH "DESCRIPTION"
17 Search the registry for packages matching the search terms\. The available parameters are:
18 .
19 .IP "\(bu" 4
20 searchTerms:
21 Array of search terms\. These terms are case\-insensitive\.
22 .
23 .IP "\(bu" 4
24 silent:
25 If true, npm will not log anything to the console\.
26 .
27 .IP "\(bu" 4
28 staleness:
29 This is the threshold for stale packages\. "Fresh" packages are not refreshed
30 from the registry\. This value is measured in seconds\.
31 .
32 .IP "\(bu" 4
33 callback:
34 Returns an object where each key is the name of a package, and the value
35 is information about that package along with a \'words\' property, which is
36 a space\-delimited string of all of the interesting words in that package\.
37 The only properties included are those that are searched, which generally include:
38 .
39 .IP "\(bu" 4
40 name
41 .
42 .IP "\(bu" 4
43 description
44 .
45 .IP "\(bu" 4
46 maintainers
47 .
48 .IP "\(bu" 4
49 url
50 .
51 .IP "\(bu" 4
52 keywords
53 .
54 .IP "" 0
55
56 .
57 .IP "" 0
58 .
59 .P
60 A search on the registry excludes any result that does not match all of the
61 search terms\. It also removes any items from the results that contain an
62 excluded term (the "searchexclude" config)\. The search is case insensitive
63 and doesn\'t try to read your mind (it doesn\'t do any verb tense matching or the
64 like)\.