Gathering detailed insights and metrics for @justeat/f-services
Gathering detailed insights and metrics for @justeat/f-services
npm install @justeat/f-services
Typescript
Module System
Min. Node Version
Node Version
NPM Version
58.3
Supply Chain
99
Quality
84.5
Maintenance
100
Vulnerability
99.6
License
core-analytics@1.21.0
Published on 11 Jul 2023
f-header@v10.15.0
Published on 26 Jun 2023
f-registration@3.8.0
Published on 28 Oct 2022
f-registration@3.7.2
Published on 21 Oct 2022
f-error-message@2.3.0
Published on 03 Oct 2022
f-header@10.7.0
Published on 13 Sept 2022
JavaScript (73.55%)
Vue (17.7%)
SCSS (5.65%)
MDX (2.88%)
HTML (0.19%)
CSS (0.01%)
Handlebars (0.01%)
Total Downloads
192,144
Last Day
1
Last Week
4
Last Month
58
Last Year
43,696
16 Stars
1,971 Commits
38 Forks
32 Watching
271 Branches
78 Contributors
Minified
Minified + Gzipped
Latest Version
1.18.1
Package Id
@justeat/f-services@1.18.1
Unpacked Size
127.51 kB
Size
38.98 kB
File Count
6
NPM Version
lerna/3.22.1/node@v20.12.2+x64 (linux)
Node Version
20.12.2
Publised On
29 Apr 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-50%
4
Compared to previous week
Last month
-40.2%
58
Compared to previous month
Last year
605.8%
43,696
Compared to previous year
2
1
Install the module using NPM or Yarn:
1yarn add @justeat/f-services
1npm install @justeat/f-services
You can import it in your component/application like this (please note that styles have to be imported separately)
1import { windowServices } from '@justeat/f-services'; 2 3// You can then (optionally) destructure 4const { addEvent, getWindowWidth, removeEvent } = windowServices; 5
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
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
64 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
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