Gathering detailed insights and metrics for postgres-range
Gathering detailed insights and metrics for postgres-range
Range data type parser and serializer for PostgreSQL
npm install postgres-range
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
93.6
Quality
75.6
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
133,704,433
Last Day
535,411
Last Week
3,352,265
Last Month
13,260,474
Last Year
102,577,780
MIT License
8 Stars
28 Commits
7 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Aug 08, 2024
Minified
Minified + Gzipped
Latest Version
1.1.4
Package Id
postgres-range@1.1.4
Unpacked Size
9.86 kB
Size
3.35 kB
File Count
5
NPM Version
10.2.4
Node Version
20.11.0
Published on
Jan 29, 2024
Cumulative downloads
Total Downloads
Last Day
0.8%
535,411
Compared to previous day
Last Week
5.4%
3,352,265
Compared to previous week
Last Month
49.9%
13,260,474
Compared to previous month
Last Year
242.5%
102,577,780
Compared to previous year
5
Parse postgres range columns
npm install --save postgres-range
1const range = require('postgres-range') 2 3const rng = range.parse('[0,5)', (value) => parseInt(value, 10)) 4rng.isBounded() 5// => true 6rng.isLowerBoundClosed() 7// => true 8rng.isUpperBoundClosed() 9// => false 10rng.hasLowerBound() 11// => true 12rng.hasUpperBound() 13// => true 14 15rng.containsPoint(4) 16// => true 17rng.containsRange(range.parse('[1,2]', x => parseInt(x))) 18// => true 19 20range.parse('empty').isEmpty() 21// => true 22 23range.serialize(new range.Range(0, 5)) 24// => '(0,5)' 25range.serialize(new range.Range(0, 5, range.RANGE_LB_INC | RANGE_UB_INC)) 26// => '[0,5]'
parse(input, [transform])
-> Range
Required
Type: string
A Postgres range string.
Type: function
Default: identity
A function that transforms non-null bounds of the range.
serialize(range, [format])
-> string
Required
Type: Range
A Range
object.
Type: function
Default: identity
A function that formats non-null bounds of the range.
MIT © Abbas Mashayekh
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
9 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/26 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More