Socket
Socket
Sign inDemoInstall

@twodashes/node

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @twodashes/node

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


Version published
Weekly downloads
43
decreased by-20.37%
Maintainers
1
Install size
99.0 kB
Created
Weekly downloads
 

Readme

Source

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 both@twodashes/universaland@twodashes/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.

FAQs

Last updated on 07 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc