Skip to content
/ node Public

Utility functions specifically for Node.js. HTTP requests, CLI arguments, promises, operating system, version, etc. See also @twodashes/universal and @twodashes/browser

Notifications You must be signed in to change notification settings

twodashes/node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utility functions for Node.js

See also @twodash/universal for all platforms, and @twodash/browser for the browser (including Webpack). Planned for the future are more platform-specific functions: "@twodash/rnative" for React Native, "@twodash/ionic", and in a galaxy far far away "@twodash/quasar".

Installation

These are exported for your choice of environment. When importing, specify cjs/esm/__ format. The __ is meant to be used with the browser <script> tag. It creates a window.__ variable.

  import { sort_by_rating_and_position } from "@twodash/universal/esm/sort_strings"
  const sort_strings = require("@twodash/universal/esm/sort_strings")

Why not UMD modules standard? Code splitting. By specifying your choice "esm" (ES Modules), "cjs" (CommonJS) or "__" (window.__), you're able to download only the specific functions you actually need, not everthing else. Additionally on the browser, you can download multiple times using multiple<script>tags (for example bothtwodashes-universalandtwodashes-browser, or/sort_stringsand/arrays). All downloaded scripts will be combined into one single flatwindow.__ dictionary/object. See code sandbox. Please do message (Paul) if this is unclear, or if may know a better way of accomplishing all this.

Documentation

  • coming soon - for now please see "./src" folder which uses standard JsDoc comments

Not ready

Currently under development. Not stable. Adding more functions.

About

Utility functions specifically for Node.js. HTTP requests, CLI arguments, promises, operating system, version, etc. See also @twodashes/universal and @twodashes/browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published