Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-vector-graphics/core

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-vector-graphics/core - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

lib/main.d.ts

6

lib/index.d.ts

@@ -1,5 +0,1 @@

import { Configuration } from '@react-vector-graphics/types';
declare const run: ({ config }: {
config: Configuration;
}) => Promise<void>;
export default run;
export { run as default } from './main';
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@svgr/core");
const plugins_1 = require("./plugins");
const normalizePluginParams = (codeOrParams, prevParams) => {
if (typeof codeOrParams === 'string') {
return Object.assign(Object.assign({ state: {} }, prevParams), { code: codeOrParams });
}
return Object.assign(Object.assign({}, prevParams), codeOrParams);
};
const run = ({ config }) => __awaiter(void 0, void 0, void 0, function* () {
const pluginArgs = [{}];
for (const plugin of plugins_1.getPlugins(config)) {
const [pluginFn, pluginConfig] = yield Promise.all([
plugins_1.resolvePlugin(plugin),
core_1.loadConfig(config),
]);
const results = yield Promise.all(pluginArgs.splice(0).map((args) => __awaiter(void 0, void 0, void 0, function* () {
const result = yield pluginFn(args.code, pluginConfig, args.state);
return (Array.isArray(result) ? result : [result])
.filter(Boolean)
.map(r => normalizePluginParams(r, args));
})));
pluginArgs.push(...pluginArgs.concat(...results));
}
});
exports.default = run;
var main_1 = require("./main");
exports.default = main_1.run;
{
"name": "@react-vector-graphics/core",
"version": "0.1.0",
"version": "0.2.0",
"description": "Core library of react-vector-graphics",

@@ -33,3 +33,3 @@ "author": "Top Hat <opensource@tophat.com>",

},
"gitHead": "bae3f9b98d20f38d1e6e5fe96d36c1a7be95988f"
"gitHead": "081e037a78fe7d460492046829ae36c5a9e96fb8"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc