Gathering detailed insights and metrics for @janiscommerce/superstruct
Gathering detailed insights and metrics for @janiscommerce/superstruct
Gathering detailed insights and metrics for @janiscommerce/superstruct
Gathering detailed insights and metrics for @janiscommerce/superstruct
npm install @janiscommerce/superstruct
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
82,499
Last Day
56
Last Week
263
Last Month
1,468
Last Year
20,542
1 Stars
36 Commits
1 Watchers
13 Branches
5 Contributors
Updated on Mar 25, 2025
Minified
Minified + Gzipped
Latest Version
1.2.2
Package Id
@janiscommerce/superstruct@1.2.2
Unpacked Size
8.88 kB
Size
2.89 kB
File Count
4
NPM Version
10.8.2
Node Version
18.20.7
Published on
Mar 25, 2025
Cumulative downloads
Total Downloads
Last Day
833.3%
56
Compared to previous day
Last Week
-7.1%
263
Compared to previous week
Last Month
-11.6%
1,468
Compared to previous month
Last Year
-9.8%
20,542
Compared to previous year
1
The following package complements the superstruct package, the same adds some methods to easily validate different types of data
1npm install @janiscommerce/superstruct
The custom types that you can use in addition to the superstruct are:
email
This type checks if is a valid emailURL
This type checks if is a valid URLempty
This type checks if it's an empty string, array or a falsy value!empty
This type checks if it's not an empty string, array or a falsy valuelowercase
This type checks if is a valid lowercase stringuppercase
This type checks if is a valid uppercase stringcamelcase
This type checks if is a valid camelcase stringnumeric
This type checks if is a valid numeric valuemd5
This type checks if is a valid md5 hashJSON
This type checks if is a valid JSONISODate
This type checks if is a valid ISO Dateinteger
This type checks if is a integer numberpositive
This type checks if is a positive numberpositiveOrZero
This type checks if is a positive number or zeroobjectId
This type checks if is a ObjectId with 24 charactersUUID
This type checks if is a V4 UUIDhexColor
This type checks if is a Hexadecimal Color1const { struct } = require('@janiscommerce/superstruct'); 2 3const userStruct = struct({ 4 name: 'string', 5 email: 'email', 6 age: 'number', 7 password: 'md5', 8 image: 'URL', 9 mainColor: 'hexColor 10}); 11 12const userData = { 13 name: 'John Doe', 14 email: 'emai@asd.com', 15 age: 28, 16 password: 'be5b0158b79c90c8358990f34ec18d43', 17 image: 'https://gravatar.com/avatar/23463b99b62a72f26ed677cc556c44e8?s=200', 18 hexColor: '#123456' 19}; 20 21userStruct(userData);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 4/20 approved changesets -- score normalized to 2
Reason
8 existing vulnerabilities detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
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