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

angular-html5

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-html5 - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

17

index.js
'use strict';
var defaultPrefix = 'ng-';
module.exports = function (params) {
params = params || {};
var customPrefixes = params.customPrefixes || [];
//find ng-something by default
var prefix = 'ng-';
var prefix = defaultPrefix;
var customPrefixes = params.customPrefixes;
//optionally add custom prefixes
if (Array.isArray(customPrefixes) && customPrefixes.length) {
var additions = customPrefixes.join('|');
prefix += '|';
prefix += additions;
prefix += '|' + customPrefixes.join('|');
}

@@ -34,11 +33,5 @@

test: function (str) {
if (typeof str !== 'string') {
throw new Error('Input to test function must be a string');
}
return replaceRegex.test(str);
},
replace: function (str) {
if (typeof str !== 'string') {
throw new Error('Input to replace function must be a string');
}
return str.replace(replaceRegex, replaceStr);

@@ -45,0 +38,0 @@ }

{
"name": "angular-html5",
"description": "Change your ng-attributes to data-ng-attributes for html5 validation",
"version": "0.2.0",
"version": "0.3.0",
"engines": {

@@ -6,0 +6,0 @@ "node": ">=0.10.0"

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