Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
JavaScript objects API visualization
Node module (CJS) - https://unpkg.com/apivis@latest/dist/apivis.node.js
Browser bundle (UMD) - https://unpkg.com/apivis@latest/dist/apivis.browser.js
Universal ES module - https://unpkg.com/apivis@latest/dist/apivis.universal.mjs
npm install apivis
All distribution files are in node_modules/apivis/dist/
<script src="https://unpkg.com/apivis@latest/dist/apivis.browser.js"></script>
const apivis = require('apivis');
const {apiStr} = apivis;
console.log(apiStr(process));
const {apiStr} = apivis;
document.addEventListener('DOMContentLoaded', () => {
console.log(apiStr(document));
});
import apivis, {apiStr} from 'apivis/dist/apivis.universal'; // Node
import apivis, {apiStr} from 'apivis'; // Bundlers
// Use the imports
The following properties/functions are available through the apivis namespace object returned from require('apivis')
on node or available as window.apivis
in the browser (the ES module has the namespace object as default export and all the functions as named exports):
version
- library version
typeStr(val)
- returns type string for val
(based on Object.prototype.toString.call(val)
with a few twists)
descStr(val, k)
- returns own property descriptor string for k
in val
in the form vw ec
or g c
for example, where each letter shows if the prop is value and writable or getter and setter and if it is enumerable and configurable
members(val)
- returns (sorted) array of all own val
property names (including symbols)
membersStr(val, indent = ' ', level = 0)
- returns string representation of all own val
property names (including symbols) with type and own property descriptor information and the values of the primitive booleans, numbers and strings, separated by a newline and indented accordingly
chain(val)
- returns the prototype chain of val
(an array, val
is first, the root is last)
chainStr(val, indent = ' ')
- returns string representation of val
prototype chain
apiStr(val, indent = ' ')
- returns string representation of val
API tree
See the example folder for node and browser examples respectively
FAQs
JavaScript objects API visualization
We found that apivis 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
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.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.