Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@justeat/f-services
Advanced tools
Readme
Install the module using NPM or Yarn:
yarn add @justeat/f-services
npm install @justeat/f-services
You can import it in your component/application like this (please note that styles have to be imported separately)
import { windowServices } from '@justeat/f-services';
// You can then (optionally) destructure
const { addEvent, getWindowWidth, removeEvent } = windowServices;
If you are using Webpack, you can import the component dynamically to separate the services bundle from the main bundle.client.js
:
createClient
Create an axios client.
createCamelCaseClient
Create an axios client with all response JSON transformed to camelCase.
getNetworkDetails
Uses the navigator API (falling back to moz/webkit) to return network information.
objectToCamelCase
Recursively converts object's property names to camelCase.
getLocale
Returns the locale for the current tenant, if the configuration for that locale is present, otherwise returns the default locale.
getTheme
Returns the theme based on the user's locale. Either ml
for Menulog or je
for Just Eat.
Uses the window-or-global
module for SSR compatibility.
addEvent
Add an event listener with a callback function. Optional throttling. Returns the function that will be called by the listener.
getWindowHeight
Returns the current innerHeight.
getWindowWidth
Returns the current innerWidth.
removeEvent
Remove an event listener. To remove a throttled event, pass in the value returned by addEvent
when the listener was added.
Returns a deep object by traversing following the provided path.
getFormValidationState
Returns an object containing arrays of the names of valid and invalid validation rules.
isValidPostcode
Returns a boolean indicating whether the provided postcode is valid in the provided locale.
isValidPhoneNumber
Returns a boolean indicating whether the provided phone number is valid in the provided locale.x
FAQs
Fozzie Services - Shared Services for Components and projects
We found that @justeat/f-services demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 29 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.