Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Gematriya/Gematria, or perhaps more accurately, Hebrew numerals, is a system of writing numbers as Hebrew letters. This JavaScript module allows for easy conversion between gematriya and JavaScript Number
types.
This code was originally written for hebcal/hebcal-js.
Install gematriya from NPM, bower, or just take the gematriya.js
script from this repo.
npm install gematriya
bower install gematriya
On the client side, the API is available through the global function gematriya
. In Node, require('gematriya')
.
A single function is available. Pass it a Number
or String
. Given a number, it will return the string representation. Given a gematriya string, it will return the number it represents.
When passing a string, by default, it just adds up the numbers, regardless of place. By passing {order: true}
as a second parameter, it will treat it as being ordered, as per the output (see below).
When passing a number, an optional options object is available as a second parameter. Setting a number as a value for the limit
key will limit the length of the returned string to a number of digits. Setting false as the value for the punctuate
key will remove double and single quotation marks in the returned string. Setting geresh
to false will use ASCII single/double quotes instead of Hebrew geresh/gershayim Unicode characters. Like this:
gematriya(5774) // התשע״ד - ordinary
gematriya(5774, {limit: 3}) // תשע״ד - cropped to 774
gematriya(5774, {limit: 7}) // התשע״ד - kept at 5774
gematriya(5774, {punctuate: false}) // 'התשעד' - removed quotation marks
gematriya(5774, {punctuate: true}) // 'התשע״ד' - with quotation marks
gematriya(5774, {geresh: false}) // 'התשע"ד' - with quotation marks
gematriya(5774, {punctuate: false, limit: 3}) // 'תשעד' - options can be combined
gematriya(3) // 'ג׳' - note the geresh is RTL
gematriya(3, {geresh: false}) // - "ג'" - the apostrophe is not
gematriya('התשעד', {order: true}) // 5774 - treats the characters as an ordered number
gematriya('התשעד', {order: false}) // 779 - Adds up all the characters
Licensed MIT.
FAQs
Convert numbers to gematriya representation, and vice-versa.
The npm package gematriya receives a total of 1,155 weekly downloads. As such, gematriya popularity was classified as popular.
We found that gematriya demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.