Skip to content
A set of javascript most used utils📑
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
packages
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.prettierignore
.prettierrc
CHANGELOG.md
CODE_OF_CONDUCT.md
LICENSE
README.md
commitlint.config.js
jest.config.js
lerna.json
logo.png
package-lock.json
package.json
tsconfig.json

README.md

sagittarius

A set of javascript most used utils.

GitHub

Getting started.

  • Install: npm i sagittarius-core
const { random, isEmpty } = require('sagittarius-core')
// Or install needed utils separately
// const random =  require('sagittarius-random')

// check if argument is empty
console.log(isEmpty({})) // true
// get a random nr
console.log(random(12, 21))

Or use via cdn:

<!--index.html-->
<script src="https://cdn.jsdelivr.net/npm/sagittarius-core@latest/build/index.js"></script>
<script>
  // check if argument is empty
  console.log(sagittarius.isEmpty({ a: 21 })) // false
  // get a random nr
  console.log(sagittarius.random(12, 21))
</script>

See more utils in description below

Data generation

  • random: Random number generation from range
  • uniqueId: Generates a unique ID. If prefix is given, the ID is appended to it.

Data validation

  • isEmpty: Check if provided argument is empty

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

@Gherciu/sagittarius © GHERCIU, Released under the MIT License.
Authored and maintained by GHERCIU with help from contributors (list).

If you like this repository star⭐ and watch👀 on GitHub

You can’t perform that action at this time.