ertu-js-utils
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

ertu-js-utils

A collection of utility functions for data validation and date formatting.

Installation

You can install this package in your project using npm:

npm install ertu-js-utils

Usage

isNull

Usage example

const { isNull } = require('ertu-js-utils');

console.log(isNull(null)); // true
console.log(isNull(5));    // false

formatCreatedAt

Usage example

const { formatCreatedAt } = require('ertu-js-utils');

const date = '2023-10-17T12:34:56Z';
console.log(formatCreatedAt(date, 'en-US', true)); // 10/17/2023, 12:34 PM GMT
console.log(formatCreatedAt(date, 'tr-TR'));   

isNumber

Usage example

const { isNumber } = require('ertu-js-utils');

console.log(isNumber(123));       // true
console.log(isNumber("456"));     // true
console.log(isNumber("456a"));     // false
console.log(isNumber("abc"));     // false
console.log(isNumber(null));      // false

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.10latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.10
1.1.00
1.0.00

Package Sidebar

Install

npm i ertu-js-utils

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

2.98 kB

Total Files

4

Last publish

Collaborators

  • ertugrul.yaman