Gathering detailed insights and metrics for bifrost-cors
Gathering detailed insights and metrics for bifrost-cors
Gathering detailed insights and metrics for bifrost-cors
Gathering detailed insights and metrics for bifrost-cors
JS library for cross-domain communication solution to share data and many more functionalities with simple as just calling a method
npm install bifrost-cors
Typescript
Module System
Node Version
NPM Version
71.1
Supply Chain
98.8
Quality
75.2
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
23 Stars
48 Commits
3 Watching
1 Branches
1 Contributors
Latest Version
1.0.4
Package Id
bifrost-cors@1.0.4
Unpacked Size
112.76 kB
Size
62.63 kB
File Count
6
NPM Version
6.9.0
Node Version
10.16.3
Cumulative downloads
Total Downloads
Last day
0%
0
Compared to previous day
Last week
0%
0
Compared to previous week
Last month
0%
0
Compared to previous month
Last year
0%
0
Compared to previous year
No dependencies detected.
npm install bifrost-cors
https://cdn.jsdelivr.net/gh/spurushottam13/bifrost-cors/index.min.js
https://cdn.jsdelivr.net/gh/spurushottam13/bifrost-cors/index.min.gz
All above methods are wrapped in a promise.
1var bifrostCors = new bifrostCors(address, iframeBoolean,iframeId)
Parameter | Required | Value |
---|---|---|
address | YES | Exact Address of the other domain |
iframeBoolean | No | true :- If you already rendering the other domain in iframe false If you are not rendering the other domain in iframe Default false |
iframeId | No | if iframeBoolean is set to true then you need to pass the ID for your Iframe in which you loading the other domain |
1var bifrostCors = new bifrostCors("http://example.com/",false) 2 3//Calling Methods without promise 4var result = bifrostCors.getLocalStorage(key) 5 6//Hanlde Promise 7 8//1. Using .then() 9bifrostCors.getLocalStorage(key).then((data) => { 10 console.log(data) 11 }) 12 13//2. Using async function 14async function grabLocalStorage(){ 15 let result = await bifrostCors.getLocalStorage(key) 16}
Cookies
1// return type Object, return all cookies 2bifrostCors.getCookie() 3 4// return type string 5bifrostCors.getCookie("key")
1bifrostCors.setCookie(name,value,days)
LocalStorage
1// return type stirng 2bifrostCors.getgetLocalStorage("key") 3 4// return type array 5bifrostCors.getLocalStorage(["key1","key2"])
1// return type Boolean 2bifrostCors.setLocalStorage({key: "user", value: "user-1"})
1// return type Boolean 2bifrostCors.deleteLocalStorage("key") 3 4// return type Boolean 5bifrostCors.deleteLocalStorage(["key1","key2"])
Bi-directional message thread
1// return type Boolean, parameter type funtion 2bifrostCors.requestMessageThread(Listner)
Listner is your custom function which will be invoked every time new message recivied, and it should expect a new message as a parameter
Here's exapmle
1function myCustomListner(newMessage){ 2 cosnole.log("Hurray I got new message ",newMessage) 3 } 4 5 bifrostCors.requestMessageThread(myCustomListner)
1// return type Boolean, parameter type string|int|array|object 2bifrostCors.send(message)
Run JS expression
1// return type Boolean, parameter type string 2bifrostCors.runExpression(expression)
DOM Manipulation
1// return type Boolean, parameter type string 2bifrostCors.domManipulationById("yourElementID")
1// return type Boolean, parameter type string,int,Objet 2bifrostCors.domManipulationById(class,index,style)
document.getElementsByClassName("myElementClass)[4]
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-16
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