Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
browser-interaction-time
Advanced tools
browser-interaction-time lets you track the time a user is active on your webpage while ignoring time spent on a different tab or with a minimized window. It also ignores the time spent while the user is idle on a web page meaning after a certain amount of time (idleTimeoutMs) without any user interactions (scroll, mousemovement etc) the time will also stop until the next user interaction.
You can import the generated bundle to use the whole library generated by this starter:
import BrowserInteractionTime from 'browser-interaction-time'
Additionally, you can import the transpiled modules from dist/lib
in case you have a modular library:
import BrowserInteractionTime from 'browser-interaction-time/dist/lib/'
import BrowserInteractionTime from 'browser-interaction-time'
const browserInteractionTime = new BrowserInteractiontime({
timeIntervalEllapsedCallbacks: [],
absoluteTimeEllapsedCallbacks: [],
browserTabInactiveCallbacks: [],
browserTabActiveCallbacks: [],
idleTimeoutMs: 3000,
checkCallbacksIntervalMs: 250
})
browserInteractionTime.startTimer()
browserInteractionTime.stopTimer()
const cb = {
multiplier: time => time * 2,
timeInMilliseconds: 1000,
callback: () => console.log('callback')
}
browserInteractionTime.addTimeIntervalEllapsedCallback(cb)
const callbackData = {
timeInMilliseconds: 1000,
callback: () => console.log('callback')
pending: true
}
browserInteractionTime.addAbsoluteTimeEllapsedCallback(callbackData)
const callback = () => console.log('some callback')
browserInteractionTime.addBrowserTabInactiveCallback(callback)
const callback = () => console.log('some callback')
browserInteractionTime.addBrowserTabActiveCallback(callback)
browserInteractionTime.mark('a-mark')
browserInteractionTime.mark('b-mark')
browserInteractionTime.getMarks('a-mark')
browserInteractionTime.measure('a-measure', 'a-mark', 'b-mark')
browserInteractionTime.getMeasures('a-measure') // Array of measures with name
browserInteractionTime.getTimeInMilliseconds() // number
browserInteractionTime.isRunning() // boolean
browserInteractionTime.reset()
browserInteractionTime.destroy()
npm t
: Run test suitenpm start
: Run npm run build
in watch modenpm run test:watch
: Run test suite in interactive watch modenpm run test:prod
: Run linting and generate coveragenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codenpm run commit
: Commit using conventional commit style (husky will tell you to use it if you haven't :wink:)Maximilian Heinz @meandmax
❤️ Logo Design by Dominik Straka
FAQs
Unknown package
The npm package browser-interaction-time receives a total of 7,939 weekly downloads. As such, browser-interaction-time popularity was classified as popular.
We found that browser-interaction-time 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.