-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,24 @@ Below are examples and descriptions of all the functions available in jsHelpers. | |
### ES6 | ||
`npm i js-helpers --save` | ||
```javascript | ||
import "js-helpers" | ||
import "@rah-emil/js-helpers" | ||
``` | ||
or | ||
```javascript | ||
import { simplifyNumber } from "@rah-emil/js-helpers/src/modules/visual" | ||
|
||
Number.prototype.simplifyNumber = simplifyNumber | ||
|
||
(3568934).simplifyNumber(2) // 3.57M | ||
``` | ||
|
||
### CDN | ||
```html | ||
<script src=""></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@rah-emil/[email protected]/dist/js-helpers.js"></script> | ||
|
||
<script> | ||
(3568934).simplifyNumber(2) // 3.57M | ||
</script> | ||
``` | ||
|
||
## Math functions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,24 @@ jsHelpers - это JavaScript библиотека, которая содерж | |
### ES6 | ||
`npm i js-helpers --save` | ||
```javascript | ||
import "js-helpers" | ||
import "@rah-emil/js-helpers/dist/js-helpers" | ||
``` | ||
или | ||
```javascript | ||
import { simplifyNumber } from "@rah-emil/js-helpers/src/modules/visual" | ||
|
||
Number.prototype.simplifyNumber = simplifyNumber | ||
|
||
(3568934).simplifyNumber(2) // 3.57M | ||
``` | ||
|
||
### CDN | ||
```html | ||
<script src=""></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@rah-emil/[email protected]/dist/js-helpers.js"></script> | ||
|
||
<script> | ||
(3568934).simplifyNumber(2) // 3.57M | ||
</script> | ||
``` | ||
|
||
## Математические функции | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "@rah-emil/js-helpers", | ||
"version": "1.0.0", | ||
"description": "js-helpers for quick development", | ||
"main": "dist/index.js", | ||
"version": "1.0.1", | ||
"description": "jsHelpers - it is a JavaScript library that contains all the functions that we constantly write or google.", | ||
"main": "dist/js-helpers.js", | ||
"scripts": { | ||
"build": "npx mix", | ||
"watch": "npx mix watch", | ||
|
@@ -15,7 +15,9 @@ | |
"keywords": [ | ||
"JavaScript", | ||
"JS", | ||
"helpers" | ||
"helpers", | ||
"RegExp", | ||
"library" | ||
], | ||
"author": "Rah Emil <[email protected]>", | ||
"license": "MIT", | ||
|