README.md (6770B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2018 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # Process 22 23 [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url] 24 25 > Standard library process utilities. 26 27 <section class="installation"> 28 29 ## Installation 30 31 ```bash 32 npm install @stdlib/process 33 ``` 34 35 </section> 36 37 <section class="usage"> 38 39 ## Usage 40 41 ```javascript 42 var ns = require( '@stdlib/process' ); 43 ``` 44 45 #### ns 46 47 Standard library process utilities. 48 49 ```javascript 50 var proc = ns; 51 // returns {...} 52 ``` 53 54 The namespace contains process utilities: 55 56 <!-- <toc pattern="*"> --> 57 58 <div class="namespace-toc"> 59 60 - <span class="signature">[`ARGV`][@stdlib/process/argv]</span><span class="delimiter">: </span><span class="description">array containing command-line arguments passed when launching the calling process.</span> 61 - <span class="signature">[`chdir( path )`][@stdlib/process/chdir]</span><span class="delimiter">: </span><span class="description">change the current working directory.</span> 62 - <span class="signature">[`cwd()`][@stdlib/process/cwd]</span><span class="delimiter">: </span><span class="description">return the current working directory.</span> 63 - <span class="signature">[`ENV`][@stdlib/process/env]</span><span class="delimiter">: </span><span class="description">object containing the user environment.</span> 64 - <span class="signature">[`EXEC_PATH`][@stdlib/process/exec-path]</span><span class="delimiter">: </span><span class="description">absolute pathname of the executable which started the current Node.js process.</span> 65 - <span class="signature">[`getegid()`][@stdlib/process/getegid]</span><span class="delimiter">: </span><span class="description">return the effective numeric group identity of the calling process.</span> 66 - <span class="signature">[`geteuid()`][@stdlib/process/geteuid]</span><span class="delimiter">: </span><span class="description">return the effective numeric user identity of the calling process.</span> 67 - <span class="signature">[`getgid()`][@stdlib/process/getgid]</span><span class="delimiter">: </span><span class="description">return the numeric group identity of the calling process.</span> 68 - <span class="signature">[`getuid()`][@stdlib/process/getuid]</span><span class="delimiter">: </span><span class="description">return the numeric user identity of the calling process.</span> 69 - <span class="signature">[`NODE_VERSION`][@stdlib/process/node-version]</span><span class="delimiter">: </span><span class="description">node version.</span> 70 - <span class="signature">[`stdin( [encoding,] clbk )`][@stdlib/process/read-stdin]</span><span class="delimiter">: </span><span class="description">read data from `stdin`.</span> 71 - <span class="signature">[`umask( [mask,] [options] )`][@stdlib/process/umask]</span><span class="delimiter">: </span><span class="description">get/set the process mask.</span> 72 73 </div> 74 75 <!-- </toc> --> 76 77 </section> 78 79 <!-- /.usage --> 80 81 <section class="examples"> 82 83 ## Examples 84 85 <!-- TODO: better examples --> 86 87 <!-- eslint no-undef: "error" --> 88 89 ```javascript 90 var objectKeys = require( '@stdlib/utils/keys' ); 91 var ns = require( '@stdlib/process' ); 92 93 console.log( objectKeys( ns ) ); 94 ``` 95 96 </section> 97 98 <!-- /.examples --> 99 100 101 <section class="main-repo" > 102 103 * * * 104 105 ## Notice 106 107 This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. 108 109 For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. 110 111 #### Community 112 113 [![Chat][chat-image]][chat-url] 114 115 --- 116 117 ## License 118 119 See [LICENSE][stdlib-license]. 120 121 122 ## Copyright 123 124 Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors]. 125 126 </section> 127 128 <!-- /.stdlib --> 129 130 <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> 131 132 <section class="links"> 133 134 [npm-image]: http://img.shields.io/npm/v/@stdlib/process.svg 135 [npm-url]: https://npmjs.org/package/@stdlib/process 136 137 [test-image]: https://github.com/stdlib-js/process/actions/workflows/test.yml/badge.svg 138 [test-url]: https://github.com/stdlib-js/process/actions/workflows/test.yml 139 140 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/process/main.svg 141 [coverage-url]: https://codecov.io/github/stdlib-js/process?branch=main 142 143 [dependencies-image]: https://img.shields.io/david/stdlib-js/process.svg 144 [dependencies-url]: https://david-dm.org/stdlib-js/process/main 145 146 [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg 147 [chat-url]: https://gitter.im/stdlib-js/stdlib/ 148 149 [stdlib]: https://github.com/stdlib-js/stdlib 150 151 [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors 152 153 [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/process/main/LICENSE 154 155 <!-- <toc-links> --> 156 157 [@stdlib/process/argv]: https://www.npmjs.com/package/@stdlib/process/tree/main/argv 158 159 [@stdlib/process/chdir]: https://www.npmjs.com/package/@stdlib/process/tree/main/chdir 160 161 [@stdlib/process/cwd]: https://www.npmjs.com/package/@stdlib/process/tree/main/cwd 162 163 [@stdlib/process/env]: https://www.npmjs.com/package/@stdlib/process/tree/main/env 164 165 [@stdlib/process/exec-path]: https://www.npmjs.com/package/@stdlib/process/tree/main/exec-path 166 167 [@stdlib/process/getegid]: https://www.npmjs.com/package/@stdlib/process/tree/main/getegid 168 169 [@stdlib/process/geteuid]: https://www.npmjs.com/package/@stdlib/process/tree/main/geteuid 170 171 [@stdlib/process/getgid]: https://www.npmjs.com/package/@stdlib/process/tree/main/getgid 172 173 [@stdlib/process/getuid]: https://www.npmjs.com/package/@stdlib/process/tree/main/getuid 174 175 [@stdlib/process/node-version]: https://www.npmjs.com/package/@stdlib/process/tree/main/node-version 176 177 [@stdlib/process/read-stdin]: https://www.npmjs.com/package/@stdlib/process/tree/main/read-stdin 178 179 [@stdlib/process/umask]: https://www.npmjs.com/package/@stdlib/process/tree/main/umask 180 181 <!-- </toc-links> --> 182 183 </section> 184 185 <!-- /.links -->