![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.
Lettering.js in vanilla JavaScript
HTML:
<h1>foo</h1>
JavaScript:
const charming = require('charming')
const element = document.querySelector('h1')
charming(element)
Boom:
<h1 aria-label="foo">
<span class="char1" aria-hidden="true">f</span>
<span class="char2" aria-hidden="true">o</span>
<span class="char3" aria-hidden="true">o</span>
</h1>
aria-label
attribute on the given element and aria-hidden
attributes on each of the inserted DOM elements.const charming = require('charming')
element
is a DOM elementoptions
is an optional configuration objectUse options.tagName
to change the tag name of the wrapper element:
charming(element, {
tagName: 'b'
})
Use options.setClassName
to change the class name on each wrapper element:
charming(element, {
setClassName: function (index, letter) {
return `index-${index} letter-${letter}`
}
})
Use options.split
to control how the contents of the element are wrapped:
charming(element, {
split: function (string) {
return string.split(/(\s+)/)
},
setClassName: function (index) {
return `word-${index}`
}
})
$ yarn add charming
FAQs
Lettering.js in vanilla JavaScript
The npm package charming receives a total of 126 weekly downloads. As such, charming popularity was classified as not popular.
We found that charming 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
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.