### json5 Development Setup Commands Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/json5/README.md Outlines the standard shell commands required to set up the development environment for contributing to the json5 repository, including cloning, installing dependencies, running tests, and linting. ```shell git clone https://github.com/json5/json5 cd json5 npm install ``` ```shell npm test ``` ```shell npm run lint ``` -------------------------------- ### Launch Edge with Starting URL using Node.js Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/chromium-edge-launcher/README.md This JavaScript example shows the basic usage of the `chromium-edge-launcher` library's `.launch()` method. It launches a Microsoft Edge instance, navigating it to a specified starting URL, and logs the debugging port once the browser is ready. ```JavaScript const EdgeLauncher = require('chromium-edge-launcher'); EdgeLauncher.launch({ startingUrl: 'https://google.com' }).then(edge => { console.log(`Edge debugging port running on ${edge.port}`); }); ``` -------------------------------- ### Installing Babel Preset TypeScript with npm (sh) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/preset-typescript/README.md This command installs the `@babel/preset-typescript` package using npm. The `--save-dev` flag adds it as a development dependency to the project's package.json file. It requires npm to be installed and initialized in a project directory. ```sh npm install --save-dev @babel/preset-typescript ``` -------------------------------- ### Defining Multiple Commands and Options with Commander.js JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/terser/node_modules/commander/Readme.md Provides a comprehensive example of defining multiple commands (`setup`, `exec`, `*` for unknown commands) with their own options, descriptions, aliases, and action functions. It also shows how to add command-specific help text. ```javascript var program = require('commander'); program .version('0.1.0') .option('-C, --chdir ', 'change the working directory') .option('-c, --config ', 'set config path. defaults to ./deploy.conf') .option('-T, --no-tests', 'ignore test hook'); program .command('setup [env]') .description('run setup commands for all envs') .option("-s, --setup_mode [mode]", "Which setup mode to use") .action(function(env, options){ var mode = options.setup_mode || "normal"; env = env || 'all'; console.log('setup for %s env(s) with %s mode', env, mode); }); program .command('exec ') .alias('ex') .description('execute the given remote cmd') .option("-e, --exec_mode ", "Which exec mode to use") .action(function(cmd, options){ console.log('exec "%s" using %s mode', cmd, options.exec_mode); }).on('--help', function() { console.log(''); console.log('Examples:'); console.log(''); console.log(' $ deploy exec sequential'); console.log(' $ deploy exec async'); }); program .command('*') .action(function(env){ console.log('deploying "%s"', env); }); program.parse(process.argv); ``` -------------------------------- ### Installing Babel Preset TypeScript with yarn (sh) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/preset-typescript/README.md This command installs the `@babel/preset-typescript` package using yarn. The `--dev` flag adds it as a development dependency to the project's package.json file. It requires yarn to be installed and initialized in a project directory. ```sh yarn add @babel/preset-typescript --dev ``` -------------------------------- ### Travis CI Configuration for Chrome Launcher Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/chrome-launcher/README.md Example .travis.yml configuration snippet showing how to install Chrome via the Travis addon or download script, set environment variables like CHROME_PATH, and start a virtual framebuffer (Xvfb) for running Chrome in a headless CI environment. ```YAML language: node_js install: - yarn install before_script: - export DISPLAY=:99.0 - export CHROME_PATH="$(pwd)/chrome-linux/chrome" - sh -e /etc/init.d/xvfb start - sleep 3 # wait for xvfb to boot addons: chrome: stable ``` -------------------------------- ### Installing pretty-format via Yarn Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/pretty-format/README.md This snippet shows the command to install the `pretty-format` library using the Yarn package manager. It's a prerequisite for using the library in a project. Requires Yarn to be installed. Input is running the command in a terminal; output is the successful installation of the package. ```sh $ yarn add pretty-format ``` -------------------------------- ### Installing Acorn via npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/acorn/README.md Provides the command-line instruction to install the Acorn parser using the npm package manager. This is the easiest way to get Acorn. ```Shell npm install acorn ``` -------------------------------- ### Installing Acorn from Source (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/acorn/README.md Provides command-line steps to clone the Acorn repository from GitHub, navigate into the directory, and install dependencies to build from source. Requires Git and npm installed. ```Shell git clone https://github.com/acornjs/acorn.git cd acorn npm install ``` -------------------------------- ### Installing StackTrace-Parser using npm (Bash) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/stacktrace-parser/README.md This snippet provides the command line instruction to install the stacktrace-parser library using the npm package manager. It is a prerequisite for using the library in a Node.js or front-end project setup with npm. ```Bash npm install stacktrace-parser ``` -------------------------------- ### Requiring Promise Library for Examples (JavaScript) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/promise/Readme.md Standard setup for using the promise library, requiring the main module before demonstrating various API methods in the following sections. ```JavaScript var Promise = require('promise'); ``` -------------------------------- ### Installing Babel Plugin with npm Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/plugin-syntax-async-generators/README.md Installs the @babel/plugin-syntax-async-generators package using npm. The `--save-dev` flag ensures it is added as a development dependency in the project's package.json file. Requires npm to be installed and a package.json file in the current directory. ```sh npm install --save-dev @babel/plugin-syntax-async-generators ``` -------------------------------- ### semver Command-Line Interface Usage Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/semver/README.md Displays the help output for the semver CLI tool, listing available options like range matching, incrementing, prerelease handling, coercion, and loose parsing. Demonstrates how to get help from the utility. Requires the semver CLI to be installed (usually comes with the npm package). ```bash $ semver -h A JavaScript implementation of the https://semver.org/ specification Copyright Isaac Z. Schlueter Usage: semver [options] [ [...]] Prints valid versions sorted by SemVer precedence Options: -r --range Print versions that match the specified range. -i --increment [] Increment a version by the specified level. Level can be one of: major, minor, patch, premajor, preminor, prepatch, or prerelease. Default level is 'patch'. Only one version may be specified. --preid Identifier to be used to prefix premajor, preminor, prepatch or prerelease version increments. -l --loose Interpret versions and ranges loosely -p --include-prerelease Always include prerelease versions in range matching -c --coerce Coerce a string into SemVer if possible (does not imply --loose) --rtl Coerce version strings right to left --ltr Coerce version strings left to right (default) Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. If no satisfying versions are found, then exits failure. Versions are printed in ascending order, so supplying multiple versions to the utility will just sort them. ``` -------------------------------- ### Installing accepts Package - Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/accepts/README.md Installs the 'accepts' module using the npm package manager. This command downloads the package from the npm registry and adds it to the project's dependencies or installs it globally. ```Shell $ npm install accepts ``` -------------------------------- ### Installing regexpu-core via npm (Bash) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/regexpu-core/README.md This command installs the regexpu-core library as a project dependency using npm. ```Bash npm install regexpu-core --save ``` -------------------------------- ### Installing VLQ Library via Package Managers Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/vlq/README.md This snippet shows how to install the vlq.js library using popular package managers, npm and bower. Ensure you have either npm or bower installed on your system to use these commands. ```bash npm install vlq ``` ```bash bower install vlq ``` -------------------------------- ### Install Babel Preset with npm Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/babel-preset-current-node-syntax/README.md This command shows how to install the `babel-preset-current-node-syntax` package as a development dependency using the npm package manager. This is the standard installation method for npm-based projects. ```shell npm install --save-dev babel-preset-current-node-syntax ``` -------------------------------- ### Installing Babel Plugin with yarn Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/plugin-syntax-async-generators/README.md Adds the @babel/plugin-syntax-async-generators package using yarn. The `--dev` flag includes it as a development dependency in the project's package.json file. Requires yarn to be installed and a package.json file in the current directory. ```sh yarn add @babel/plugin-syntax-async-generators --dev ``` -------------------------------- ### Starting Server using app.listen (Node.js) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/connect/README.md Connect provides a convenience method `app.listen()` which internally creates a Node.js HTTP server and calls its `listen` method. This is the simplest way to start the server and have it begin accepting connections on a specified port. ```javascript var server = app.listen(port); ``` -------------------------------- ### Installing dependencies and running tests (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/normalize-path/README.md Use this command sequence to install the project's dependencies and then execute its test suite. This is a standard way to verify the library's functionality locally. ```sh npm install && npm test ``` -------------------------------- ### Install Package with npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/helper-optimise-call-expression/README.md This command installs the @babel/helper-optimise-call-expression package as a production dependency using npm. It adds the package to the project's package.json file and installs it into the node_modules directory. Requires npm installed. ```sh npm install --save @babel/helper-optimise-call-expression ``` -------------------------------- ### Building documentation with verb (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/normalize-path/README.md This command installs the `verb` documentation generation tool globally along with its helper, then runs `verb` to build the project's `readme.md` file from the template. ```sh npm install -g verbose/verb#dev verb-generate-readme && verb ``` -------------------------------- ### Installing caller-callsite NPM Package Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/caller-callsite/readme.md This command demonstrates how to install the `caller-callsite` package using npm, saving it as a production dependency in the project's `package.json` file. ```bash npm install --save caller-callsite ``` -------------------------------- ### Installing encodeurl Package (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/serve-static/node_modules/encodeurl/README.md Command to install the encodeurl package using npm. ```sh npm install encodeurl ``` -------------------------------- ### Installing Package: npm Installation (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/abort-controller/README.md Provides the command to install the 'abort-controller' package using npm. This command adds the package as a project dependency. ```Shell npm install abort-controller ``` -------------------------------- ### Building Readme Documentation Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/picomatch/README.md Provides the shell commands necessary to install the `verb` and `verb-generate-readme` tools globally and then run `verb` to regenerate the project's README.md file from a template. Requires Node.js, npm, and potentially Git. ```shell npm install -g verbose/verb#dev verb-generate-readme && verb ``` -------------------------------- ### Installing regjsparser package Bash Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/regjsparser/README.md Explains how to install the `regjsparser` library using npm, the Node.js package manager. This command downloads and installs the package into the project's `node_modules` directory. It requires Node.js and npm to be installed. ```bash npm install regjsparser ``` -------------------------------- ### Basic Usage Example (JavaScript) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/to-regex-range/README.md Demonstrates how to use 'toRegexRange' to get a regex source string for a number range and create a 'RegExp' object. Shows a simple example for the range '15' to '95'. ```JavaScript const toRegexRange = require('to-regex-range'); const regex = new RegExp(toRegexRange('15', '95')); ``` -------------------------------- ### Installing Connect (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/connect/README.md This is the command-line instruction for installing the Connect framework using npm, Node.js's package manager. Running this command downloads the Connect package and its dependencies into the project's node_modules directory. ```shell $ npm install connect ``` -------------------------------- ### Installing js-tokens Package via npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/js-tokens/README.md Provides the command-line instruction to install the `js-tokens` library using the npm package manager. It is intended to be run in a terminal or command prompt with Node.js and npm installed. This command downloads and installs the library into the project's `node_modules` directory. ```Shell npm install js-tokens ``` -------------------------------- ### Installing fast-json-stable-stringify via npm | Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/fast-json-stable-stringify/README.md Provides the command-line instruction for installing the fast-json-stable-stringify package using the Node Package Manager (npm). ```Shell npm install fast-json-stable-stringify ``` -------------------------------- ### Initializing Program and Options with Commander.js (JS) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/commander/Readme.md Demonstrates a basic command-line script using Commander.js. It initializes a program, defines two options (`--first` and `--separator`), parses command-line arguments, accesses parsed options and arguments, and performs an action (splitting a string). ```javascript const { program } = require('commander'); program .option('--first') .option('-s, --separator '); program.parse(); const options = program.opts(); const limit = options.first ? 1 : undefined; console.log(program.args[0].split(options.separator, limit)); ``` -------------------------------- ### Installing string-width via npm - Bash Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/string-width/readme.md This command demonstrates how to install the `string-width` package using the npm package manager. This is the standard method for adding the library as a dependency to your Node.js project. ```bash $ npm install string-width ``` -------------------------------- ### Install @babel/parser using npm Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/parser/README.md This shell command uses npm, the Node package manager, to install the @babel/parser package. The --save-dev flag ensures that the package is added as a development dependency in the project's package.json file, suitable for tools used during development rather than runtime. ```sh npm install --save-dev @babel/parser ``` -------------------------------- ### Installing on-finished Module - Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/on-finished/README.md Installs the 'on-finished' Node.js module using the npm package manager. This command downloads and installs the module into the project's dependencies. ```Shell $ npm install on-finished ``` -------------------------------- ### Install @babel/parser using Yarn Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/parser/README.md This shell command uses Yarn, another popular Node package manager, to install the @babel/parser package. The --dev flag serves the same purpose as npm's --save-dev, adding the package as a development dependency required for building or development workflows. ```sh yarn add @babel/parser --dev ``` -------------------------------- ### Installing Semver Package - Bash Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/react-native/node_modules/semver/README.md This snippet shows the standard command to install the 'semver' package using npm. It is a necessary step before using the library or CLI tool. Requires Node.js and npm installed on the system. ```bash npm install semver ``` -------------------------------- ### Installing statuses npm package - Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/send/node_modules/statuses/README.md Provides the command line instruction to install the 'statuses' module from the npm registry. This command downloads and installs the package into your project's node_modules directory. ```sh $ npm install statuses ``` -------------------------------- ### Installing @babel/helper-plugin-utils using npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/helper-plugin-utils/README.md This command installs the `@babel/helper-plugin-utils` package from the npm registry and adds it to the project's production dependencies in the `package.json` file. It is a standard way to add necessary packages for a project using npm. ```sh npm install --save @babel\/helper-plugin-utils ``` -------------------------------- ### Using SetArray and its functions in JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@jridgewell/set-array/README.md This JavaScript example demonstrates the basic usage of the SetArray class and its associated functions (get, put, pop). It shows how to add elements ('put'), retrieve their index, inspect the internal array, get the index of an existing element ('get'), and remove the last element ('pop'), verifying the state with assertions. ```js import { SetArray, get, put, pop } from '@jridgewell/set-array'; const sa = new SetArray(); let index = put(sa, 'first'); assert.strictEqual(index, 0); index = put(sa, 'second'); assert.strictEqual(index, 1); assert.deepEqual(sa.array, [ 'first', 'second' ]); index = get(sa, 'first'); assert.strictEqual(index, 0); pop(sa); index = get(sa, 'second'); assert.strictEqual(index, undefined); assert.deepEqual(sa.array, [ 'first' ]); ``` -------------------------------- ### Installing serve-static Package Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/serve-static/README.md Command to install the `serve-static` package using npm. This is the standard way to add the module to a Node.js project's dependencies. Requires Node.js and npm installed. ```sh $ npm install serve-static ``` -------------------------------- ### Building Documentation with verb Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/fill-range/README.md This shell command installs necessary tools globally and then runs the verb command to generate the project's README file from its template. ```Shell $ npm install -g verbose/verb#dev verb-generate-readme && verb ``` -------------------------------- ### Installing node-releases using npm (Bash) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/node-releases/README.md This command installs the `node-releases` package from the npm registry. It is required to use the functionality provided by the library, which includes access to Node.js release data. ```bash npm install node-releases ``` -------------------------------- ### Full Connect App with Middleware and Server (Node.js) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/connect/README.md This snippet demonstrates a complete, runnable Connect application. It shows how to require the necessary modules, initialize a Connect app, apply several common third-party middleware (compression, cookie session, body parsing), define a basic request handler, and finally create and start a Node.js HTTP server using the Connect app. ```javascript var connect = require('connect'); var http = require('http'); var app = connect(); // gzip/deflate outgoing responses var compression = require('compression'); app.use(compression()); // store session state in browser cookie var cookieSession = require('cookie-session'); app.use(cookieSession({ keys: ['secret1', 'secret2'] })); // parse urlencoded request bodies into req.body var bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({extended: false})); // respond to all requests app.use(function(req, res){ res.end('Hello from Connect!\n'); }); //create node.js http server and listen on port http.createServer(app).listen(3000); ``` -------------------------------- ### Stopping a Mark and Getting Entry - JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/marky/README.md This code shows how to start a mark, perform an operation, and then stop the mark while capturing the resulting PerformanceEntry object. The returned entry contains details like entry type, start time, duration, and the name of the measure. ```JavaScript marky.mark('manTheTorpedos'); manTheTorpedos(); var entry = marky.stop('manTheTorpedos'); ``` -------------------------------- ### Installing etag Node.js Module (sh) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/etag/README.md Use npm to install the `etag` module globally or locally in your project. This command downloads and installs the package from the npm registry. ```sh $ npm install etag ``` -------------------------------- ### Installing Babel Helper Compilation Targets using npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/helper-compilation-targets/README.md This command installs the @babel/helper-compilation-targets package using the npm package manager and saves it as a project dependency. It requires Node.js and npm to be installed. ```Shell npm install --save @babel/helper-compilation-targets ``` -------------------------------- ### Brace Expansion Examples - Sequences Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/braces/README.md This snippet provides examples of brace expansion using sequences or ranges defined by start and end values separated by double dots. It covers numerical ranges (ascending/descending) and alphabetical ranges, including the use of an optional step value. ```bash {1..9} => 1 2 3 4 5 6 7 8 9 {4..-4} => 4 3 2 1 0 -1 -2 -3 -4 {1..20..3} => 1 4 7 10 13 16 19 {a..j} => a b c d e f g h i j {j..a} => j i h g f e d c b a {a..z..3} => a d g j m p s v y ``` -------------------------------- ### Viewing Default Help Output (console) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/commander/Readme.md Shows the command to display the default help for a Commander program (`node ./examples/pizza --help`) and the resulting output, which lists usage, options, their flags, arguments, descriptions, and the default help option. ```console $ node ./examples/pizza --help Usage: pizza [options] An application for pizza ordering Options: -p, --peppers Add peppers -c, --cheese Add the specified type of cheese (default: "marble") -C, --no-cheese You do not want any cheese -h, --help display help for command ``` -------------------------------- ### Installing Babel Plugin with yarn (sh) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/plugin-transform-class-properties/README.md This command adds the @babel/plugin-transform-class-properties package using yarn. The --dev flag ensures it's added as a development dependency, integrating it into your project's build setup for transforming class properties syntax. Requires yarn to be installed. ```sh yarn add @babel/plugin-transform-class-properties --dev ``` -------------------------------- ### Installing @babel/helper-plugin-utils using yarn (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/helper-plugin-utils/README.md This command installs the `@babel/helper-plugin-utils` package from the yarn registry and adds it to the project's production dependencies in the `package.json` file. It is an alternative way to add necessary packages for a project using yarn. ```sh yarn add @babel\/helper-plugin-utils ``` -------------------------------- ### Example Validation Deprecation Output (Bash) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/jest-validate/README.md Shows an example of the console output for a deprecated configuration option, utilizing a custom deprecation title defined in the validation options. It explains that the option has been replaced and suggests the updated configuration format. This output guides users in migrating from deprecated settings. ```bash Custom Deprecation: Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. Jest now treats your current configuration as: { "transform": { ".*": "xxx" } } Please update your configuration. Documentation: http://custom-docs.com ``` -------------------------------- ### Installing Dependencies (npm) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/README.md Installs the `react-native-sticky-header-scrollview` library and its required peer dependency `react-native-reanimated` using the npm package manager. ```bash npm install react-native-sticky-header-scrollview react-native-reanimated ``` -------------------------------- ### Configuring whatwg-fetch Entry Point - Webpack Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/whatwg-fetch/README.md Provides a configuration snippet for Webpack, illustrating how to include the whatwg-fetch polyfill as an entry point before the main application code. This ensures the polyfill is loaded and active before the rest of the application script runs. ```Webpack entry: ['whatwg-fetch', ...] ``` -------------------------------- ### Getting Frontend Assets Path JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@react-native/debugger-frontend/README.md This JavaScript snippet shows how to import the @react-native/debugger-frontend package to get the absolute path to its directory containing the frontend assets. The obtained frontendPath can then be used, for example, to serve the assets via a static server. This package is primarily for internal use. ```javascript const frontendPath = require('@react-native/debugger-frontend'); // Pass frontendPath to a static server, etc ``` -------------------------------- ### Basic Usage - Search & Load (Async/Sync) - JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/cosmiconfig/README.md Demonstrates the core asynchronous and synchronous methods for searching and loading configuration files using a cosmiconfig explorer instance. It shows how to create an explorer, search for configuration walking up the directory tree, load a file from a known path, and handle the result object or errors. ```JavaScript const cosmiconfig = require('cosmiconfig'); // ... const explorer = cosmiconfig(moduleName); // Search for a configuration by walking up directories. // See documentation for search, below. explorer.search() .then((result) => { // result.config is the parsed configuration object. // result.filepath is the path to the config file that was found. // result.isEmpty is true if there was nothing to parse in the config file. }) .catch((error) => { // Do something constructive. }); // Load a configuration directly when you know where it should be. // The result object is the same as for search. // See documentation for load, below. explorer.load(pathToConfig).then(..); // You can also search and load synchronously. const searchedFor = explorer.searchSync(); const loaded = explorer.loadSync(pathToConfig); ``` -------------------------------- ### Using locate-path asynchronously in JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/locate-path/readme.md This example demonstrates how to use the asynchronous `locatePath` function to find the first existing file from a list of paths. It requires the 'locate-path' package to be installed. ```javascript const locatePath = require('locate-path'); const files = [ 'unicorn.png', 'rainbow.png', // Only this one actually exists on disk 'pony.png' ]; (async () => { console(await locatePath(files)); //=> 'rainbow' })(); ``` -------------------------------- ### Installing Debug Module NPM Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/lighthouse-logger/node_modules/debug/README.md This snippet shows the standard command line instruction for installing the 'debug' package using the npm package manager. This is the first step required to use the debug utility in your project. ```bash npm install debug ``` -------------------------------- ### Installing p-try with npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/p-try/readme.md Provides the command-line instruction to install the p-try library using the Node Package Manager (npm). This command adds the package as a dependency to your project. ```Shell npm install p-try ``` -------------------------------- ### Getting Callsites with JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/callsites/readme.md This example demonstrates how to require the 'callsites' package and use the callsites() function to obtain an array of callsite objects. It then logs the filename of the first callsite in the stack. ```JavaScript const callsites = require('callsites'); function unicorn() { console.log(callsites()[0].getFileName()); //=> '/Users/sindresorhus/dev/callsites/test.js' } unicorn(); ``` -------------------------------- ### Deprecating Property Access - JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/depd/Readme.md This example shows how to use `deprecate.property()` to wrap an object property. Accessing (getting or setting) the property will trigger a deprecation warning. This method converts data descriptors to accessor descriptors. ```JavaScript var deprecate = require('depd')('my-cool-module') exports.oldprop = 'something' // message automatically derives from property name deprecate.property(exports, 'oldprop') // explicit message deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') ``` -------------------------------- ### Installing 'open' Package (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/open/readme.md Provides the command-line instruction for installing the 'open' package using npm, the standard package manager for Node.js. This command adds 'open' as a project dependency. ```shell $ npm install open ``` -------------------------------- ### Installing brace-expansion with npm (Bash) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/brace-expansion/README.md This bash command installs the `brace-expansion` package from the npm registry into the current project's `node_modules` directory. This command is a prerequisite for using the library in a JavaScript project. It requires having npm installed. ```bash npm install brace-expansion ``` -------------------------------- ### Installing to-regex-range with npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/to-regex-range/README.md Command to install the 'to-regex-range' library as a project dependency using the npm package manager. ```Shell npm install --save to-regex-range ``` -------------------------------- ### Getting all generated positions for original position Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@jridgewell/source-map/README.md This example uses the `allGeneratedPositionsFor` method to find all potential generated locations that map back to a specific original source file location (line, column, and source). ```typescript const smc = new SourceMapConsumer(map); smc.allGeneratedpositionsfor({ line: 1, column: 5, source: "baz.ts" }); // [ // { line: 2, column: 8 } // ] ``` -------------------------------- ### Running is-directory Tests (npm) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/is-directory/README.md Installs all development dependencies required for testing and then executes the test suite defined in the project's package.json file. ```Shell $ npm install -d && npm test ``` -------------------------------- ### Generating README Documentation (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/to-regex-range/README.md This command installs the 'verb' documentation generation tools globally using npm, specifically targeting the development version of 'verb' and the 'verb-generate-readme' plugin. After installation, it runs the 'verb' command to generate the README file from its template. Used by contributors to update the documentation. ```sh npm install -g verbose/verb#dev verb-generate-readme && verb ``` -------------------------------- ### Getting file extension with mime.extension (JavaScript) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/mime/README.md Provides examples of using the `mime.extension()` function to retrieve the default file extension associated with a specific MIME type. It returns the first extension defined for that type. ```JavaScript mime.extension('text/html'); // => 'html' mime.extension('application/octet-stream'); // => 'bin' ``` -------------------------------- ### Example List of PerformanceEntry Objects - JSON Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/marky/README.md This JSON snippet shows the structure of the array returned by `marky.getEntries()`. It is a list of `PerformanceEntry` objects, each representing a completed measure with its type, start time, duration, and name. ```JSON [ { "entryType": "measure", "startTime": 1974112, "duration": 350, "name": "numberOne" }, { "entryType": "measure", "startTime": 1975108, "duration": 300, "name": "numberTwo" }, { "entryType": "measure", "startTime": 1976127, "duration": 250, "name": "numberThree" } ] ``` -------------------------------- ### Viewing Semver CLI Help - Bash Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/react-native/node_modules/semver/README.md This snippet displays the help output for the 'semver' command-line utility. It lists the available options, their descriptions, and general usage information for working with versions and ranges from the terminal. Requires the 'semver' package to be installed globally or accessible in the PATH. ```bash $ semver -h A JavaScript implementation of the https://semver.org/ specification Copyright Isaac Z. Schlueter Usage: semver [options] [ [...]] Prints valid versions sorted by SemVer precedence Options: -r --range Print versions that match the specified range. -i --increment [] Increment a version by the specified level. Level can be one of: major, minor, patch, premajor, preminor, prepatch, prerelease, or release. Default level is 'patch'. Only one version may be specified. --preid Identifier to be used to prefix premajor, preminor, prepatch or prerelease version increments. -l --loose Interpret versions and ranges loosely -n <0|1> This is the base to be used for the prerelease identifier. -p --include-prerelease Always include prerelease versions in range matching -c --coerce Coerce a string into SemVer if possible (does not imply --loose) --rtl Coerce version strings right to left --ltr Coerce version strings left to right (default) Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. If no satisfying versions are found, then exits failure. Versions are printed in ascending order, so supplying multiple versions to the utility will just sort them. ``` -------------------------------- ### Configuring Babel Jest Preset in babel.config.js Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/babel-preset-jest/README.md Example `babel.config.js` file content showing how to include the 'jest' preset in the Babel configuration. This is the recommended method for using the preset within a project's Babel setup. ```js module.exports = { presets: ['jest'], }; ``` -------------------------------- ### Serve Browser Tests Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/source-map-support/README.md Starts a local HTTP server to serve the manual browser test files. Access the specified URLs in a browser to run the tests. ```Bash npm run serve-tests ``` -------------------------------- ### Installing Project Dependencies (React Native Root) - Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@react-native/js-polyfills/README.md Installs all project dependencies defined in the package.json file located in the React Native root directory using yarn. This step is necessary before running tests. ```Shell yarn ``` -------------------------------- ### Installing @babel/helper-annotate-as-pure via npm/yarn sh Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/helper-annotate-as-pure/README.md These commands show how to install the `@babel/helper-annotate-as-pure` package using popular JavaScript package managers. Use either the npm command or the yarn command to add the package as a dependency to your project. ```sh npm install --save @babel/helper-annotate-as-pure ``` ```sh yarn add @babel/helper-annotate-as-pure ``` -------------------------------- ### Generating and Testing Regex Range (JavaScript) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/to-regex-range/README.md Shows a comprehensive example of generating a regex source string for the range '15' to '95', creating a RegExp object with start and end anchors, and testing various numbers against the generated regex. ```JavaScript const source = toRegexRange('15', '95'); //=> 1[5-9]|[2-8][0-9]|9[0-5] const regex = new RegExp(`^${source}$`); console.log(regex.test('14')); //=> false console.log(regex.test('50')); //=> true console.log(regex.test('94')); //=> true console.log(regex.test('96')); //=> false ``` -------------------------------- ### Negotiating Languages (Node.js) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/negotiator/README.md This example demonstrates using the Negotiator instance to get a list of preferred languages or the single most preferred language from the client's Accept-Language header, filtering against a list of languages the server can provide. ```js negotiator = new Negotiator(request) availableLanguages = ['en', 'es', 'fr'] // Let's say Accept-Language header is 'en;q=0.8, es, pt' negotiator.languages() // -> ['es', 'pt', 'en'] negotiator.languages(availableLanguages) // -> ['es', 'en'] language = negotiator.language(availableLanguages) // -> 'es' ``` -------------------------------- ### Installing Glob via npm Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/glob/README.md Provides the command-line instruction to install the glob library as a project dependency using npm. ```shell npm i glob ``` -------------------------------- ### Installing callsites Node.js Package Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/callsites/readme.md Use npm to install the 'callsites' package and save it as a dependency in your project's package.json file. ```Bash $ npm install --save callsites ``` -------------------------------- ### Using semver as Node.js Module Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/semver/README.md Shows examples of how to use the semver library in a Node.js environment, covering functions like valid, clean, satisfies, gt, lt, minVersion, and coerce. Requires the semver package to be installed and imported. ```javascript const semver = require('semver') semver.valid('1.2.3') // '1.2.3' semver.valid('a.b.c') // null semver.clean(' =v1.2.3 ') // '1.2.3' semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true semver.gt('1.2.3', '9.8.7') // false semver.lt('1.2.3', '9.8.7') // true semver.minVersion('>=1.0.0') // '1.0.0' semver.valid(semver.coerce('v2')) // '2.0.0' semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' ``` -------------------------------- ### Installing Promise Library via npm (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/promise/Readme.md Command to install the `promise` library globally or locally using the npm package manager for server-side or bundler-based client-side usage. ```Shell $ npm install promise ``` -------------------------------- ### Basic buffer-from Usage Examples Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/buffer-from/readme.md Demonstrates common use cases for the `bufferFrom` function. Examples show creating Buffers from arrays of octets, slices of ArrayBuffers, strings with optional encoding, and existing Buffers. Outputs the resulting Buffer for each case. ```js const bufferFrom = require('buffer-from') console.log(bufferFrom([1, 2, 3, 4])) //=> const arr = new Uint8Array([1, 2, 3, 4]) console.log(bufferFrom(arr.buffer, 1, 2)) //=> console.log(bufferFrom('test', 'utf8')) //=> const buf = bufferFrom('test') console.log(bufferFrom(buf)) //=> ``` -------------------------------- ### Getting Module Reference - JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/source-map-support/node_modules/source-map/README.md This code block provides examples of how to import or reference the 'source-map' library in different JavaScript environments, including Node.js using `require`, browser builds using a global `window.sourceMap` object, and within the Firefox development tools. ```JavaScript // Node.js var sourceMap = require('source-map'); // Browser builds var sourceMap = window.sourceMap; // Inside Firefox const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); ``` -------------------------------- ### Getting Source Map Module Reference (JavaScript) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/source-map/README.md Provides examples of how to obtain a reference to the `source-map` library object in different JavaScript environments: Node.js using `require`, browsers using the global `window` object, and within the Firefox developer tools. ```javascript // Node.js var sourceMap = require('source-map'); // Browser builds var sourceMap = window.sourceMap; // Inside Firefox const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); ``` -------------------------------- ### Installing memoize-one via npm Bash Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/memoize-one/README.md Provides the command-line instruction to install the `memoize-one` package using the npm package manager. This command adds the library as a project dependency. ```bash npm install memoize-one --save ``` -------------------------------- ### Using Semver API Core Functions - JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/react-native/node_modules/semver/README.md This snippet demonstrates how to require the full 'semver' module in Node.js and provides examples of commonly used functions like valid, clean, satisfies, gt, lt, coerce, and minVersion. It requires the 'semver' package to be installed. ```javascript const semver = require('semver') semver.valid('1.2.3') // '1.2.3' semver.valid('a.b.c') // null semver.clean(' =v1.2.3 ') // '1.2.3' semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true semver.gt('1.2.3', '9.8.7') // false semver.lt('1.2.3', '9.8.7') // true semver.minVersion('>=1.0.0') // '1.0.0' semver.valid(semver.coerce('v2')) // '2.0.0' semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' ``` -------------------------------- ### Installing Chromium Edge Launcher Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/chromium-edge-launcher/README.md These commands show how to install the `chromium-edge-launcher` package using either yarn or npm, the two most common Node.js package managers. This is the first step required to use the library in your project. ```Shell yarn add chromium-edge-launcher # or with npm: npm install chromium-edge-launcher ``` -------------------------------- ### Mounting Middleware to Specific Paths (Node.js) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/connect/README.md This example shows how to use `app.use()` with a route string as the first argument. Middleware added this way will only execute for requests where the URL path starts with the specified route. Inside the middleware, `req.url` is modified to be relative to the matched route. ```javascript app.use('/foo', function fooMiddleware(req, res, next) { // req.url starts with "/foo" next(); }); app.use('/bar', function barMiddleware(req, res, next) { // req.url starts with "/bar" next(); }); ``` -------------------------------- ### Running Tests Bash Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/regjsparser/README.md Provides the command to execute the test suite defined in the project's `package.json` file. Running this command verifies that the library is working correctly according to the included tests. Requires Node.js, npm, and the project dependencies to be installed. ```bash npm test ``` -------------------------------- ### Initializing and Using TTL Cache (JavaScript) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@isaacs/ttlcache/README.md Demonstrates how to require the '@isaacs/ttlcache' module, create a cache instance with a maximum size and a default time-to-live (TTL), set a key-value pair, and verify its presence before and after the specified TTL expires using 'has' and 'get'. This requires the '@isaacs/ttlcache' npm package to be installed. ```javascript const TTLCache = require('@isaacs/ttlcache') const cache = new TTLCache({ max: 10000, ttl: 1000 }) // set some value cache.set(1, 2) // 999 ms later cache.has(1) // returns true cache.get(1) // returns 2 // 1000 ms later cache.get(1) // returns undefined cache.has(1) // returns false ``` -------------------------------- ### Installing on-finished Module Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/send/node_modules/on-finished/README.md Provides the command-line instruction to install the 'on-finished' Node.js module from the npm registry using the npm package manager. ```Shell $ npm install on-finished ``` -------------------------------- ### Installing send Node.js Library Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/send/README.md Provides the command-line instruction to install the 'send' library using npm. This is a prerequisite for using the library in a Node.js project. ```bash $ npm install send ``` -------------------------------- ### Using Code Annotations to Control Terser Behavior Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/terser/README.md Provides examples of using special comments as annotations (`/*@...*/` or `/*#...*/`) to influence Terser's optimization process. Annotations like `__INLINE__`, `__NOINLINE__`, `__PURE__`, and `__KEY__` allow developers to guide inlining, pure function detection, and property mangling. ```javascript /*@__INLINE__*/ function_always_inlined_here() /*#__NOINLINE__*/ function_cant_be_inlined_into_here() const x = /*#__PURE__*/i_am_dropped_if_x_is_not_used() function lookup(object, key) { return object[key]; } lookup({ i_will_be_mangled_too: "bar" }, /*@__KEY__*/ "i_will_be_mangled_too"); ``` -------------------------------- ### Installing Picomatch via npm Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/picomatch/README.md This command demonstrates how to install the picomatch library using npm (Node Package Manager) and save it as a dependency in your project's `package.json` file. ```sh npm install --save picomatch ``` -------------------------------- ### Installing @babel/plugin-transform-typescript with yarn Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/plugin-transform-typescript/README.md This command installs the @babel/plugin-transform-typescript package as a development dependency using the yarn package manager. It is an alternative to npm for installing the necessary Babel plugin. ```sh yarn add @babel/plugin-transform-typescript --dev ``` -------------------------------- ### Creating a Connect App Instance (Node.js) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/connect/README.md This snippet shows the most basic step: requiring the 'connect' module and calling the returned function to create a new Connect application instance. This `app` object is the core upon which all middleware will be added. ```javascript var app = connect(); ``` -------------------------------- ### Using Esprima Tokenize and Parse in Node.js Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/esprima/README.md This snippet demonstrates how to use the Esprima library in a Node.js environment. It shows how to require the module, define a simple JavaScript string, and then use the `tokenize` function to get a list of tokens and the `parseScript` function to generate an Abstract Syntax Tree (AST) representation of the code. ```JavaScript > var esprima = require('esprima'); > var program = 'const answer = 42'; > esprima.tokenize(program); [ { type: 'Keyword', value: 'const' }, { type: 'Identifier', value: 'answer' }, { type: 'Punctuator', value: '=' }, { type: 'Numeric', value: '42' } ] > esprima.parseScript(program); { type: 'Program', body: [ { type: 'VariableDeclaration', declarations: [Object], kind: 'const' } ], sourceType: 'script' } ``` -------------------------------- ### Running Tests with npm - Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/braces/README.md Installs project dependencies using npm install and then immediately executes the test suite using npm test. This command is typically used to verify the project's functionality and stability before contributing. ```sh $ npm install && npm test ``` -------------------------------- ### Checking Fullwidth Code Point - JavaScript Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/is-fullwidth-code-point/readme.md Demonstrates how to use the `isFullwidthCodePoint` function after importing it. It takes a Unicode code point number and returns `true` if it represents a fullwidth character, `false` otherwise. The examples show checking both a fullwidth character ('谢') and a non-fullwidth character ('a'). Requires the `is-fullwidth-code-point` package to be installed. ```JavaScript const isFullwidthCodePoint = require('is-fullwidth-code-point'); isFullwidthCodePoint('谢'.codePointAt(0)); //=> true isFullwidthCodePoint('a'.codePointAt(0)); //=> false ``` -------------------------------- ### Running Project Tests Shell Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/picomatch/README.md Provides the shell command to install project dependencies and then run the associated test suite. This is a standard npm workflow command used for verifying library functionality. Requires Node.js and npm installed. ```shell npm install && npm test ``` -------------------------------- ### Install Babel Types using yarn (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/@babel/types/README.md Provides the command to install the @babel/types package as a development dependency using the yarn package manager. This offers an alternative installation method for users who prefer or use yarn. ```shell yarn add @babel/types --dev ``` -------------------------------- ### Installing finalhandler module (Shell) Source: https://github.com/jaybuangan/react-native-sticky-header-scrollview/blob/main/node_modules/finalhandler/README.md This command installs the 'finalhandler' module using the npm package manager. It's a standard dependency installation step for Node.js projects that makes the module available for use. Requires Node.js and npm to be installed. ```shell $ npm install finalhandler ```