@mvanvu/ujs
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Util JS

UMD JS work on the both Browser and NodeJs

Install

// With yarn
yarn add @mvanvu/ujs

// With NPM
npm install @mvanvu/ujs

Usage On Browser

<script src="dist/index.js">
    const { DateTime } = window.$ujs;
    console.log(DateTime.now());
</script>

Usage On NodeJS

import { DateTime } from '@mvanvu/ujs';
console.log(DateTime.now());

Test

// Test all utils
yarn test

// Test for a util
yarn test datetime

See all the sample tests at: /test/lib

API Documentation

  • Array an advanced of the JS native Array
  • DateTime an advanced of the JS native Date
  • EventEmitter an event emitter
  • Hash provide some useful methods such as: base64, sha256, uuid, JWT...
  • Is validate the value that will (or will not) match some conditions
  • Object provide some useful static and instance methods for the Object
  • Registry powerful object key-value pair manager
  • String an advanced of the JS native String
  • Transform provide the transformer to convert any value to some expected value
  • Util provide some useful common util methods

Package Sidebar

Install

npm i @mvanvu/ujs

Weekly Downloads

2

Version

0.0.6

License

MIT

Unpacked Size

110 kB

Total Files

20

Last publish

Collaborators

  • mvanvu