0.4.11 • Published 3 years ago

@twodashes/node v0.4.11

Weekly downloads
9
License
ISC
Repository
github
Last release
3 years ago

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.

0.4.11

3 years ago

0.4.10

3 years ago

0.4.8

3 years ago

0.4.7

3 years ago

0.4.5

3 years ago

0.4.0

3 years ago