Skip to content

Commit 2546cdb

Browse files
Merge pull request #1918 from micalevisk/refactor-remove-deprecated-node-apis
refactor: drop deprecate nodejs utility api
2 parents 5eddd5a + e323a5a commit 2546cdb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib/service/service.factory.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
Tree,
1515
url,
1616
} from '@angular-devkit/schematics';
17-
import { isNullOrUndefined } from 'util';
1817
import { normalizeToKebabOrSnakeCase } from '../../utils/formatting';
1918
import {
2019
DeclarationOptions,
@@ -25,6 +24,10 @@ import { Location, NameParser } from '../../utils/name.parser';
2524
import { mergeSourceRoot } from '../../utils/source-root.helpers';
2625
import { ServiceOptions } from './service.schema';
2726

27+
function isNullOrUndefined(value: any): value is null | undefined {
28+
return value === null || value === undefined;
29+
}
30+
2831
export function main(options: ServiceOptions): Rule {
2932
options = transform(options);
3033
return (tree: Tree, context: SchematicContext) => {
@@ -63,8 +66,8 @@ function transform(source: ServiceOptions): ServiceOptions {
6366
function generate(options: ServiceOptions) {
6467
return (context: SchematicContext) =>
6568
apply(url(join('./files' as Path, options.language)), [
66-
options.spec
67-
? noop()
69+
options.spec
70+
? noop()
6871
: filter((path) => {
6972
const languageExtension = options.language || 'ts';
7073
const suffix = `.__specFileSuffix__.${languageExtension}`;

0 commit comments

Comments
 (0)