![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.
beautinator
Advanced tools
beautinator
A quick and dirty javascript pretty printer for javascript objects that runs in the browser. Works for objects that contain functions.
var result = beautinator({ "font-size": "26px","font-family": "'Open Sans', sans-serif",color: "white", overflow: "hidden",padding: "4px 4px 4px 8px",Text: { display: "block", width: "100%","text-align": "center", "padding-left": "2px","word-break": "break-word"}})
console.log(result)
Result:
{ "font-size": "26px",
"font-family": "'Open Sans', sans-serif",
color: "white", overflow: "hidden",
padding: "4px 4px 4px 8px",
Text: { display: "block", width: "100%",
"text-align": "center", "padding-left": "2px",
"word-break": "break-word"
}
}
I wanted a module that can print beautify javascript objects and runs in the browser. But all the modules I could find are either heavy-weight server-only libraries like prettier and js-prettify, or libraries that don't return valid javascript like fmt-obj and pretty-format. I did find https://github.com/xpl/string.ify but it cause me trouble since it was written in ES6, which my tools don't support yet.
npm install beautinator
Accessing beautinator:
// node.js
var beautinator = require('beautinator')
// amd
require.config({paths: {beautinator: '../dist/beautinator.umd.js'}})
require(['beautinator'], function(beautinator) { /* your code */ })
// global variable
<script src="beautinator.umd.js"></script>
beautinator; // beautinator.umd.js can define beautinator globally if you really
// want to shun module-based design
Using keysight:
var result = beautinator(jsObject)
result
will contain the object stringified.Anything helps:
How to submit pull requests:
npm install
at its roottargetWidth
Released under the MIT license: http://opensource.org/licenses/MIT
FAQs
A quick and dirty pretty printer for javascript objects
The npm package beautinator receives a total of 9 weekly downloads. As such, beautinator popularity was classified as not popular.
We found that beautinator 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.