Sha256: 22d46c2451ac6db1955734468cf2f5b304d6010e1f25cc8bdb8d983fcb14081b
Contents?: true
Size: 976 Bytes
Versions: 7
Compression:
Stored size: 976 Bytes
Contents
this.Skim = access: (name) -> value = @[name] value = value.call(@) if typeof value == "function" return [@] if value == true return false if value == false or !value? return [value] if Object.prototype.toString.call(value) != "[object Array]" return false if value.length == 0 return value withContext: (context, block) -> create = (o) -> F = -> F.prototype = o new F context = create(context) context.safe ||= @safe || (value) -> return value if value?.skimSafe result = new String(value ? '') result.skimSafe = true result context.escape ||= @escape || (string) -> return '' unless string? return string if string.skimSafe @safe (''+string) .replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/\//g,'/') block.call(context)
Version data entries
7 entries across 7 versions & 1 rubygems