@cicada/message
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -11,2 +11,3 @@ 'use strict'; | ||
exports.isIframe = isIframe; | ||
exports.default = createMessage; | ||
@@ -29,3 +30,3 @@ | ||
try { | ||
if (!e.data || !prefixReg.test(e.data)) return; | ||
if (!prefixReg.test(e.data)) return; | ||
messageOriginData = e.data.replace(prefixReg, ''); | ||
@@ -32,0 +33,0 @@ message = JSON.parse(messageOriginData); |
{ | ||
"name": "@cicada/message", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "cicada message", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,2 +0,2 @@ | ||
function isIframe() { | ||
export function isIframe() { | ||
return window.parent !== window | ||
@@ -14,3 +14,3 @@ } | ||
try { | ||
if (!e.data || !prefixReg.test(e.data)) return | ||
if (!prefixReg.test(e.data)) return | ||
messageOriginData = e.data.replace(prefixReg, '') | ||
@@ -17,0 +17,0 @@ message = JSON.parse(messageOriginData) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8075
118