Skip to content

Commit

Permalink
edit: docs; package.json run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gkucmierz committed Nov 1, 2024
1 parent 0aa26a2 commit c242e51
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
npm i
npm run docs
npm run docs:build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ npm i @gkucmierz/utils

### Docs

https://gkucmierz.github.io/utils
[https://gkucmierz.github.io/utils](https://gkucmierz.github.io/utils)

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"test": "jasmine",
"watch": "nodemon --exec 'npm test'",
"main": "node scripts/generate_main.mjs",
"docs": "jsdoc -c jsdoc.json"
"docs": "npm run docs:build; npm run docs:open",
"docs:build": "jsdoc -c jsdoc.json --readme README.md",
"docs:open": "open docs/index.html"
},
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions src/square-root.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

/**
* Native square root
* @param {Number} js double number
* @function
* @param {Number} number - js double number
* @return {Number} result
*/
export const squareRoot = n => n ** 0.5;

/**
* Calculate square root using Newton's formula
* @param {BigInt} big integer number
* @function
* @param {BigInt} number - big integer number
* @return {BigInt} result
*/
export const squareRootBI = n => {
Expand Down

0 comments on commit c242e51

Please sign in to comment.