assert-semver-operator
Assert that a package adheres to a semver operator
Last updated 5 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install assert-semver-operator 
SYNC missed versions from official npm registry.

assert-semver-operator Build Status

Assert that a package adheres to a semver operator

Install

$ npm install --save assert-semver-operator

Usage

var assertOperator = require('assert-semver-operator')

assertOperator('.', '~', function (err) {
  //=> null/Error
})
assert-operator . "~"

API

assertOperator(package, operator, callback) -> undefined

package

Required
Type: string

A path to a local package (dot or slash prefixed) or an npm package name.

operator

Required
Type: string

A semver operator to require (~ or ^). Unmatched semver strings (like exact versions or 2.x) will be considered valid.

callback

Required
Type: function
Arguments: err

A callback to call when the package has been validated. If an invalid operator was detected, the error message will specify the invalid packages.

License

MIT © Ben Drucker

Current Tags

  • 1.0.1                                ...           latest (5 years ago)

2 Versions

  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |