Comparing version 0.0.0 to 0.0.1-security
{ | ||
"name": "new-struct", | ||
"version": "0.0.0", | ||
"description": "Structs inspired from Golang", | ||
"version": "0.0.1-security", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "fox" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"fox": "*" | ||
}, | ||
"keywords": [ | ||
"struct", | ||
"golang" | ||
], | ||
"repository": { | ||
"url": "git@github.com:azer\/new-struct.git", | ||
"type": "git" | ||
"type": "git", | ||
"url": "git+https://github.com/npm/security-holder.git" | ||
}, | ||
"author": "Azer Ko\u00e7ulu <azer@kodfabrik.com>", | ||
"license": "BSD" | ||
} | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/npm/security-holder/issues" | ||
}, | ||
"homepage": "https://github.com/npm/security-holder#readme" | ||
} |
@@ -1,66 +0,9 @@ | ||
## new-struct | ||
# Security holding package | ||
Structs inspred from Golang | ||
This package name is not currently in use, but was formerly occupied | ||
by a popular package. To avoid malicious use, npm is hanging on to | ||
the package name, but loosely, and we'll probably give it to you if | ||
you want it. | ||
```js | ||
newStruct = require('new-struct') | ||
Animal = newStruct({ | ||
name: '', | ||
type: '', | ||
age: 0, | ||
run: run | ||
}) | ||
function run (animal) { | ||
console.log('%s is running', animal.name) | ||
} | ||
dongdong = Animal('dongdong', 'cat', 4) | ||
blackbear = Animal('blackbear', 'cat', 3) | ||
dongdong.run() | ||
// => dongdong is running | ||
blackbear.run() | ||
// => blackbear is running | ||
``` | ||
## Install | ||
```bash | ||
$ npm install new-struct | ||
``` | ||
## Usage | ||
You can pass the values as an object, too; | ||
```js | ||
dongdong = Animal({ type: 'cat', foobar: 'dfjh' }) | ||
``` | ||
Methods can also be defined later; | ||
```js | ||
Animal.method('jump', function(animal){ | ||
console.log('%s is jumping!!', animal.name) | ||
}) | ||
``` | ||
To extend an existing struct: | ||
```js | ||
Cat = Animal.extend({ | ||
type: 'cat', | ||
grrr: grrr | ||
}) | ||
function grrr(cat) { | ||
console.log('grrrrrr') | ||
} | ||
dongdong = Cat('dongdong', 2) // notice how 'type' property got eleminated from parameter order. | ||
``` | ||
![](http://i.cloudup.com/CZR70W5Sct.png) | ||
You may adopt this package by contacting support@npmjs.com and | ||
requesting the name. |
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
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality 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
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
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 website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
803
2
0
10
1
1