Files
DefinitelyTyped/types/strip-json-comments/strip-json-comments-tests.ts
2017-03-24 14:27:52 -07:00

12 lines
416 B
TypeScript

// Type definitions for strip-json-comments
// Project: https://github.com/sindresorhus/strip-json-comments
// Definitions by: Dylan R. E. Moonfire <https://github.com/dmoonfire/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import stripJsonComments = require("strip-json-comments");
const json = '{/*rainbows*/"unicorn":"cake"}';
JSON.parse(stripJsonComments(json));
//=> {unicorn: 'cake'}