Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@alwatr/nanolib

Alwatr453AGPL-3.0-only5.2.1TypeScript support: included

Necessary library for all ECMAScript (JavaScript/TypeScript) projects.

fs, file, filesystem, readFile, writeFile, readJson, writeJson, JSON, async, queue, cross-platform, ECMAScript, typescript, javascript, node, nodejs, esm, module, utility, util, utils, nanolib, alwatr

readme

ECMAScript Nano Libs

This repository contains numerous small utility packages. These packages serve various useful purposes and are written in nano ESModule without any dependencies.

Here is a brief overview of the included libraries:

  1. tsconfig-base: This is a foundational TypeScript configuration used for Alwatr projects.
  2. flat-string: The flat-string function flattens the underlying C structures of a concatenated JavaScript string.
  3. global-this: This TypeScript module provides a cross-platform alternative to globalThis named globalScope. This object works across different environments, including browsers (window), Node.js (global), and Web Workers (self).
  4. platform-info: This module offers a method to identify the current platform where the script is being executed. It defines a platformInfo constant that contains details about the current platform.
  5. prettier-config: These are Alwatr's shared configurations for Prettier.
  6. eslint-config: This is Alwatr's ECMAScript Style Guide presented as shareable ESLint configurations.
  7. deep-clone: This function allows you to clone deeply nested objects and arrays in JavaScript.
  8. nano-build: This is a tool for building/bundling ECMAScript, TypeScript, and JavaScript libraries. It's user-friendly, requires no setup, follows best practices, has no dependencies, and uses esbuild for improved performance.
  9. type-helper: Collection of useful typescript type helpers.
  10. wait: Comprehensive toolkit for managing asynchronous operations.
  11. exit-hook: A utility for registering exit handlers in Node.js.
  12. flatomise: A utility for creating promises that can be externally resolved or rejected.
  13. async-queue: A queue that executes async tasks in order like mutex and semaphore methodology for javascript and typescript.
  14. node-fs: Enhanced file system operations in Node.js, including reading, writing, and handling JSON files, with both synchronous and asynchronous options.
  15. is-number: A simple utility to check if a value is a number.
  16. parse-duration: A simple utility to parse a duration string into milliseconds number.
  17. local-storage: localJsonStorage is a utility object in our TypeScript package that provides methods for interacting with the local storage in a structured and versioned manner.
  18. polyfill-has-own: A polyfill for Object.hasOwn.
  19. fetch: Enhanced fetch API with cache strategy, retry pattern, timeout, helper methods and enhanced types.

For more detailed information and guidelines on how to use each package, please refer to each package's README.

Sponsors

The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.

Exir Studio

Contributing

Contributions are welcome! Please read our contribution guidelines before submitting a pull request.

License

This project is licensed under the AGPL-3.0 License.

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.2.1 (2024-11-07)

Note: Version bump only for package @alwatr/nanolib

5.2.0 (2024-11-06)

Note: Version bump only for package @alwatr/nanolib

5.1.0 (2024-11-04)

Note: Version bump only for package @alwatr/nanolib

5.0.0 (2024-11-02)

⚠ BREAKING CHANGES

  • To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.

Features

  • nanolib: add global-this (97aa2d0) by @
  • nanolib: add nanolib package to export the common packages (1610b1e) by @
  • nanolib: add demo test file (0e98a3e) by @
  • nanolib: export http-utils (ab816d2) by @
  • nanolib: export node packages from their files (e039a2f) by @
  • nanolib: export resolve-url from nanolib package (ea40407) by @
  • nanolib: separate export from dedupe package (10c5ffc) by @
  • nanolib: use get-env-package (0e9e492) by @

Bug Fixes

  • nanolib: export unicode-digits & update its deps (28a6a65) by @
  • nanolib: set preset option of nano-build to module3 (2d49433) by @
  • nanolib: update exports key for new files (0e9f4aa) by @
  • nanolib: Update package.json to use "@alwatr/env" instead of "@alwatr/get-env" (fd03dc0) by @

Code Refactoring

  • env: rename package and function (6d72576) by @
  • http-utils: rename package to http-primer and update description (3c30e17) by @
  • nanolib: export global-this & update exports key in package.json (42c8081) by @
  • use the same version as @alwatr/nanolib (60eb860) by @

Miscellaneous Chores

  • include LICENSE and LEGAL files to publish (09f366f) by @
  • update devDependencies in package.json (4d366af) by @
  • version (62983c0) by @

Dependencies update

1.5.1 (2024-11-02)

Note: Version bump only for package @alwatr/nanolib

1.5.0 (2024-10-28)

Features

  • nanolib: export http-utils (ab816d2) by @mohammadhonarvar

Code Refactoring

  • http-utils: rename package to http-primer and update description (3c30e17) by @AliMD

1.4.0 (2024-10-25)

Features

  • nanolib: add global-this (97aa2d0) by @mohammadhonarvar
  • nanolib: use get-env-package (0e9e492) by @mohammadhonarvar

Bug Fixes

  • nanolib: Update package.json to use "@alwatr/env" instead of "@alwatr/get-env" (fd03dc0) by @AliMD

Code Refactoring

  • env: rename package and function (6d72576) by @AliMD
  • nanolib: export global-this & update exports key in package.json (42c8081) by @mohammadhonarvar

Miscellaneous Chores

  • update devDependencies in package.json (4d366af) by @AliMD

Dependencies update

1.3.0 (2024-10-15)

Features

  • nanolib: export resolve-url from nanolib package (ea40407) by @mohammadhonarvar

Dependencies update

  • update (ef384e7) by @mohammadhonarvar

1.2.1 (2024-10-12)

Note: Version bump only for package @alwatr/nanolib

1.2.0 (2024-10-11)

Features

  • nanolib: separate export from dedupe package (10c5ffc) by @mohammadhonarvar

1.1.0 (2024-10-11)

Features

  • nanolib: export node packages from their files (e039a2f) by @mohammadhonarvar

Bug Fixes

  • nanolib: set preset option of nano-build to module3 (2d49433) by @mohammadhonarvar
  • nanolib: update exports key for new files (0e9f4aa) by @mohammadhonarvar

Miscellaneous Chores

  • include LICENSE and LEGAL files to publish (09f366f) by @AliMD

Dependencies update

  • update (ec228ca) by @mohammadhonarvar

1.0.3 (2024-10-11)

Bug Fixes

  • nanolib: export unicode-digits & update its deps (28a6a65) by @mohammadhonarvar

1.0.2 (2024-10-10)

Dependencies update

  • bump the development-dependencies group with 10 updates (fa4aaf0) by @dependabot[bot]

1.0.1 (2024-10-08)

Note: Version bump only for package @alwatr/nanolib

1.0.0 (2024-10-01)

Features

  • nanolib: add nanolib package to export the common packages (1610b1e) by @mohammadhonarvar
  • nanolib: add demo test file (0e98a3e) by @AliMD

Miscellaneous Chores