Socket
Socket
Sign inDemoInstall

react-yandex-api-maps-script

Package Overview
Dependencies
7
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.1.0

14

lib/YandexApiMapsScript.js

@@ -16,5 +16,11 @@ "use strict";

var srcApi = {
freeVersion: 'https://api-maps.yandex.ru',
paidVersion: 'https://enterprise.api-maps.yandex.ru'
};
var YandexApiMapsScript = function YandexApiMapsScript(_ref) {
var apikey = _ref.apikey;
var src = "https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey=".concat(apikey);
var apikey = _ref.apikey,
srcApi = _ref.srcApi;
var src = "".concat(srcApi, "/2.1/?lang=ru_RU&apikey=").concat(apikey);
return _react.default.createElement(_reactScriptTag.default, {

@@ -27,5 +33,9 @@ src: src,

YandexApiMapsScript.propTypes = {
typeSrc: _propTypes.string,
apikey: _propTypes.string.isRequired
};
YandexApiMapsScript.defaultProps = {
typeSrc: srcApi.freeVersion
};
var _default = YandexApiMapsScript;
exports.default = _default;

2

package.json
{
"name": "react-yandex-api-maps-script",
"version": "1.0.6",
"version": "1.1.0",
"description": "yandex api maps script binding for React",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -5,5 +5,11 @@ import React from 'react'

const YandexApiMapsScript = ({apikey}) => {
const src = `https://api-maps.yandex.ru/2.1/?lang=ru_RU&apikey=${apikey}`
return (
const srcApi = {
freeVersion: 'https://api-maps.yandex.ru',
paidVersion: 'https://enterprise.api-maps.yandex.ru',
}
const YandexApiMapsScript = ({apikey, srcApi}) => {
const src = `${srcApi}/2.1/?lang=ru_RU&apikey=${apikey}`
return (
<ScriptTag src={src} type="text/javascript" />

@@ -14,5 +20,10 @@ )

YandexApiMapsScript.propTypes = {
typeSrc: string,
apikey: string.isRequired,
}
YandexApiMapsScript.defaultProps = {
typeSrc: srcApi.freeVersion,
}
export default YandexApiMapsScript
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc