node-stringprep
Advanced tools
Comparing version 0.2.0 to 0.2.1
13
index.js
'use strict'; | ||
try { | ||
var bindings = require('bindings')('node_stringprep.node') | ||
var icu = require('node-stringprep-icu') | ||
} catch (ex) { | ||
console.warn( | ||
'Cannot load StringPrep-' + | ||
require('./package.json').version + | ||
' bindings (using fallback). You may need to ' + | ||
'`npm install node-stringprep`' | ||
'Cannot load StringPrep-ICU' + | ||
' icu (using fallback). You may need to ' + | ||
'`npm install node-stringprep-icu`' | ||
) | ||
@@ -16,3 +15,3 @@ } | ||
try { | ||
return bindings.toUnicode(value) | ||
return icu.toUnicode(value) | ||
} catch (e) { | ||
@@ -26,3 +25,3 @@ return value | ||
try { | ||
this.stringPrep = new bindings.StringPrep(this.operation) | ||
this.stringPrep = new icu.StringPrep(this.operation) | ||
} catch (e) { | ||
@@ -29,0 +28,0 @@ this.stringPrep = null |
{ | ||
"name": "node-stringprep", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "index.js", | ||
@@ -14,5 +14,4 @@ "description": "ICU StringPrep profiles", | ||
}, | ||
"dependencies": { | ||
"nan": "~0.7.0", | ||
"bindings": "~1.1.1" | ||
"optionalDependencies": { | ||
"node-stringprep-icu": "~0.1.0" | ||
}, | ||
@@ -28,18 +27,11 @@ "devDependencies": { | ||
"type": "git", | ||
"path": "git://github.com/astro/node-stringprep.git" | ||
"path": "git://github.com/node-xmpp/node-stringprep.git" | ||
}, | ||
"homepage": "http://github.com/astro/node-stringprep", | ||
"bugs": "http://github.com/astro/node-stringprep/issues", | ||
"homepage": "http://github.com/node-xmpp/node-stringprep", | ||
"bugs": "http://github.com/node-xmpp/node-stringprep/issues", | ||
"author": { | ||
"name": "Astro", | ||
"email": "astro@spaceboyz.net", | ||
"web": "http://spaceboyz.net/~astro/" | ||
"name": "Lloyd Watkin", | ||
"email": "lloyd@evilprofessor.co.uk", | ||
"web": "http://evilprofessor.co.uk" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "Lloyd Watkin", | ||
"email": "lloyd@evilprofessor.co.uk", | ||
"web": "http://evilprofessor.co.uk" | ||
} | ||
], | ||
"licenses": [ | ||
@@ -52,8 +44,3 @@ { | ||
"node": ">=0.8" | ||
}, | ||
"contributors": [ | ||
"Camilo Aguilar", | ||
"Mauro Pompilio", | ||
"Joachim Kainz" | ||
] | ||
} | ||
} |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var StringPrep = proxyquire('../index', { 'bindings': null }).StringPrep | ||
var StringPrep = proxyquire('../index', { 'node-stringprep-icu': null }).StringPrep | ||
@@ -10,0 +10,0 @@ it('Should throw on unknown icu-profile', function(done) { |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
0
9063
10
154
+ Addednode-stringprep-icu@0.1.2(transitive)
- Removedbindings@~1.1.1
- Removednan@~0.7.0