Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/motss/jsmodern
An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.
https://github.com/motss/jsmodern
extensions javascript javascript-extensions jsmodern node typescript
Last synced: 3 months ago
JSON representation
An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.
- Host: GitHub
- URL: https://github.com/motss/jsmodern
- Owner: motss
- License: mit
- Created: 2019-06-24T14:23:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:18:11.000Z (about 2 years ago)
- Last Synced: 2024-10-05T12:45:38.260Z (3 months ago)
- Topics: extensions, javascript, javascript-extensions, jsmodern, node, typescript
- Language: TypeScript
- Homepage: https://npm.im/jsmodern
- Size: 687 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
jsmodern
An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.
[![tippin.me][tippin-me-badge]][tippin-me-url]
[![Follow me][follow-me-badge]][follow-me-url][![Version][version-badge]][version-url]
[![Node version][node-version-badge]][node-version-url]
[![MIT License][mit-license-badge]][mit-license-url][![Downloads][downloads-badge]][downloads-url]
[![Total downloads][total-downloads-badge]][downloads-url]
[![Packagephobia][packagephobia-badge]][packagephobia-url]
[![Bundlephobia][bundlephobia-badge]][bundlephobia-url][![ci][ga-badge]][ga-url]
[![Dependency Status][daviddm-badge]][daviddm-url]
[![codecov][codecov-badge]][codecov-url]
[![Coverage Status][coveralls-badge]][coveralls-url][![codebeat badge][codebeat-badge]][codebeat-url]
[![Codacy Badge][codacy-badge]][codacy-url]
[![Code of Conduct][coc-badge]][coc-url]> This is, by no means, to replace JavaScript or anything like that. This is just a rather straightforward module that extends native JavaScript with useful methods that are available in some other great languages such as Rust, Dart, Java, Golang, just to name a few. This is the state what I wanted JavaScript to be in next few years. If you're with me, let's hit me up for collaboration! 💯
## Table of contents
- [Pre-requisites](#pre-requisites)
- [Installation](#installation)
- [Usage](#usage)
- [Available extensions](#available-extensions)
- [License](#license)## Pre-requisites
* [OPTIONAL] [TypeScript] >= `3.8.3` _Minimum version for TypeScript users_
## Installation
```sh
# Install via NPM
$ npm install --save jsmodern
```## Usage
```ts
// It is recommended to only import those extensions you need instead of everything.
import { extend } from 'jsmodern';
import { sum } from 'jsmodern/dist/array/index.js';extend({ array: [sum] });
const total = [1, 2, 3].sum();
console.log(total === 6); // true
```## Available extensions
* [x] [Array extensions]
* [x] [Boolean extensions]
* [x] [Date extensions]
* [x] [Error extensions]
* [x] [Function extensions]
* [x] [Iterator extensions]
* [x] [Map extensions]
* [x] [Number extensions]
* [x] [Object extensions]
* [x] [Promise extensions]
* [x] [RegExp extensions]
* [x] [Set extensions]
* [x] [String extensions]
* [x] [Symbol extensions]
* [x] [WeakMap extensions]
* [x] [WeakSet extensions]## License
[MIT License](https://motss.mit-license.org/) © Rong Sen Ng (motss)
[TypeScript]: https://github.com/Microsoft/TypeScript
[Array extensions]: /src/array
[Boolean extensions]: /src/boolean
[Date extensions]: /src/date
[Error extensions]: /src/error
[Function extensions]: /src/function
[Iterator extensions]: /src/iterator
[Map extensions]: /src/map
[Number extensions]: /src/number
[Object extensions]: /src/object
[Promise extensions]: /src/promise
[RegExp extensions]: /src/regexp
[Set extensions]: /src/set
[String extensions]: /src/string
[Symbol extensions]: /src/symbol
[WeakMap extensions]: /src/weak-map
[WeakSet extensions]: /src/weak-set[tippin-me-badge]: https://badgen.net/badge/%E2%9A%A1%EF%B8%8Ftippin.me/@igarshmyb/F0918E
[follow-me-badge]: https://flat.badgen.net/twitter/follow/igarshmyb?icon=twitter[version-badge]: https://flat.badgen.net/npm/v/jsmodern?icon=npm
[node-version-badge]: https://flat.badgen.net/npm/node/jsmodern
[mit-license-badge]: https://flat.badgen.net/npm/license/jsmodern[downloads-badge]: https://flat.badgen.net/npm/dm/jsmodern
[total-downloads-badge]: https://flat.badgen.net/npm/dt/jsmodern?label=total%20downloads
[packagephobia-badge]: https://flat.badgen.net/packagephobia/install/jsmodern
[bundlephobia-badge]: https://flat.badgen.net/bundlephobia/minzip/jsmodern[ga-badge]: https://github.com/motss/jsmodern/workflows/ci/badge.svg?branch=master
[daviddm-badge]: https://flat.badgen.net/david/dep/motss/jsmodern
[codecov-badge]: https://flat.badgen.net/codecov/c/github/motss/jsmodern?label=codecov&icon=codecov
[coveralls-badge]: https://flat.badgen.net/coveralls/c/github/motss/jsmodern?label=coveralls[codebeat-badge]: https://codebeat.co/badges/9a16d4cb-4821-48eb-a10a-7b47960870ea
[codacy-badge]: https://api.codacy.com/project/badge/Grade/7ccfc89554e24398bc5056f66dc680a7
[coc-badge]: https://flat.badgen.net/badge/code%20of/conduct/pink[tippin-me-url]: https://tippin.me/@igarshmyb
[follow-me-url]: https://twitter.com/igarshmyb?utm_source=github.com&utm_medium=referral&utm_content=motss/app-datepicker[version-url]: https://www.npmjs.com/package/jsmodern
[node-version-url]: https://nodejs.org/en/download
[mit-license-url]: https://github.com/motss/jsmodern/blob/master/LICENSE[downloads-url]: https://www.npmtrends.com/jsmodern
[packagephobia-url]: https://packagephobia.now.sh/result?p=jsmodern
[bundlephobia-url]: https://bundlephobia.com/result?p=jsmodern[ga-url]: https://github.com/motss/jsmodern/actions?query=workflow%3Aci
[daviddm-url]: https://david-dm.org/motss/jsmodern
[codecov-url]: https://codecov.io/gh/motss/jsmodern
[coveralls-url]: https://coveralls.io/github/motss/jsmodern?branch=master[codebeat-url]: https://codebeat.co/projects/github-com-motss-jsmodern-master
[codacy-url]: https://www.codacy.com/app/motss/jsmodern?utm_source=github.com&utm_medium=referral&utm_content=motss/jsmodern&utm_campaign=Badge_Grade
[coc-url]: https://github.com/motss/jsmodern/blob/master/CODE_OF_CONDUCT.md