Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
data-structures-kit
Advanced tools
Attributes Kit is a (as the name suggest) kit which helps you with rendering MSON (plain-text, human and machine readable, description format for describing data structures).
For instance—it turns the following...
- id: 1
- name: A green door
- price: 12.50
- tags: home, green
...into this.
Please see the list of supported features →
This application has been deployed to Heroku, try it out at attributes-kit.herokuapp.com.
git clone git@github.com:apiaryio/attributes-kit.git
cd ./attributes-kit
npm install
npm start
You can go to localhost:8080 to try out the Playground, or to /examples.html to see the list of examples.
If you would like to use it in your application, please see the Usage section.
npm install attributes-kit
import AttributesKit from 'attributes-kit/dist/attributes-kit';
var AttributesKit = require('attributes-kit/dist/attributes-kit');
Use the Attributes Kit, you can see the API.
<script>
tagIf you prefer to drop a <script>
tag in your page, here's how to do it. Just a note—all builds do support UMD (AMD and CommonJS) out of the box.
Go to the [Releases](https://github.com/apiaryio/attributes-kit/releases) page and download the latest release, or you can download all the builds directly below.
Development Build |
---|
attributes-kit.js ; attributes-kit.js.map |
Works out of the box, the uncompressed file is best used during development or debugging. attributes-kit.js.map is not required to run the Kit. |
Production Build |
---|
attributes-kit.min.js |
Works out of the box, compressed version saves bandwidth and improves performance in production. |
Development Build |
---|
https://npmcdn.com/attributes-kit/dist/attributes-kit.js |
Production Build |
---|
https://npmcdn.com/attributes-kit/dist/attributes-kit.min.js |
<script>
tag<script src="./attributes-kit.js"></script>
var AttributesKit = window.AttributesKit;
AttributesKit.render(refractElement, element, options);
Please see the API.
There are two more builds mainly for more advanced use cases.
Build without React |
---|
attributes-kit-no-react.js ; attributes-kit-no-react.js.map |
This build does not contain React dependency. You have to install React manually, or your application lists React in its dependencies (in package.json ). |
Build without dependencies |
---|
attributes-kit-no-deps.js ; attributes-kit-no-deps.js.map |
This build does not contain any dependencies of the Attributes Kit. You have to install all dependencies manually, or your application lists them all in (e.g.) package.json . |
You can use the Attributes Kit on the server too. For instance—you can generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl you pages for SEO purposes.
npm install attributes-kit
Please mind the dist/attributes-kit-server
suffix.
import AttributesKit from 'attributes-kit/dist/attributes-kit-server';
var AttributesKit = require('attributes-kit/dist/attributes-kit-server');
import React from 'react';
import ReactDomServer from 'react-dom/server'
import {Attributes} from 'attributes-kit/dist/attributes-kit-server';
const element = React.createElement(Attributes, {
element: [Refract Element]
});
ReactDomServer.renderToString(element);
render
Methodimport AttributesKit from 'attributes-kit/dist/attributes-kit';
AttributesKit.render(refractElement, element, options);
import AttributesKit from 'attributes-kit/dist/attributes-kit';
let attributes = new AttributesKit({element, options});
attributes.render(refractElement);
import ReactDom from 'react-dom';
import {Attributes} from 'attributes-kit/dist/attributes-kit';
ReactDom.render(<Attributes element={refractElement} />, element);
Attributes Kit always takes the same parameters.
Parameter | Description |
---|---|
refractElement | Refract element to be rendered. |
element | A DOM node or a CSS selector; Attributes Kit will be rendered inside the element. |
options | An options object to customize the rendering. |
options.dataStructures | If set, these data structures will be used to dereference the refractElement being rendered. It should be a js array of refract elements. |
git clone git@github.com:apiaryio/attributes-kit.git
cd ./attributes-kit
npm install
npm start
Congratulations! You are all set to start developing now! :rocket:
Package | Version |
---|---|
React | 0.14+ |
React DOM | 0.14+ |
Node | 0.10.40+ |
NPM | 2.11+ |
Browser | Version |
---|---|
Google Chrome | 15+ |
Safari | 6.1+ |
Firefox | 28+ |
Edge | 12+ |
IE | 11+ |
Opera | 12.1+ |
Please see the STATUS.md
file.
Attributes Kit is maintained under the Semantic Versioning guidelines. Releases will be numbered with the following format.
<major>.<minor>.<patch>
And constructed with the following guidelines.
<major>
<minor>
<patch>
Please see the Releases section of our GitHub project for changelog.
Please see the Contributions guidelines.
This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.
MIT.
FAQs
React component for MSON rendering
The npm package data-structures-kit receives a total of 0 weekly downloads. As such, data-structures-kit popularity was classified as not popular.
We found that data-structures-kit 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.