### Getting Started Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/consola/README.md A basic example demonstrating how to import and use Consola for logging various message types and interactive prompts. ```APIDOC ## Getting Started ### ESM Import ```js import { consola, createConsola } from "consola"; ``` ### CommonJS Import ```js const { consola, createConsola } = require("consola"); ``` ### Basic Usage ```js consola.info("Using consola 3.0.0"); consola.start("Building project..."); consola.warn("A new version of consola is available: 3.0.1"); consola.success("Project built!"); consola.error(new Error("This is an example error. Everything is fine!")); consola.box("I am a simple box"); // Interactive prompt example await consola.prompt("Deploy to the production?", { type: "confirm", }); ``` ### Core Builds For smaller bundle sizes, Consola offers core builds: ```ts // Basic build (no fancy reporters) import { consola, createConsola } from "consola/basic"; // Browser build import { consola, createConsola } from "consola/browser"; // Core build (minimal) import { createConsola } from "consola/core"; ``` ``` -------------------------------- ### Getting Started with PyIndicators Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/colord/README.md Instructions on how to install and use the PyIndicators library with code examples. ```APIDOC ## Getting Started ### Installation ```bash npm i colord ``` ### Usage Examples ```javascript import { colord } from "colord"; colord("#ff0000").grayscale().alpha(0.25).toRgbString(); // "rgba(128, 128, 128, 0.25)" colord("rgb(192, 192, 192)").isLight(); // true colord("hsl(0, 50%, 50%)").darken(0.25).toHex(); // "#602020" ``` ``` -------------------------------- ### Install and Run Gray-matter Examples Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/gray-matter/README.md Commands to clone the repository, install dependencies, and execute specific examples using Node.js. ```bash git clone https://github.com/jonschlinkert/gray-matter my-project cd my-project && npm install node examples/ ``` -------------------------------- ### Install estree-util-visit Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/estree-util-visit/readme.md Installation instructions for Node.js and usage examples for Deno and browser environments. ```bash npm install estree-util-visit ``` ```javascript import {visit} from 'https://esm.sh/estree-util-visit@2' ``` ```html ``` -------------------------------- ### Installation and Setup Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/style-to-object/README.md Provides commands for installing the package via NPM or Yarn, and shows how to include it via CDN or import it in different project environments. ```shell npm install style-to-object --save yarn add style-to-object ``` ```html ``` ```javascript // ES Modules import parse from 'style-to-object'; // CommonJS const parse = require('style-to-object').default; ``` -------------------------------- ### Basic Express.js Server Setup (JavaScript) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/express/Readme.md This snippet demonstrates how to create a basic web server using Express.js. It sets up a route for the root URL ('/') that responds with 'Hello World' and starts the server listening on port 3000. This requires Node.js and the Express module to be installed. ```javascript const express = require('express') const app = express() app.get('/', function (req, res) { res.send('Hello World') }) app.listen(3000) ``` -------------------------------- ### Clone and setup development environment Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/json5/README.md Commands to clone the repository and install necessary dependencies for development. ```bash git clone https://github.com/json5/json5 cd json5 npm install ``` -------------------------------- ### Install micromark-extension-gfm-strikethrough Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/micromark-extension-gfm-strikethrough/readme.md Installation commands for Node.js and usage examples for Deno and browsers via ESM. ```bash npm install micromark-extension-gfm-strikethrough ``` ```javascript import {gfmStrikethrough, gfmStrikethroughHtml} from 'https://esm.sh/micromark-extension-gfm-strikethrough@2' ``` ```html ``` -------------------------------- ### Installation and Setup Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/imurmurhash/README.md Demonstrates how to include iMurmurHash in browser environments via script tags and in Node.js environments using NPM. ```html ``` ```bash npm install imurmurhash ``` ```javascript MurmurHash3 = require('imurmurhash'); ``` -------------------------------- ### Installation Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/hast-util-to-estree/readme.md Instructions for installing the hast-util-to-estree package using npm, and examples for Deno and browser usage with esm.sh. ```APIDOC ## Install This package is [ESM only][github-gist-esm]. ### npm In Node.js (version 16+), install with npm: ```sh npm install hast-util-to-estree ``` ### Deno In Deno with [`esm.sh`][esmsh]: ```js import {toEstree} from 'https://esm.sh/hast-util-to-estree@3' ``` ### Browser In browsers with [`esm.sh`][esmsh]: ```html ``` ``` -------------------------------- ### Install hast-util-to-estree Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/hast-util-to-estree/readme.md Installation instructions for hast-util-to-estree using npm, and examples for Deno and browser environments using esm.sh. ```sh npm install hast-util-to-estree ``` ```js import {toEstree} from 'https://esm.sh/hast-util-to-estree@3' ``` ```html ``` -------------------------------- ### Commander CLI Example with Commands and Options Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/commander/Readme.md An example of setting up a command-line interface using Commander. It defines a program version, global options, and specific commands ('setup' and 'exec') with their own options and actions. The 'exec' command also includes an alias and custom help text. ```js const { 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){ const 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.parse(process.argv); ``` -------------------------------- ### Install micromark-extension-gfm-autolink-literal Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/micromark-extension-gfm-autolink-literal/readme.md Installation instructions for Node.js using npm and import examples for Deno and browser environments. ```sh npm install micromark-extension-gfm-autolink-literal ``` ```js import {gfmAutolinkLiteral, gfmAutolinkLiteralHtml} from 'https://esm.sh/micromark-extension-gfm-autolink-literal@2' ``` ```html ``` -------------------------------- ### Initialize and Listen with HTTP Server (JavaScript) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/sockjs/README.md Demonstrates how to create a Server instance and hook it to an http.Server instance. It shows how to install handlers and start listening. Options can be provided to override server creation options. The Server instance is an EventEmitter. ```javascript var http_server = http.createServer(); sockjs_server.installHandlers(http_server, options); http_server.listen(...); ``` -------------------------------- ### Development Setup and Testing Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/postcss-font-variant/README.md This snippet outlines the steps for setting up the development environment for postcss-font-variant, including cloning the repository, installing dependencies, and running tests. ```bash git clone https://github.com/postcss/postcss-font-variant.git git checkout -b patch-1 npm install npm test ``` -------------------------------- ### Install recma-stringify Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/recma-stringify/readme.md Instructions for installing recma-stringify using npm, and examples for Deno and browser environments using esm.sh. ```sh npm install recma-stringify ``` ```js import recmaStringify from 'https://esm.sh/recma-stringify@1' ``` ```html ``` -------------------------------- ### Multi-Command CLI with Commander.js Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/svgo/node_modules/commander/Readme.md This example demonstrates building a multi-command CLI application using Commander.js. It defines two commands, 'setup' and 'exec', each with its own options and action handlers. It also shows how to use aliases and add help text. ```javascript const { Command } = require('commander'); const program = new Command(); program .version('0.0.1') .option('-c, --config ', 'set config path', './deploy.conf'); program .command('setup [env]') .description('run setup commands for all envs') .option('-s, --setup_mode ', 'Which setup mode to use', 'normal') .action((env, options) => { env = env || 'all'; console.log('read config from %s', program.opts().config); console.log('setup for %s env(s) with %s mode', env, options.setup_mode); }); program .command('exec ``` ``` -------------------------------- ### Install and Use Opener CLI Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/opener/README.md Demonstrates how to install the 'opener' package globally using npm and then use it from the command line to open URLs, local files, applications, or run npm scripts. ```bash npm install opener -g opener http://google.com opener ./my-file.txt opener firefox opener npm run lint ``` -------------------------------- ### Initialize and Use Keyv Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/keyv/README.md Demonstrates how to initialize a Keyv instance with different storage backends, handle connection errors, and perform basic CRUD operations like set, get, delete, and clear. ```javascript const Keyv = require('keyv'); const keyv = new Keyv('redis://user:pass@localhost:6379'); keyv.on('error', err => console.log('Connection Error', err)); await keyv.set('foo', 'expires in 1 second', 1000); await keyv.set('foo', 'never expires'); await keyv.get('foo'); await keyv.delete('foo'); await keyv.clear(); ``` -------------------------------- ### Install micromark-factory-title Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/micromark-factory-title/readme.md Instructions for installing the micromark-factory-title package using npm, and examples for Deno and browser usage with esm.sh. ```APIDOC ## Install micromark-factory-title This package is [ESM only][esm]. In Node.js (version 16+), install with [npm][]: ```sh npm install micromark-factory-title ``` In Deno with [`esm.sh`][esmsh]: ```js import {factorySpace} from 'https://esm.sh/micromark-factory-title@1' ``` In browsers with [`esm.sh`][esmsh]: ```html ``` ``` -------------------------------- ### Initialize Algolia Query Suggestions Client Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/@algolia/client-query-suggestions/README.md Example of importing and initializing the client with application credentials. ```javascript import { querySuggestionsClient } from '@algolia/client-query-suggestions'; const client = querySuggestionsClient('YOUR_APP_ID', 'YOUR_API_KEY'); ``` -------------------------------- ### new Keyv([uri], [options]) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/keyv/README.md Initializes a new Keyv instance with optional connection URI and configuration settings. ```APIDOC ## new Keyv([uri], [options]) ### Description Creates a new Keyv instance. The instance acts as an EventEmitter that emits an 'error' event if the underlying storage adapter connection fails. ### Method Constructor ### Parameters #### Path Parameters - **uri** (String) - Optional - The connection string URI for the storage adapter. #### Request Body - **options** (Object) - Optional - Configuration object for the instance. - **options.namespace** (String) - Optional - Namespace for the current instance (default: 'keyv'). - **options.ttl** (Number) - Optional - Default Time-To-Live for stored items. - **options.store** (Object) - Optional - A custom storage adapter that implements the Map API. - **options.compression** (Object) - Optional - Compression adapter (e.g., gzip, brotli). ### Request Example const keyv = new Keyv('redis://localhost', { namespace: 'my-app', ttl: 5000 }); ### Response - **instance** (Object) - A new Keyv instance. ``` -------------------------------- ### Install micromark-util-chunked Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/micromark-util-chunked/readme.md Instructions for installing the micromark-util-chunked package using npm, and examples for Deno and browser environments using esm.sh. ```sh npm install micromark-util-chunked ``` ```js import {push, splice} from 'https://esm.sh/micromark-util-chunked@1' ``` ```html ``` -------------------------------- ### Install mdast-util-phrasing Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/mdast-util-phrasing/readme.md Instructions for installing the mdast-util-phrasing package using npm, and examples for Deno and browser environments using esm.sh. ```sh npm install mdast-util-phrasing ``` ```js import {phrasing} from 'https://esm.sh/mdast-util-phrasing@4' ``` ```html ``` -------------------------------- ### Webpack Configuration Example Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/html-webpack-plugin/README.md This example demonstrates a basic webpack configuration file, illustrating how to set up entry points, output paths, and include plugins like HtmlWebpackPlugin. ```javascript { entry: 'index.js', output: { path: __dirname + '/dist', filename: 'index_bundle.js' }, plugins: [ new HtmlWebpackPlugin({ title: 'My App', filename: 'assets/admin.html' }) ] } ``` -------------------------------- ### Install hast-util-whitespace Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/hast-util-whitespace/readme.md Instructions for installing the hast-util-whitespace package using npm, and examples for Deno and browser environments using esm.sh. ```APIDOC ## Install hast-util-whitespace This package is [ESM only][esm]. In Node.js (version 16+), install with [npm][]: ```sh npm install hast-util-whitespace ``` In Deno with [`esm.sh`][esmsh]: ```js import {whitespace} from 'https://esm.sh/hast-util-whitespace@3' ``` In browsers with [`esm.sh`][esmsh]: ```html ``` ``` -------------------------------- ### Installation Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/postcss-pseudo-class-any-link/README.md Instructions for installing the PostCSS Pseudo Class Any Link plugin. ```APIDOC ## Installation ### Description Install the plugin using npm or yarn. ### Method N/A (Command Line) ### Endpoint N/A ### Parameters N/A ### Request Example ```bash npm install postcss postcss-pseudo-class-any-link --save-dev ``` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Install @mdx-js/mdx Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/@mdx-js/mdx/readme.md Instructions for installing the @mdx-js/mdx package using npm, and examples for Deno and browser environments using esm.sh. ```sh npm install @mdx-js/mdx ``` ```tsx import {compile} from 'https://esm.sh/@mdx-js/mdx@3' ``` ```html ``` -------------------------------- ### Install @svgr/babel-plugin-svg-em-dimensions Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/@svgr/babel-plugin-svg-em-dimensions/README.md Command to install the plugin as a development dependency using npm. This is required before configuring the plugin in your Babel setup. ```bash npm install --save-dev @svgr/babel-plugin-svg-em-dimensions ``` -------------------------------- ### Installing Fraction.js Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/fraction.js/README.md Instructions for installing the Fraction.js library using package managers like npm and yarn, or by cloning the Git repository. ```bash npm install fraction.js ``` ```bash yarn add fraction.js ``` ```bash git clone https://github.com/rawify/Fraction.js ``` -------------------------------- ### Basic Usage of configstore in JavaScript Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/configstore/readme.md Demonstrates how to initialize a Configstore instance with a package name and default configuration, and then use methods like .get(), .set(), and .delete() to manage configuration values. It also shows how to use dot-notation for nested properties. ```javascript import Configstore from 'configstore'; const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8')); // Create a Configstore instance. const config = new Configstore(packageJson.name, {foo: 'bar'}); console.log(config.get('foo')); //=> 'bar' config.set('awesome', true); console.log(config.get('awesome')); //=> true // Use dot-notation to access nested properties. config.set('bar.baz', true); console.log(config.get('bar')); //=> {baz: true} config.delete('awesome'); console.log(config.get('awesome')); //=> undefined ``` -------------------------------- ### Get Index Range of Balanced Pairs with balanced.range (JavaScript) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/balanced-match/README.md This snippet demonstrates the usage of the 'balanced.range' function from the 'balanced-match' library. It returns an array containing the start and end indices of the first non-nested matching pair of specified delimiters within a string. If no match is found, 'undefined' is returned. The example shows how it handles cases with unmatched pairs. ```javascript var balanced = require('balanced-match'); // Example usage for balanced.range (assuming it's called similarly to balanced) // Note: The provided text only shows balanced.range in the API description, not as a direct code example. // This is a conceptual representation based on the API description. console.log(balanced.range('{', '}', 'pre{in{nested}}post')); // Expected output: [ 3, 14 ] console.log(balanced.range('{', '}', 'pre{first}between{second}post')); // Expected output: [ 3, 9 ] console.log(balanced.range('{{a}', '}')); // Example for unmatched pairs: [ 1, 3 ] console.log(balanced.range('{a}}', '}')); // Example for unmatched pairs: [ 0, 2 ] ``` -------------------------------- ### Install hastscript Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/hastscript/readme.md Instructions for installing the hastscript package using npm for Node.js environments. It also provides examples for using it with Deno and in browsers via esm.sh. ```sh npm install hastscript ``` ```js import {h} from 'https://esm.sh/hastscript@9' ``` ```html ``` -------------------------------- ### Installation and Basic Usage Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/@csstools/postcss-oklab-function/README.md Instructions for installing the plugin via npm and integrating it into a PostCSS build process. ```bash npm install postcss @csstools/postcss-oklab-function --save-dev ``` ```javascript const postcss = require('postcss'); const postcssOKLabFunction = require('@csstools/postcss-oklab-function'); postcss([ postcssOKLabFunction(/* pluginOptions */) ]).process(YOUR_CSS /*, processOptions */); ``` -------------------------------- ### Install and Configure remark-comment Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/@slorber/remark-comment/README.md Shows how to install the package via npm and integrate it into a unified processor pipeline. This setup allows the parser to recognize HTML-style comments. ```bash npm install remark-comment ``` ```javascript import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkComment from 'remark-comment'; unified().use(remarkParse).use(remarkComment); ``` -------------------------------- ### Install and Load URI.js in Node.js (CommonJS) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/uri-js/README.md Guide for installing URI.js using npm or yarn and then importing it into a Node.js project using CommonJS module syntax. ```bash npm install uri-js # OR yarn add uri-js ``` ```javascript const URI = require("uri-js"); ``` -------------------------------- ### Full Configuration Chain Usage Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/config-chain/readme.markdown Shows how to build a complex configuration chain using command-line arguments, environment variables, and multiple file sources. ```javascript var cc = require('config-chain') , opts = require('optimist').argv , env = opts.env || process.env.YOUR_APP_ENV || 'dev' var conf = cc( opts, cc.env('myApp_'), path.join(__dirname, 'config.' + env + '.json'), env === 'prod' ? path.join(__dirname, 'special.json') : null, path.join(__dirname, 'config', env, 'config.json'), cc.find('config.json'), { host: 'localhost', port: 8000 } ) var host = conf.get('host') ``` -------------------------------- ### Clone and Run Express.js Examples (Bash) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/express/Readme.md This set of commands clones the Express.js repository, navigates into the directory, installs dependencies, and then runs a specific example (content-negotiation). This is useful for exploring the capabilities and features of Express.js through practical examples. ```bash $ git clone https://github.com/expressjs/express.git --depth 1 $ cd express $ npm install $ node examples/content-negotiation ``` -------------------------------- ### Install Dependencies and Run Tests Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/fill-range/README.md This snippet demonstrates how to install project dependencies and run unit tests using npm. It's a standard procedure for verifying the library's functionality and for developers to familiarize themselves with its API. ```bash $ npm install && npm test ``` -------------------------------- ### Install Unified Package Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/unified/readme.md Instructions for installing the unified package using npm for Node.js environments. Also provides examples for Deno and browser usage via esm.sh. ```sh npm install unified ``` ```js import {unified} from 'https://esm.sh/unified@11' ``` ```html ``` -------------------------------- ### Create and Use VFile Instance Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/vfile/readme.md Demonstrates creating a new VFile instance with initial path and value, modifying its extension, and adding a message. It shows how to access properties like path, dirname, basename, and messages. ```js import {VFile} from 'vfile' const file = new VFile({ path: '~/example.txt', value: 'Alpha *braavo* charlie.' }) console.log(file.path) // => '~/example.txt' console.log(file.dirname) // => '~' file.extname = '.md' console.log(file.basename) // => 'example.md' file.basename = 'index.text' console.log(file.history) // => ['~/example.txt', '~/example.md', '~/index.text'] file.message('Unexpected unknown word `braavo`, did you mean `bravo`?', { place: {line: 1, column: 8}, source: 'spell', ruleId: 'typo' }) console.log(file.messages) ``` -------------------------------- ### Eagerly Start Jest Worker Pool Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/jest-worker/README.md Shows how to invoke the start() method on a Jest Worker instance to initialize all workers and execute their setup functions before processing tasks. ```javascript const worker = new Worker(workerPath, options); await worker.start(); ``` -------------------------------- ### Configure processor plugins with processor.use Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/unified/readme.md Shows various ways to configure a Unified processor using plugins, presets, and options. It demonstrates how to pass single plugins, lists of plugins, and how configuration merging works. ```javascript import {unified} from 'unified' unified() .use(pluginA, {x: true, y: true}) .use(pluginA, {y: false, z: true}) .use([pluginB, pluginC]) .use([pluginD, [pluginE, {}]]) .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}}) .use({settings: {position: false}}) ``` -------------------------------- ### Usage Example Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/callsites/readme.md Demonstrates how to use the callsites function to get call site information. ```APIDOC ## Usage Example ### Description Demonstrates how to use the callsites function to get call site information. ### Method ```javascript const callsites = require('callsites'); function unicorn() { console.log(callsites()[0].getFileName()); //=> '/Users/sindresorhus/dev/callsites/test.js' } unicorn(); ``` ``` -------------------------------- ### Subcommand Definition Example (JavaScript) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/html-webpack-plugin/node_modules/commander/Readme.md Illustrates how to define subcommands using Commander.js. This example sets up 'install', 'search', 'update', and 'list' commands, with 'update' specifying a custom executable file. ```javascript program .version('0.1.0') .command('install [name]', 'install one or more packages') .command('search [query]', 'search with optional query') .command('update', 'update installed packages', { executableFile: 'myUpdateSubCommand' }) .command('list', 'list packages installed', { isDefault: true }); program.parse(process.argv); ``` -------------------------------- ### PostCSS Plugin Integration Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/@csstools/postcss-trigonometric-functions/README.md Shows how to install and use the PostCSS Trigonometric Functions plugin within a PostCSS project. It includes the npm installation command and a JavaScript example of integrating the plugin. ```bash npm install postcss @csstools/postcss-trigonometric-functions --save-dev ``` ```javascript const postcss = require('postcss'); const postcssTrigonometricFunctions = require('@csstools/postcss-trigonometric-functions'); postcss([ postcssTrigonometricFunctions(/* pluginOptions */) ]).process(YOUR_CSS /*, processOptions */); ``` -------------------------------- ### Install unist-util-position-from-estree Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/unist-util-position-from-estree/readme.md Installation instructions for Node.js, Deno, and browser environments. ```shell npm install unist-util-position-from-estree ``` ```javascript import {positionFromEstree} from 'https://esm.sh/unist-util-position-from-estree@2' ``` ```html ``` -------------------------------- ### Initialize and Configure ignore Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/ignore/README.md Demonstrates how to import the library and add ignore patterns to an instance. ```javascript import ignore from 'ignore'; const ig = ignore().add(['.abc/*', '!.abc/d/']); ``` -------------------------------- ### Installation Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/ajv-keywords/README.md Instructions on how to install ajv-keywords for different versions of Ajv. ```APIDOC ## Install To install version 4 to use with [Ajv v7](https://github.com/ajv-validator/ajv): ```bash npm install ajv-keywords ``` ``` -------------------------------- ### Install and Use cssesc Binary Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/cssesc/README.md Instructions for installing the cssesc command-line tool globally via npm. It then shows examples of escaping text for CSS string literals and CSS identifiers using the binary. ```bash npm install -g cssesc cssesc 'föo ♥ bår 𝌆 baz' cssesc --identifier 'föo ♥ bår 𝌆 baz' ``` -------------------------------- ### Install and Use PostCSS Overflow Shorthand Plugin (JavaScript) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/postcss-overflow-shorthand/README.md Shows the installation command using npm and provides a JavaScript example of how to integrate the PostCSS Overflow Shorthand plugin into a PostCSS processing workflow. It requires 'postcss' and 'postcss-overflow-shorthand'. ```bash npm install postcss postcss-overflow-shorthand --save-dev ``` ```js const postcss = require('postcss'); const postcssOverflowShorthand = require('postcss-overflow-shorthand'); postcss([ postcssOverflowShorthand(/* pluginOptions */) ]).process(YOUR_CSS /*, processOptions */); ``` -------------------------------- ### Get Specific Regenerate Set (Characters) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/regenerate-unicode-properties/README.md Retrieves a Regenerate set for a specific Unicode property, such as Uppercase Letter or Greek Script, to be used with the Regenerate library. This example shows how to get the characters associated with the 'Uppercase_Letter' general category. ```javascript const Lu = require('regenerate-unicode-properties/General_Category/Uppercase_Letter.js').characters; const Greek = require('regenerate-unicode-properties/Script_Extensions/Greek.js').characters; ``` -------------------------------- ### Plugin Configuration Examples Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/cssnano-preset-advanced/README.md Examples of how specific PostCSS plugins are configured within the advanced preset. ```javascript { add: false; } ``` ```javascript { exclude: true; } ``` ```javascript { length: false; } ``` -------------------------------- ### Install mdast-util-frontmatter Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/mdast-util-frontmatter/readme.md Installation instructions for Node.js, Deno, and browser environments using ESM. ```shell npm install mdast-util-frontmatter ``` ```javascript import {frontmatterFromMarkdown, frontmatterToMarkdown} from 'https://esm.sh/mdast-util-frontmatter@2' ``` ```html ``` -------------------------------- ### Create and Start a New Express Application (Console) Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/express/Readme.md These commands demonstrate the process of creating a new Express application using the express-generator, navigating into the project directory, installing its dependencies, and starting the development server. The application will be accessible at http://localhost:3000. ```bash $ express /tmp/foo && cd /tmp/foo $ npm install $ npm start ``` -------------------------------- ### Micromatch Quickstart: Basic Glob Matching Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/micromatch/README.md Demonstrates the basic usage of micromatch for filtering lists of strings against glob patterns. It shows how to import the library and use the main export function for matching and exclusion. ```javascript const micromatch = require('micromatch'); // micromatch(list, patterns[, options]); console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['f*', 'b*'])); //=> ['foo', 'bar', 'baz'] console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['*', '!b*'])); //=> ['foo', 'qux'] ``` -------------------------------- ### Initialize SPDY Server Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/spdy/README.md Shows how to create a SPDY server using the spdy.createServer method. This method accepts a base class constructor, configuration options, and a request listener. ```javascript spdy.createServer( https.Server, { }, function(req, res) { } ).listen(port, host, callback); ``` -------------------------------- ### Initialize and Configure Algolia Search Helper Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/algoliasearch-helper/README.md Demonstrates how to initialize the Algolia Search Helper with a client, index name, and configuration options including facets and disjunctive facets. The example shows how to add refinements and trigger a search operation. ```javascript var algoliasearch = require('algoliasearch'); var algoliasearchHelper = require('algoliasearch-helper'); var client = algoliasearch('appId', 'apiKey'); var helper = algoliasearchHelper(client, 'indexName', { facets: ['mainCharacterFirstName', 'year'], disjunctiveFacets: ['director'], }); helper.on('result', function (event) { console.log(event.results); }); helper.addDisjunctiveFacetRefinement('director', 'Clint Eastwood'); helper.addDisjunctiveFacetRefinement('director', 'Sofia Coppola'); helper.addNumericRefinement('year', '=', 2003); helper.search(); ``` -------------------------------- ### TypeScript Error Reporting with Source Maps Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/source-map-support/README.md Shows how to use source-map-support with TypeScript to get accurate stack traces. It includes installation, compilation, and execution steps. ```typescript declare function require(name: string); require('source-map-support').install(); class Foo { constructor() { this.bar(); } bar() { throw new Error('this is a demo'); } } new Foo(); ``` ```bash $ npm install source-map-support typescript $ node_modules/typescript/bin/tsc -sourcemap demo.ts $ node demo.js ``` ```bash $ npm install source-map-support typescript $ node_modules/typescript/bin/tsc -sourcemap demo.ts $ node -r source-map-support/register demo.js ``` -------------------------------- ### Install micromark-util-resolve-all Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/micromark-util-resolve-all/readme.md Installation instructions for Node.js, Deno, and browser environments using ESM. ```bash npm install micromark-util-resolve-all ``` ```javascript import {resolveAll} from 'https://esm.sh/micromark-util-resolve-all@1' ``` ```html ``` -------------------------------- ### Install estree-util-to-js Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/estree-util-to-js/readme.md Installation instructions for Node.js and Deno environments. ```bash npm install estree-util-to-js ``` ```javascript import {toJs} from 'https://esm.sh/estree-util-to-js@2' ``` -------------------------------- ### React Component PropType Validation Example Source: https://github.com/coding-kitties/pyindicators/blob/main/docs/node_modules/prop-types/README.md Demonstrates how to use PropTypes to validate different types of props passed to a React component. It covers primitive types, complex types like arrays and objects, custom validators, and required props. This example assumes the 'prop-types' library is installed and imported. ```javascript import React from 'react'; import PropTypes from 'prop-types'; class MyComponent extends React.Component { render() { // ... do things with the props } } MyComponent.propTypes = { // You can declare that a prop is a specific JS primitive. By default, these // are all optional. optionalArray: PropTypes.array, optionalBigInt: PropTypes.bigint, optionalBool: PropTypes.bool, optionalFunc: PropTypes.func, optionalNumber: PropTypes.number, optionalObject: PropTypes.object, optionalString: PropTypes.string, optionalSymbol: PropTypes.symbol, // Anything that can be rendered: numbers, strings, elements or an array // (or fragment) containing these types. // see https://reactjs.org/docs/rendering-elements.html for more info optionalNode: PropTypes.node, // A React element (ie. ). optionalElement: PropTypes.element, // A React element type (eg. MyComponent). // a function, string, or "element-like" object (eg. React.Fragment, Suspense, etc.) // see https://github.com/facebook/react/blob/HEAD/packages/shared/isValidElementType.js optionalElementType: PropTypes.elementType, // You can also declare that a prop is an instance of a class. This uses // JS's instanceof operator. optionalMessage: PropTypes.instanceOf(Message), // You can ensure that your prop is limited to specific values by treating // it as an enum. optionalEnum: PropTypes.oneOf(['News', 'Photos']), // An object that could be one of many types optionalUnion: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.instanceOf(Message) ]), // An array of a certain type optionalArrayOf: PropTypes.arrayOf(PropTypes.number), // An object with property values of a certain type optionalObjectOf: PropTypes.objectOf(PropTypes.number), // You can chain any of the above with `isRequired` to make sure a warning // is shown if the prop isn't provided. // An object taking on a particular shape optionalObjectWithShape: PropTypes.shape({ optionalProperty: PropTypes.string, requiredProperty: PropTypes.number.isRequired }), // An object with warnings on extra properties optionalObjectWithStrictShape: PropTypes.exact({ optionalProperty: PropTypes.string, requiredProperty: PropTypes.number.isRequired }), requiredFunc: PropTypes.func.isRequired, // A value of any data type requiredAny: PropTypes.any.isRequired, // You can also supply a custom validator. It should return an Error // object if the validation fails. Don't `console.warn` or throw, as this // won't work inside `oneOfType`. customProp: function(props, propName, componentName) { if (!/matchme/.test(props[propName])) { return new Error( 'Invalid prop `' + propName + '` supplied to' + ' `' + componentName + '`. Validation failed.' ); } }, // You can also supply a custom validator to `arrayOf` and `objectOf`. // It should return an Error object if the validation fails. The validator // will be called for each key in the array or object. The first two // arguments of the validator are the array or object itself, and the // current item's key. customArrayProp: PropTypes.arrayOf(function(propValue, key, componentName, location, propFullName) { if (!/matchme/.test(propValue[key])) { return new Error( 'Invalid prop `' + propFullName + '` supplied to' + ' `' + componentName + '`. Validation failed.' ); } }) }; ```