appc-connector-utils
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,2 @@ | ||
const pluralize = require('pluralize') | ||
const dataValidator = require('../tools/dataValidator') | ||
@@ -46,4 +47,6 @@ const metadataSchema = require('./metadataSchema') | ||
} | ||
const name = parent.name.split(namespaceDelimiter).pop() | ||
return { | ||
nameOnly: parent.name.split(namespaceDelimiter).pop(), | ||
nameOnly: name, | ||
nameOnlyPlural: pluralize(name), | ||
withNamespace: parent.name | ||
@@ -50,0 +53,0 @@ } |
{ | ||
"name": "appc-connector-utils", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Utilities for Arrow Connectors", | ||
@@ -34,3 +34,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"joi": "^10.2.0" | ||
"joi": "^10.2.0", | ||
"pluralize": "^4.0.0" | ||
}, | ||
@@ -37,0 +38,0 @@ "devDependencies": { |
@@ -84,2 +84,3 @@ const Arrow = require('arrow') | ||
t.equal(name1Result.nameOnly, 'myModel1') | ||
t.equal(name1Result.nameOnlyPlural, 'myModel1S') | ||
t.equal(name1Result.withNamespace, name1) | ||
@@ -89,2 +90,3 @@ | ||
t.equal(name2Result.nameOnly, name2) | ||
t.equal(name2Result.nameOnlyPlural, name2 + 'S') | ||
t.equal(name2Result.withNamespace, name2) | ||
@@ -94,2 +96,3 @@ | ||
t.equal(name3Result.nameOnly, name3) | ||
t.equal(name3Result.nameOnlyPlural, name3 + 'S') | ||
t.equal(name3Result.withNamespace, name3) | ||
@@ -99,2 +102,3 @@ | ||
t.equal(name4Result.nameOnly, 'myModel4') | ||
t.equal(name4Result.nameOnlyPlural, 'myModel4S') | ||
t.equal(name4Result.withNamespace, name4) | ||
@@ -104,2 +108,3 @@ | ||
t.equal(name5Result.nameOnly, 'myModel5') | ||
t.equal(name5Result.nameOnlyPlural, 'myModel5S') | ||
t.equal(name5Result.withNamespace, name5) | ||
@@ -106,0 +111,0 @@ |
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
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
51119
1028
2
+ Addedpluralize@^4.0.0
+ Addedpluralize@4.0.0(transitive)