Skip to content

Commit ec06e19

Browse files
Fixed README.md; const changed to var in sandbox code
1 parent 0ae1964 commit ec06e19

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ Use unpkg.com cdn to get link to script/module from the package:
4545
```
4646
- ESM ES2015 module (~14kB)
4747
```html
48-
<script src="https://unpkg.com/safe-jsonp/dist/safe-jsonp.esm.js"></script>
48+
import JSONP from "https://unpkg.com/safe-jsonp/dist/safe-jsonp.esm.js"
4949
```
5050
- minified ESM ES2015 module (~7kB)
5151
```html
52-
<script src="https://unpkg.com/safe-jsonp/dist/safe-jsonp.esm.min.js"></script>
52+
import JSONP from "https://unpkg.com/safe-jsonp/dist/safe-jsonp.esm.min.js"
5353
```
5454

5555

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "safe-jsonp",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"description": "safer jsonp client with sandbox and Promise support",
55
"author": "Dmitriy Mozgovoy",
66
"main": "index.js",

src/lib/sandbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const injectResource = (imports) => Object.keys(imports).map((name) => {
1010
case "string":
1111
return resource;
1212
case "function":
13-
return `const ${name}= ${resource.toString()}`;
13+
return `var ${name}= ${resource.toString()}`;
1414
default:
1515
return resource.toString();
1616
}

0 commit comments

Comments
 (0)