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

remove-dollar-inject

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remove-dollar-inject

A library for deleting any $inject in an Angular project.

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

remove-dollar-inject

Travis npm Code Climate Code Climate Greenkeeper badge semantic-release

A library for removing $inject from Angular source files.

Install

yarn install -D remove-dollar-inject

or

npm install --save-dev remove-dollar-inject

Usage

ES6

import removeDollarInject from 'remove-dollar-inject';

const input = "ExampleService.$inject = ['$q']; angular.module('app.example').service('ExampleService', ExampleService);";
const output = removeDollarInject(input);
console.log(output)
/*
 * angular.module('app.example').service('ExampleService', ExampleService);
 */

ES5

const removeDollarInject = require('remove-dollar-inject');

const input = "ExampleService.$inject = ['$q']; angular.module('app.example').service('ExampleService', ExampleService);";
const output = removeDollarInject(input);
console.log(output)
/*
 * angular.module('app.example').service('ExampleService', ExampleService);
 */

API

Table of Contents

removeDollarInject

Removes any $inject assignment expressions from a given source string.

Will return an empty string for any null/undefined/void values.

Parameters
  • source string String from which to remove any $inject (optional, default '')

Returns string Source string without $inject assignment expressions

License

MIT (C) Richard Harrah

FAQs

Package last updated on 30 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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