Skip to content

Commit

Permalink
Remove Yaml.register(). Fix #83
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfa committed Jun 24, 2017
1 parent 2a19bf4 commit 5fc5756
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/Yaml.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,6 @@ class Yaml
return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder)


# Registers .yml extension to work with node's require() function.
#
@register: ->
require_handler = (module, filename) ->
# Fill in result
module.exports = YAML.parseFile filename

# Register require extensions only if we're on node.js
# hack for browserify
if require?.extensions?
require.extensions['.yml'] = require_handler
require.extensions['.yaml'] = require_handler


# Alias of dump() method for compatibility reasons.
#
@stringify: (input, inline, indent, exceptionOnInvalidType, objectEncoder) ->
Expand Down

0 comments on commit 5fc5756

Please sign in to comment.