Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@humblejs/lib
Advanced tools
Common utils library
yarn add @humblejs/lib
Following styles must be imported for all the components
@import '@humblejs/lib/dist/css/global.scss';
@import '@humblejs/lib/dist/css/themes/default.scss';
Other available files
@humblejs/lib/dist/css/reset.scss
@humblejs/lib/dist/css/toc.scss
(table of contents)Import complete library
import lib from '@humblejs/lib';
Import specific function or module
import { logger } from '@humblejs/lib';
or you can import from direct location like:
import logger from '@humblejs/lib/dist/js/logger';
Name | Direct import |
---|---|
logger ~> { info, debug, error, warn } ,{ isLoggingEnabled } | dist/js/logger |
Analytics ~> { sendEvent, reset, pageview } | dist/js/ga |
{ generateToc, addPermaLinkToHeaders } | dist/js/toc |
{ isBrowser, isIE } | dist/js/browser |
registerScrollCallback, { isElementInViewport } | dist/js/register-scroll-callback |
addListener(elem, evt, fn), { addEventListener } | dist/js/event/add-listener |
removeListener(elem, evt, fn) | dist/js/event/remove-listener |
logger
Enable/disable console
logging. Configuration is based on localStorage
ga
Google analytics wrapper
toc
Table of contents generator
browser
Browser related utility functions
register-scroll-callback
Register callback when user scrolls the page
registerScrollCallback
takes options with callback
(fn) and scrollRefId
(element ID) so when scrollRefId
is in view (or passed the point) callback
is triggered.
e.g,
window.onload = function() {
registerScrollCallback({
scrollRefId: 'menu-bar',
callback: () => {
console.log('Just past the menu bar');
},
});
}
FAQs
Common utils library
The npm package @humblejs/lib receives a total of 8 weekly downloads. As such, @humblejs/lib popularity was classified as not popular.
We found that @humblejs/lib demonstrated a healthy version release cadence and project activity because the last version was released less than 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.