
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
transform-parser
Advanced tools
A small utility which converts css transform string to an object and vice versa.
npm i transform-parser
# or
yarn add transform-parser
You can also addtransform-parser
directly to your webpage and use it. The package will be available
under window.transform
.
<script src="https://unpkg.com/transform-parser"></script>
Like React, the default unit is px(pixel). When a number is passed as value, it will be suffixed
with px
and vice verse. Of course, the substitution will be skipped for transforms which requires
numeral values, like scale3d()
.
import { parse, stringify } from 'transform-parser';
const transformString =
'translate3d(10px, 40px, 24px) scale3d(1.1, 1.1, 1.1) perspective(20px)';
parse(transformString);
// => {translate3d: [10, 40, 24], scale3d(1.1, 1.1, 1.1), perspective: 20}
const transformObject = {
rotate3d: [1, 2.0, 3.0, '10deg'],
scale3d: [1.1, 1.1, 1.1],
skewX: '30deg',
};
stringify(transformObject);
// => 'rotate3d(1, 2.0, 3.0, 10deg) scale3d(1.1, 1.1, 1.1) skewX(30deg)'
yarn install
yarn build
yarn test
MIT
FAQs
Converts css transform string to an object and vice versa
We found that transform-parser 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.