![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@fresh8/tracking
Advanced tools
The project is pre bundled and transpiled using webpack and babel, into the dist folder where there is an uncompressed and uglified version of the Fresh8Tracking.js library.
Its formatted as a commonjs2 module. Use with your own bundler like so in es5:
var Fresh8Tracking = require('Fresh8Tracking').Fresh8Tracking;
The project is also pre bundled as a browser.js file to be used in the browser where the Fresh8Tracking class has been bound to the window. with this script you should be able to access window.Fresh8Tracking
you will need to ensure your babel configuration includes:
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-es2015-function-name"]
}
Assuming you have a bundler and transpiler configured correctly.
import { Fresh8Tracking } from 'Fresh8Tracking/src';
will load the Fresh8Tracking class
import Fresh8Tracking from 'Fresh8Tracking';
const fresh8Tracking = new Fresh8Tracking;
fresh8Tracking.emitEvent(data, () => {})
Ensure node 6 LTS is installed. Then.
npm install
npm test
npm run cov
Use these scripts using npm run ...
:
unit
: Run the unit tests oncebuild -- url
: Compiles the code to ES5 in the dist folder also adds a browser version, and builds readme.md. Can pass this a url
for the built version to use a different URL. url
defaults to https://heimdall.fresh8.co
docs
: Rebuild this README.mddev
: Compiles the code to ES5, and runs unit tests whilst watching for changesFresh8Tracking class holds 1 function which validates and sends data
*
| Promise.<TResult>
makes the request to the server using fetch
Promise.reject
| Object
Checks the stats code on a response and rejects the promise chain if less than 200 or greater than 300.
Error
| boolean
validates data fields to only be the fields in the validFields array validates data fields to have to include the fields in requiredFields array returns an error if validation doesn't pass, else returns true
Error
| boolean
validates the bets property of the attribute to be an array and be formatted correctly returns an error if validation doesn't pass, else returns true
boolean
checks to see if the data should contain bets or not
Fresh8Tracking class holds 1 function which validates and sends data
runs data through validation and and returns then runs sendRequest in a callback to send the data
Kind: instance method of Fresh8Tracking
Returns: returns the callback containing an error if data does
not validate or sendRequest if everything does validate
Param | Description |
---|---|
data | data to be validated and sent |
callback |
*
| Promise.<TResult>
makes the request to the server using fetch
Kind: global function
Param | Description |
---|---|
data | to be sent |
Promise.reject
| Object
Checks the stats code on a response and rejects the promise chain if less than 200 or greater than 300.
Kind: global function
Returns: Promise.reject
| Object
- a rejected promise or the reponse object
Param | Type | Description |
---|---|---|
response | Object | is the fetch response object |
Error
| boolean
validates data fields to only be the fields in the validFields array validates data fields to have to include the fields in requiredFields array returns an error if validation doesn't pass, else returns true
Kind: global function
Returns: Error
| boolean
- returns an Error if fields do not validate and true if they do
Param |
---|
data |
Error
| boolean
validates the bets property of the attribute to be an array and be formatted correctly returns an error if validation doesn't pass, else returns true
Kind: global function
Returns: Error
| boolean
- returns an Error if bets do not validate and true if they do
Param |
---|
data |
boolean
checks to see if the data should contain bets or not
Kind: global function
Param |
---|
data |
FAQs
A pixel tracking package for Fresh8
The npm package @fresh8/tracking receives a total of 0 weekly downloads. As such, @fresh8/tracking popularity was classified as not popular.
We found that @fresh8/tracking demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.