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

get-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-js - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4-0

angular.js

13

package.json
{
"name": "get-js",
"version": "0.0.3",
"version": "0.0.4-0",
"description": "A lightweight promise based package to load scripts on the fly",
"main": "index.js",
"dependencies": {},
"dependencies": {
"angular": "^1.3.*"
},
"devDependencies": {

@@ -15,3 +17,3 @@ "babel-cli": "^6.7.7",

"transpile": "babel src -d lib",
"bundle": "webpack -d --output-filename get.js && webpack -p --output-filename get.min.js",
"bundle": "./resources/scripts/bundle.sh",
"build": "npm run transpile && npm run bundle",

@@ -35,3 +37,5 @@ "prepublish": "npm run build"

"get",
"es6"
"es6",
"angular",
"$q"
],

@@ -42,2 +46,3 @@ "files": [

"index.js",
"angular.js",
"LICENSE",

@@ -44,0 +49,0 @@ "README.md",

@@ -60,1 +60,32 @@ # Get JS

```
## Using in Angular Projects
You can also inject this in your angular files as a `$q` friendly angular service.
Require the angular module using
```javascript
var angularGetJs = require('get-js/angular');
```
Or
```html
<script type="text/javascript" src="/path/to/get-js/dist/angular-get.min.js"></script>
```
Then you should be able to use it like this
```javascript
// Add the module as a dependeny in your app
angular.module('app', ['angularGetJs']);
// Inject the service
angular.module('app')
.controller('MyController', ['get', function(get) {
get('/some/script.js')
.then(function() {
console.log('do something now');
})
.catch(function() {
console.log('error');
});
}]);
```

Sorry, the diff of this file is not supported yet

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