Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@qeepsake/rails-guid
Advanced tools
Tiny (zero dependancy) utility to create and extract rails guid strings in JavaScript 🛤
Zero dependancy utility for creating and extracting rails GUIDs from a string.
npm install --save @qeepsake/rails-guid
You can use extractRailsId
to extract a Rails GUID from a string:
import { extractRailsId } from '@qeepsake/rails-guid';
const guid = "gid://qeepsake-rails/Model/55587";
extractRailsId(guid) // -> 55587
You can use the createRailsId
to create Rails GUID:
import { createRailsId } from '@qeepsake/rails-guid';
const id = 55587 || "55587";
createRailsId(id, "Model") // -> gid://qeepsake-rails/Model/55587
import { isExtractedRailsId } from '@qeepsake/rails-guid';
isExtractedRailsId("55587") // => true
isExtractedRailsId("gid://qeepsake-rails/Model/55587") // => false
You can use `isRailsId`` to test if a string is a valid Rails Global ID:
import { isRailsId } from '@qeepsake/rails-guid';
isRailsId("gid://qeepsake-rails/User/1") // => true
isRailsId("gid://someotherapp/User/1") // => true
isRailsId("User/1") // => false
This function tests if the string conforms to the general Rails gid structure: gid://<ANY_APP_NAME>/<MODEL_NAME>/<ID>
.
MIT © lukebrandonfarrell
Thanks goes to these wonderful people (emoji key):
Luke Brandon Farrell 📆 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Tiny (zero dependancy) utility to create and extract rails guid strings in JavaScript 🛤
We found that @qeepsake/rails-guid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.