Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
crossroads
Advanced tools
Readme
Crossroads.js is a routing library inspired by URL Route/Dispatch utilities present on frameworks like Rails, Pyramid, Django, CakePHP, CodeIgniter, etc... It parses a string input and decides which action should be executed by matching the string against multiple patterns.
If used properly it can reduce code complexity by decoupling objects and also by abstracting navigation paths.
See project page for documentation and more details.
This library requires JS-Signals to work.
Files inside dist
folder.
You can install Crossroads on Node.js using NPM
npm install crossroads
dev -> development files
|- lib -> 3rd-party libraries
|- src -> source files
|- tests -> unit tests
dist -> distribution files
master -> always contain code from the latest stable version
release-** -> code canditate for the next stable version (alpha/beta)
dev -> main development branch (nightly)
gh-pages -> project page
**other** -> features/hotfixes/experimental, probably non-stable code
This project uses Node.js for the build process. If for some reason you need to build a custom version install Node.js and run:
node build
This will delete all JS files inside the dist
folder, merge/update/compress source files and copy the output to the dist
folder.
IMPORTANT: dist
folder always contain the latest version, regular users should not need to run build task.
Open dev/tests/spec_runner-dist.html
on your browser.
spec_runner-dist
tests dist/crossroads.js
and spec_runner-dev
tests files inside
dev/src
- they all run the same specs.
Install npm and run:
npm install --dev
npm test
Each time you run npm test
the files inside the dist
folder will be updated
(it executes node build
as a pretest
script).
FAQs
Flexible router which can be used in multiple environments
The npm package crossroads receives a total of 11,789 weekly downloads. As such, crossroads popularity was classified as popular.
We found that crossroads 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.