@yamato-daiwa/es-extensions
v1.8.4
Published
Helper functions and classes aimed to reduce the routine code. Build-in TypeScript type safety.
Downloads
244
Readme
Yamato Daiwa E(CMAScript) Extensions (YDEE)
Helper functions and classes aimed to reduce the routine code.
Build-in TypeScript type safety without any type.
Oriented to TypeScript users investing the time to quality including type-safety.
Installation
npm i @yamato-daiwa/es-extensions -EDocumentation
Getting Started
- Installation
- Information About Distribution Size
- Precautions for Non-Users of TypeScript
- Importing Functionality
AJAX
Arrays
Creating
Retrieving of Elements
Retrieving of Indexes
Retrieving of Subarrays
Adding of Elements
Replacing of Elements
Permutations of Elements
Removing of Elements
Restructuring
Other
Data Mocking
Date and Time
Default value Subsituters
Although the nullish coalescing operator makes the below functions redundant, they still could be used in the environments with old ECMAScript versions.
Errors
HTTPS
RawObjectDataProcessor
The tool for the validation and processing of unknown at advance external data (from HTTP requests/responses, files, etc.).
Pre-made pre-validation modifiers
Intended to be used when some property is expected to be the string but also expected to be a valid number if to parse it.
Numbers
Strings
All functions working with strings are supporting the surrogate pairs. If some function works incorrectly with surrogate pairs, it means the bug; please feel free to open issue in this case.
Objects
Sets
Maps
Types
Type guards
Value transformers
- emptyStringToNull
- nullToEmptyString
- nullToUndefined
- nullToZero
- undefinedToEmptyArray
- undefinedToEmptyString
- undefinedToNull
