Comparing version 0.9.0 to 0.10.0
@@ -34,6 +34,7 @@ (function() { | ||
deprecate: function(message) { | ||
var deprecation, methodName, stack; | ||
var deprecation, deprecations, methodName, stack; | ||
stack = Deprecation.generateStack().slice(1); | ||
methodName = Deprecation.getFunctionNameFromCallsite(stack[0]); | ||
if (!(deprecation = global.__grimDeprecations__.find(function(d) { | ||
deprecations = global.__grimDeprecations__; | ||
if (!(deprecation = _.find(deprecations, function(d) { | ||
return d.getOriginName() === methodName; | ||
@@ -40,0 +41,0 @@ }))) { |
{ | ||
"name": "grim", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "Log usage of deprecated methods", | ||
@@ -5,0 +5,0 @@ "main": "./lib/grim", |
@@ -1,3 +0,21 @@ | ||
# Grim [![Build Status](https://magnum.travis-ci.com/atom/grim.svg?token=wKV9hrS79m2qMyqpNvUo&branch=master)](https://travis-ci.org/atom/grim) | ||
# Grim [![Build Status](https://travis-ci.org/atom/grim.svg)](https://travis-ci.org/atom/grim) | ||
Log usage of deprecated methods | ||
Log deprecate calls | ||
## Installing | ||
```sh | ||
npm install grim | ||
``` | ||
## Usage | ||
```javascript | ||
Grim = require('Grim') | ||
function someOldMethod() { | ||
Grim.deprecate("Use theNewMethod instead.") | ||
} | ||
``` | ||
To view all calls to deprecated methods use `Grim.logDeprecations()` or get direct access to the deprecated calls by using `Grim.getDeprecations()` |
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
7888
1430
6
151
22